This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
lib/web_ui/lib/src/engine/html Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'package:ui/ui.dart' as ui;
66
77import '../dom.dart' ;
88import '../vector_math.dart' ;
9+ import '../window.dart' ;
910import 'surface.dart' ;
1011
1112class SurfaceScene implements ui.Scene {
@@ -45,12 +46,10 @@ class PersistedScene extends PersistedContainerSurface {
4546 @override
4647 void recomputeTransformAndClip () {
4748 // The scene clip is the size of the entire window.
48- // TODO(yjbanov): in the add2app scenario where we might be hosted inside
49- // a custom element, this will be different. We will need to
50- // update this code when we add add2app support.
51- final double screenWidth = domWindow.innerWidth! ;
52- final double screenHeight = domWindow.innerHeight! ;
53- localClipBounds = ui.Rect .fromLTRB (0 , 0 , screenWidth, screenHeight);
49+ final ui.Size screen = window.physicalSize / window.devicePixelRatio;
50+ // Question: why is the above a logical size, rather than a physical size
51+ // like everywhere else in the metrics?
52+ localClipBounds = ui.Rect .fromLTRB (0 , 0 , screen.width, screen.height);
5453 projectedClip = null ;
5554 }
5655
You can’t perform that action at this time.
0 commit comments