Title: [186944] branches/safari-601.1-branch

Diff

Modified: branches/safari-601.1-branch/LayoutTests/ChangeLog (186943 => 186944)


--- branches/safari-601.1-branch/LayoutTests/ChangeLog	2015-07-17 05:33:18 UTC (rev 186943)
+++ branches/safari-601.1-branch/LayoutTests/ChangeLog	2015-07-17 05:33:22 UTC (rev 186944)
@@ -1,5 +1,21 @@
 2015-07-16  Matthew Hanson  <[email protected]>
 
+        Merge r186911. rdar://problem/21822541
+
+    2015-07-16  Simon Fraser  <[email protected]>
+
+            Fix disappearing position:fixed elements in fixed layout mode
+            https://bugs.webkit.org/show_bug.cgi?id=147019
+
+            Reviewed by Tim Horton.
+
+            Test with four fixed elements in fixed layout mode.
+
+            * compositing/fixed-with-fixed-layout-expected.txt: Added.
+            * compositing/fixed-with-fixed-layout.html: Added.
+
+2015-07-16  Matthew Hanson  <[email protected]>
+
         Merge r186868. rdar://problem/21758704
 
     2015-07-15  Dean Jackson  <[email protected]>

Added: branches/safari-601.1-branch/LayoutTests/compositing/fixed-with-fixed-layout-expected.txt (0 => 186944)


--- branches/safari-601.1-branch/LayoutTests/compositing/fixed-with-fixed-layout-expected.txt	                        (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/compositing/fixed-with-fixed-layout-expected.txt	2015-07-17 05:33:22 UTC (rev 186944)
@@ -0,0 +1,35 @@
+Top Left Right bottom
+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 806.00 1616.00)
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 1008.00 2021.00)
+      (contentsOpaque 1)
+      (transform [0.80 0.00 0.00 0.00] [0.00 0.80 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
+      (children 4
+        (GraphicsLayer
+          (bounds 1000.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 0.00 200.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 900.00 200.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 0.00 1900.00)
+          (bounds 1000.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+

Added: branches/safari-601.1-branch/LayoutTests/compositing/fixed-with-fixed-layout.html (0 => 186944)


--- branches/safari-601.1-branch/LayoutTests/compositing/fixed-with-fixed-layout.html	                        (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/compositing/fixed-with-fixed-layout.html	2015-07-17 05:33:22 UTC (rev 186944)
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        body {
+            height: 2000px;
+            width: 1000px;
+        }
+        
+        .fixed {
+            position: fixed;
+            height: 100px;
+            width: 100px;
+            background-color: rgba(0, 0, 0, 0.5);
+        }
+        
+        .top, .bottom {
+            left: 0;
+            width: 100%;
+        }
+        
+        .left, .right {
+            top: 200px;
+        }
+        
+        .top {
+            top: 0;
+        }
+        
+        .bottom {
+            bottom: 0;
+        }
+        .left {
+            left: 0;
+        }
+        .right {
+            right: 0;
+        }
+    </style>
+    <script>
+        
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+        }
+
+        if (window.internals) {
+            internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true);
+            internals.setUseFixedLayout(true);
+            internals.setFixedLayoutSize(1000, 2000);
+            var scale = 800 / 1000;
+            eventSender.scalePageBy(scale, scale);
+        }
+        
+        function doTest()
+        {
+            window.setTimeout(function() {
+                document.getElementById("layerTree").innerText = window.internals.layerTreeAsText(document);
+                testRunner.notifyDone();
+            }, 0);
+        }
+        
+        window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+<div class="top fixed">
+    Top
+</div>
+
+<div class="left fixed">
+    Left
+</div>
+
+<div class="right fixed">
+    Right
+</div>
+
+<div class="bottom fixed">
+    bottom
+</div>
+
+<pre id="layerTree"></pre>
+</body>
+</html>

Modified: branches/safari-601.1-branch/Source/WebCore/ChangeLog (186943 => 186944)


--- branches/safari-601.1-branch/Source/WebCore/ChangeLog	2015-07-17 05:33:18 UTC (rev 186943)
+++ branches/safari-601.1-branch/Source/WebCore/ChangeLog	2015-07-17 05:33:22 UTC (rev 186944)
@@ -1,5 +1,28 @@
 2015-07-16  Matthew Hanson  <[email protected]>
 
+        Merge r186911. rdar://problem/21822541
+
+    2015-07-16  Simon Fraser  <[email protected]>
+
+            Fix disappearing position:fixed elements in fixed layout mode
+            https://bugs.webkit.org/show_bug.cgi?id=147019
+
+            Reviewed by Tim Horton.
+
+            Test: compositing/fixed-with-fixed-layout.html
+
+            When in fixed layout mode, and being scaled down, viewportConstrainedVisibleContentRect() is
+            the wrong thing to use to determine if position:fixed elements are clipped out. In this case,
+            use the simpler document bounds (before scaling).
+
+            In the long term,  there needs to be an equivalent of viewportConstrainedVisibleContentRect()
+            that gives an appropriate rect that can be used here.
+
+            * rendering/RenderLayerCompositor.cpp:
+            (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
+
+2015-07-16  Matthew Hanson  <[email protected]>
+
         Merge r186895. rdar://problem/21692212
 
     2015-07-16  Brady Eidson  <[email protected]>

Modified: branches/safari-601.1-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (186943 => 186944)


--- branches/safari-601.1-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2015-07-17 05:33:18 UTC (rev 186943)
+++ branches/safari-601.1-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2015-07-17 05:33:22 UTC (rev 186944)
@@ -2739,7 +2739,12 @@
     }
 
     // Fixed position elements that are invisible in the current view don't get their own layer.
-    LayoutRect viewBounds = m_renderView.frameView().viewportConstrainedVisibleContentRect();
+    // FIXME: We shouldn't have to check useFixedLayout() here; one of the viewport rects needs to give the correct answer.
+    LayoutRect viewBounds;
+    if (m_renderView.frameView().useFixedLayout())
+        viewBounds = m_renderView.unscaledDocumentRect();
+    else
+        viewBounds = m_renderView.frameView().viewportConstrainedVisibleContentRect();
     LayoutRect layerBounds = layer.calculateLayerBounds(&layer, LayoutSize(), RenderLayer::UseLocalClipRectIfPossible | RenderLayer::IncludeLayerFilterOutsets | RenderLayer::UseFragmentBoxesExcludingCompositing
         | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask | RenderLayer::IncludeCompositedDescendants);
     // Map to m_renderView to ignore page scale.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to