Revert ab29ec8: container==content auto-fit made it worse — back to alpha-crop with the container at element size
The container tracks the element's own Width/Height again; the crop stays in the bitmap.
This commit is contained in:
@@ -154,25 +154,4 @@ public sealed class WebView2ManagerTests
|
||||
|
||||
Assert.Equal((0, 0, w, h), (x, y, bw, bh));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ContentCanvasSize_Full_Frame_Maps_To_Canvas()
|
||||
{
|
||||
var (cw, ch) = WebView2Manager.ContentCanvasSize(1920, 1080, 1920, 1080);
|
||||
Assert.Equal((1920.0, 1080.0), (cw, ch));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ContentCanvasSize_Half_Widget_Is_Half_Canvas()
|
||||
{
|
||||
var (cw, ch) = WebView2Manager.ContentCanvasSize(960, 540, 1920, 1080);
|
||||
Assert.Equal((960.0, 540.0), (cw, ch));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ContentCanvasSize_Corrects_For_Dpi_Scale()
|
||||
{
|
||||
var (cw, ch) = WebView2Manager.ContentCanvasSize(1200, 675, 2400, 1350);
|
||||
Assert.Equal((960.0, 540.0), (cw, ch));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user