Title: [143641] trunk
Revision
143641
Author
bda...@apple.com
Date
2013-02-21 12:41:17 -0800 (Thu, 21 Feb 2013)

Log Message

Out-of-view fixed position check should not be affected by page scale at all on Mac
https://bugs.webkit.org/show_bug.cgi?id=110294
-and corresponding-
<rdar://problem/13247582>

Reviewed by Simon Fraser.

Source/WebCore: 

Don't scale the layerBounds. Generally, the layerBounds should be relative to the 
viewBounds which are also unscaled. Chromium used to want this behavior, but it is 
covered by their pageScaleFactorAppliedInCompositor implementation now.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

LayoutTests: 

These layer results should be the same regardless of the scale factor.

* compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt:
* compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt:
* compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html:
* compositing/layer-creation/fixed-position-out-of-view-scaled.html:
* platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Removed.
* platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Removed.
* platform/mac-wk2/tiled-drawing/fixed/four-bars-zoomed-expected.txt:

Skip these on Chromium for now.
* platform/chromium/TestExpectations:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (143640 => 143641)


--- trunk/LayoutTests/ChangeLog	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/ChangeLog	2013-02-21 20:41:17 UTC (rev 143641)
@@ -1,3 +1,25 @@
+2013-02-21  Beth Dakin  <bda...@apple.com>
+
+        Out-of-view fixed position check should not be affected by page scale at all on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=110294
+        -and corresponding-
+        <rdar://problem/13247582>
+
+        Reviewed by Simon Fraser.
+
+        These layer results should be the same regardless of the scale factor.
+
+        * compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt:
+        * compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt:
+        * compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html:
+        * compositing/layer-creation/fixed-position-out-of-view-scaled.html:
+        * platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Removed.
+        * platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Removed.
+        * platform/mac-wk2/tiled-drawing/fixed/four-bars-zoomed-expected.txt:
+
+        Skip these on Chromium for now.
+        * platform/chromium/TestExpectations:
+
 2013-02-21  Philip Rogers  <p...@google.com>
 
         Stop starting animations when leaving a page

Modified: trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt (143640 => 143641)


--- trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt	2013-02-21 20:41:17 UTC (rev 143641)
@@ -28,18 +28,8 @@
       (bounds 800.00 1016.00)
       (contentsOpaque 1)
       (transform [0.50 0.00 0.00 0.00] [0.00 0.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 4
+      (children 2
         (GraphicsLayer
-          (position 8.00 1008.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-        )
-        (GraphicsLayer
-          (position 1000.00 0.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-        )
-        (GraphicsLayer
           (position 600.00 0.00)
           (bounds 10.00 10.00)
           (contentsOpaque 1)
@@ -61,11 +51,16 @@
       (bounds 848.00 1016.00)
       (contentsOpaque 1)
       (transform [1.50 0.00 0.00 0.00] [0.00 1.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 1
+      (children 2
         (GraphicsLayer
+          (position 600.00 0.00)
           (bounds 10.00 10.00)
           (contentsOpaque 1)
         )
+        (GraphicsLayer
+          (bounds 10.00 10.00)
+          (contentsOpaque 1)
+        )
       )
     )
   )

Modified: trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt (143640 => 143641)


--- trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt	2013-02-21 20:41:17 UTC (rev 143641)
@@ -29,18 +29,8 @@
       (bounds 800.00 1016.00)
       (contentsOpaque 1)
       (transform [0.50 0.00 0.00 0.00] [0.00 0.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 4
+      (children 2
         (GraphicsLayer
-          (position 8.00 1008.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-        )
-        (GraphicsLayer
-          (position 1000.00 0.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-        )
-        (GraphicsLayer
           (position 600.00 0.00)
           (bounds 10.00 10.00)
           (contentsOpaque 1)
@@ -62,11 +52,16 @@
       (bounds 848.00 1016.00)
       (contentsOpaque 1)
       (transform [1.50 0.00 0.00 0.00] [0.00 1.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 1
+      (children 2
         (GraphicsLayer
+          (position 600.00 0.00)
           (bounds 10.00 10.00)
           (contentsOpaque 1)
         )
+        (GraphicsLayer
+          (bounds 10.00 10.00)
+          (contentsOpaque 1)
+        )
       )
     )
   )

Modified: trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html (143640 => 143641)


--- trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html	2013-02-21 20:41:17 UTC (rev 143641)
@@ -46,12 +46,13 @@
   Scale=1.5:
   <pre id="layerTreeScaledUp"></pre>
 </div>
+<!-- The layer tree should always be the same, regardless of page scale, except on platforms that enable the applyPageScaleFactorInCompositor Setting. -->
 <!-- No layer in any case. -->
 <div class="fixed" style="top: -100px"></div>
-<!-- Has composited layer when scaled down; no layer when not scaled or scaled up. -->
+<!-- When applyPageScaleFactorInCompositor is true, this will have composited layer when scaled down; no layer when not scaled or scaled up. -->
 <div class="fixed"></div>
 <div class="fixed" style="top: 0px; left: 1000px"></div>
-<!-- Has composited layer when not scaled and scaled down; no layer scaled up. -->
+<!-- When applyPageScaleFactorInCompositor is true, this will have composited layer when not scaled and scaled down; no layer scaled up. -->
 <div class="fixed" style="top: 0px; left: 600px"></div>
 <!-- Always has composited layer. -->
 <div class="fixed" style="top: 0px; left: 0px"></div>

Modified: trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled.html (143640 => 143641)


--- trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled.html	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled.html	2013-02-21 20:41:17 UTC (rev 143641)
@@ -44,12 +44,13 @@
   Scale=1.5:
   <pre id="layerTreeScaledUp"></pre>
 </div>
+<!-- The layer tree should always be the same, regardless of page scale, except on platforms that enable the applyPageScaleFactorInCompositor Setting. -->
 <!-- No layer in any case. -->
 <div class="fixed" style="top: -100px"></div>
-<!-- Has composited layer when scaled down; no layer when not scaled or scaled up. -->
+<!-- When applyPageScaleFactorInCompositor is true, this will have a composited layer when scaled down; no layer when not scaled or scaled up. -->
 <div class="fixed"></div>
 <div class="fixed" style="top: 0px; left: 1000px"></div>
-<!-- Has composited layer when not scaled and scaled down; no layer scaled up. -->
+<!-- When applyPageScaleFactorInCompositor is true, this will have composited layer when not scaled and scaled down; no layer scaled up. -->
 <div class="fixed" style="top: 0px; left: 600px"></div>
 <!-- Always has composited layer. -->
 <div class="fixed" style="top: 0px; left: 0px"></div>

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (143640 => 143641)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2013-02-21 20:41:17 UTC (rev 143641)
@@ -1401,6 +1401,12 @@
 webkit.org/b/109775 [ MountainLion XP ] media/video-display-toggle.html [ Failure ]
 webkit.org/b/109775 [ Lion MountainLion Win7 ] media/video-playing-and-pause.html [ Failure ]
 
+# Need rebaseline after https://bugs.webkit.org/show_bug.cgi?id=110294
+webkit.org/b/110294 platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html [ Failure ]
+webkit.org/b/110294 platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled.html [ Failure ]
+webkit.org/b/110294 compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html [ Failure ]
+webkit.org/b/110294 compositing/layer-creation/fixed-position-out-of-view-scaled.html [ Failure ]
+
 # -----------------------------------------------------------------
 # End SVG TESTS
 # -----------------------------------------------------------------

Deleted: trunk/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt (143640 => 143641)


--- trunk/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt	2013-02-21 20:41:17 UTC (rev 143641)
@@ -1,80 +0,0 @@
-Not scaled:
-(GraphicsLayer
-  (bounds 785.00 1016.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 785.00 1016.00)
-      (contentsOpaque 1)
-      (children 2
-        (GraphicsLayer
-          (position 600.00 0.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-Scale=0.5:
-(GraphicsLayer
-  (bounds 400.00 508.00)
-  (children 1
-    (GraphicsLayer
-      (anchor 0.00 0.00)
-      (bounds 800.00 1016.00)
-      (contentsOpaque 1)
-      (transform [0.50 0.00 0.00 0.00] [0.00 0.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 4
-        (GraphicsLayer
-          (position 8.00 1008.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 1000.00 0.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 600.00 0.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-Scale=1.5:
-(GraphicsLayer
-  (bounds 1272.00 1524.00)
-  (children 1
-    (GraphicsLayer
-      (anchor 0.00 0.00)
-      (bounds 848.00 1016.00)
-      (contentsOpaque 1)
-      (transform [1.50 0.00 0.00 0.00] [0.00 1.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 1
-        (GraphicsLayer
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Deleted: trunk/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt (143640 => 143641)


--- trunk/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt	2013-02-21 20:41:17 UTC (rev 143641)
@@ -1,81 +0,0 @@
-Not scaled:
-(GraphicsLayer
-  (bounds 785.00 1016.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 785.00 1016.00)
-      (contentsOpaque 1)
-      (children 2
-        (GraphicsLayer
-          (position 600.00 100.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 0.00 100.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-Scale=0.5:
-(GraphicsLayer
-  (bounds 400.00 508.00)
-  (children 1
-    (GraphicsLayer
-      (anchor 0.00 0.00)
-      (bounds 800.00 1016.00)
-      (contentsOpaque 1)
-      (transform [0.50 0.00 0.00 0.00] [0.00 0.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 4
-        (GraphicsLayer
-          (position 8.00 1008.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 1000.00 0.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 600.00 0.00)
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-Scale=1.5:
-(GraphicsLayer
-  (bounds 1272.00 1524.00)
-  (children 1
-    (GraphicsLayer
-      (anchor 0.00 0.00)
-      (bounds 848.00 1016.00)
-      (contentsOpaque 1)
-      (transform [1.50 0.00 0.00 0.00] [0.00 1.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
-      (children 1
-        (GraphicsLayer
-          (bounds 10.00 10.00)
-          (contentsOpaque 1)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed/four-bars-zoomed-expected.txt (143640 => 143641)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed/four-bars-zoomed-expected.txt	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed/four-bars-zoomed-expected.txt	2013-02-21 20:41:17 UTC (rev 143641)
@@ -2,7 +2,7 @@
   (viewport rect 0 0 785 585)
   (contents size 1805 5108)
   (frame scale factor 2.30)
-  (children 3
+  (children 4
     (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeTop)
       (viewport rect at last layout: 0.00 0.00 785.00 585.00)
@@ -13,6 +13,11 @@
       (layer position at last layout 10.00 200.00)
     )
     (Fixed node
+      (anchor edges: AnchorEdgeRight AnchorEdgeTop)
+      (viewport rect at last layout: 0.00 0.00 785.00 585.00)
+      (layer position at last layout 601.00 200.00)
+    )
+    (Fixed node
       (anchor edges: AnchorEdgeLeft AnchorEdgeBottom)
       (viewport rect at last layout: 0.00 0.00 785.00 585.00)
       (layer position at last layout 0.00 501.00)
@@ -38,7 +43,7 @@
       (children 1
         (GraphicsLayer
           (visible rect 0.00, 0.00 0.00 x 0.00)
-          (children 3
+          (children 4
             (GraphicsLayer
               (bounds 778.00 74.00)
               (drawsContent 1)
@@ -51,6 +56,12 @@
               (visible rect 0.00, 0.00 174.00 x 54.35)
             )
             (GraphicsLayer
+              (position 601.00 200.00)
+              (bounds 174.00 324.00)
+              (drawsContent 1)
+              (visible rect 0.00, 0.00 0.00 x 0.00)
+            )
+            (GraphicsLayer
               (position 0.00 501.00)
               (bounds 778.00 74.00)
               (drawsContent 1)

Modified: trunk/Source/WebCore/ChangeLog (143640 => 143641)


--- trunk/Source/WebCore/ChangeLog	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/Source/WebCore/ChangeLog	2013-02-21 20:41:17 UTC (rev 143641)
@@ -1,3 +1,19 @@
+2013-02-21  Beth Dakin  <bda...@apple.com>
+
+        Out-of-view fixed position check should not be affected by page scale at all on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=110294
+        -and corresponding-
+        <rdar://problem/13247582>
+
+        Reviewed by Simon Fraser.
+
+        Don't scale the layerBounds. Generally, the layerBounds should be relative to the 
+        viewBounds which are also unscaled. Chromium used to want this behavior, but it is 
+        covered by their pageScaleFactorAppliedInCompositor implementation now.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
+
 2013-02-21  Philip Rogers  <p...@google.com>
 
         Stop starting animations when leaving a page

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (143640 => 143641)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-02-21 20:37:25 UTC (rev 143640)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-02-21 20:41:17 UTC (rev 143641)
@@ -2102,7 +2102,6 @@
         LayoutRect viewBounds = frameView->viewportConstrainedVisibleContentRect();
         LayoutRect layerBounds = layer->calculateLayerBounds(rootRenderLayer(), 0, RenderLayer::DefaultCalculateLayerBoundsFlags
             | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask | RenderLayer::IncludeCompositedDescendants);
-        layerBounds.scale(frameView->frame()->frameScaleFactor());
         if (!viewBounds.intersects(enclosingIntRect(layerBounds))) {
             if (viewportConstrainedNotCompositedReason)
                 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompositedForBoundsOutOfView;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to