Title: [102649] trunk
Revision
102649
Author
[email protected]
Date
2011-12-12 18:32:20 -0800 (Mon, 12 Dec 2011)

Log Message

iframe fails to scroll in composited page
https://bugs.webkit.org/show_bug.cgi?id=72682

Reviewed by Simon Fraser.

Source/WebCore:

FrameView::scrollContentsSlowPath only was catching the case where a
child iframe had a composited parent. Now detect if the child iframe
has any composited ancestor.

Test: compositing/iframes/scroll-grandchild-iframe.html

* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsSlowPath):

LayoutTests:

* compositing/iframes/resources/scrollgrandchild-grandparent.html: Added.
* compositing/iframes/resources/scrollgrandchild-inner.html: Added.
* compositing/iframes/resources/scrollgrandchild-parent.html: Added.
* compositing/iframes/scroll-grandchild-iframe-expected.png: Added.
* compositing/iframes/scroll-grandchild-iframe-expected.txt: Added.
* compositing/iframes/scroll-grandchild-iframe.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (102648 => 102649)


--- trunk/LayoutTests/ChangeLog	2011-12-13 02:23:18 UTC (rev 102648)
+++ trunk/LayoutTests/ChangeLog	2011-12-13 02:32:20 UTC (rev 102649)
@@ -1,3 +1,17 @@
+2011-12-12  Adrienne Walker  <[email protected]>
+
+        iframe fails to scroll in composited page
+        https://bugs.webkit.org/show_bug.cgi?id=72682
+
+        Reviewed by Simon Fraser.
+
+        * compositing/iframes/resources/scrollgrandchild-grandparent.html: Added.
+        * compositing/iframes/resources/scrollgrandchild-inner.html: Added.
+        * compositing/iframes/resources/scrollgrandchild-parent.html: Added.
+        * compositing/iframes/scroll-grandchild-iframe-expected.png: Added.
+        * compositing/iframes/scroll-grandchild-iframe-expected.txt: Added.
+        * compositing/iframes/scroll-grandchild-iframe.html: Added.
+
 2011-12-12  Kenneth Russell  <[email protected]>
 
         Unreviewed. Chromium test expectations update to get the bots green.

Added: trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-grandparent.html (0 => 102649)


--- trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-grandparent.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-grandparent.html	2011-12-13 02:32:20 UTC (rev 102649)
@@ -0,0 +1,20 @@
+<html>
+<head>
+  <style>
+    #trigger {
+      -webkit-transform:translateZ(0);
+    }
+    #parent {
+      width: 350px;
+      height: 450px;
+      border: none;
+      position: absolute;
+      -webkit-transform: translate(200px, 0px);
+    }
+  </style>
+</head>
+<body>
+  <div id="trigger"></div>
+  <iframe id="parent" src=""
+</body>
+</html>

Added: trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-inner.html (0 => 102649)


--- trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-inner.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-inner.html	2011-12-13 02:32:20 UTC (rev 102649)
@@ -0,0 +1,49 @@
+<html>
+<head>
+  <style>
+    body {
+      height: 1000px;
+    }
+    #redbox {
+      background-color: red;
+      position: absolute;
+      top: 50px;
+      left: 50px;
+      height: 50px;
+      width: 50px;
+    }
+    #greenbox {
+      background-color: green;
+      position: absolute;
+      top: 450px;
+      left: 50px;
+      height: 50px;
+      width: 50px;
+    }
+  </style>
+  <script>
+    if (window.internals)
+      window.internals.setMockScrollbarsEnabled(document, true);
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText(true);
+      layoutTestController.waitUntilDone();
+    }
+
+    function doTest()
+    {
+      if (window.layoutTestController)
+        layoutTestController.display();
+      // Scroll red box off screen and scroll green box into same place.
+      window.scrollTo(0, 400);
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.addEventListener('load', doTest, false);
+  </script>
+</head>
+<body>
+  <div id="redbox"></div>
+  <div id="greenbox"></div>
+</body>
+</html>

Added: trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-parent.html (0 => 102649)


--- trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-parent.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/resources/scrollgrandchild-parent.html	2011-12-13 02:32:20 UTC (rev 102649)
@@ -0,0 +1,15 @@
+<html>
+<head>
+  <style>
+    #child {
+      width: 150px;
+      height: 300px;
+      border: none;
+      -webkit-transform: translate(100px, 100px);
+    }
+  </style>
+</head>
+<body>
+  <iframe id="child" src=""
+</body>
+</html>

Added: trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe-expected.png (0 => 102649)


--- trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe-expected.png	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe-expected.png	2011-12-13 02:32:20 UTC (rev 102649)
@@ -0,0 +1,5 @@
+\x89PNG
+
+
+IHDR X')tEXtchecksum253b5cd0a7d7dbd3528ed3e2f2942d57a\xFD\x9C\x97
+\xF2IDATx\x9C\xEDر\x8DAE\xC1\xDB\xD3\xE6\xB5d\x86\xC8"\x9BK\xE0\x8C-\x8D\xAA\xEC6\xBE\xF9\xD4\xC7Z\xEB\x80\xCE\xEF\xF4\x80\xDD,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88\x9D\xD3\xB6\xF5z\xBD\xDE?\xBE\xAE\xEBsK\x80/\xF3\xC1\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88\x9D\xD3\x80\x9D\x8Fcz\xC2?\xD6}MO6\xE7\x83X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81;\xA7;[\xF75=`\x80@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@\xEC\x9C\xB0\xAD\xE7\xF3\xF9\xFE\xF1u]|\x9B@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@\xEC\x9C\xB0\xAD\xDB\xED6=\x98\xE1\x83X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81;\xD6Z\xD3\xB6\xE2\x83X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81X1\x81\xFB|\xDB\xEDi\x864\xF0IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe-expected.txt (0 => 102649)


--- trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe-expected.txt	2011-12-13 02:32:20 UTC (rev 102649)
@@ -0,0 +1 @@
+

Added: trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe.html (0 => 102649)


--- trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/iframes/scroll-grandchild-iframe.html	2011-12-13 02:32:20 UTC (rev 102649)
@@ -0,0 +1,16 @@
+<html>
+<head>
+  <style>
+    #grandparent {
+      width: 600px;
+      height: 500px;
+      border: none;
+    }
+  </style>
+</head>
+<body>
+  <div>
+    <iframe id="grandparent" src=""
+  </div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (102648 => 102649)


--- trunk/Source/WebCore/ChangeLog	2011-12-13 02:23:18 UTC (rev 102648)
+++ trunk/Source/WebCore/ChangeLog	2011-12-13 02:32:20 UTC (rev 102649)
@@ -1,3 +1,19 @@
+2011-12-12  Adrienne Walker  <[email protected]>
+
+        iframe fails to scroll in composited page
+        https://bugs.webkit.org/show_bug.cgi?id=72682
+
+        Reviewed by Simon Fraser.
+
+        FrameView::scrollContentsSlowPath only was catching the case where a
+        child iframe had a composited parent. Now detect if the child iframe
+        has any composited ancestor.
+
+        Test: compositing/iframes/scroll-grandchild-iframe.html
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollContentsSlowPath):
+
 2011-12-12  Konrad Piascik  <[email protected]>
 
         Implement the _javascript_Core bindings for eventListenerHandlerLocation

Modified: trunk/Source/WebCore/page/FrameView.cpp (102648 => 102649)


--- trunk/Source/WebCore/page/FrameView.cpp	2011-12-13 02:23:18 UTC (rev 102648)
+++ trunk/Source/WebCore/page/FrameView.cpp	2011-12-13 02:32:20 UTC (rev 102649)
@@ -1539,7 +1539,7 @@
         root->layer()->setBackingNeedsRepaintInRect(visibleContentRect());
     }
     if (RenderPart* frameRenderer = m_frame->ownerRenderer()) {
-        if (frameRenderer->containerForRepaint()) {
+        if (isEnclosedInCompositingLayer()) {
             LayoutRect rect(frameRenderer->borderLeft() + frameRenderer->paddingLeft(),
                             frameRenderer->borderTop() + frameRenderer->paddingTop(),
                             visibleWidth(), visibleHeight());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to