Log Message
Fix scrollbar layers being misplaced with a clipped owner layer https://bugs.webkit.org/show_bug.cgi?id=89486
Reviewed by Simon Fraser. Source/WebCore: Scrollbar layers are positioned relative to their parent layer. If that parent gets clipped, then that positioning becomes incorrect and scrollbars get positioned relative to the clipped bounds instead of the full bounds. Fix by not clipping in this case. Test: compositing/overflow/scrollbars-with-clipped-owner.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldClipCompositedBounds): LayoutTests: * compositing/overflow/scrollbars-with-clipped-owner-expected.png: Added. * compositing/overflow/scrollbars-with-clipped-owner-expected.txt: Added. * compositing/overflow/scrollbars-with-clipped-owner.html: Added.
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (120749 => 120750)
--- trunk/LayoutTests/ChangeLog 2012-06-19 20:13:45 UTC (rev 120749)
+++ trunk/LayoutTests/ChangeLog 2012-06-19 21:00:09 UTC (rev 120750)
@@ -1,3 +1,14 @@
+2012-06-19 Adrienne Walker <[email protected]>
+
+ Fix scrollbar layers being misplaced with a clipped owner layer
+ https://bugs.webkit.org/show_bug.cgi?id=89486
+
+ Reviewed by Simon Fraser.
+
+ * compositing/overflow/scrollbars-with-clipped-owner-expected.png: Added.
+ * compositing/overflow/scrollbars-with-clipped-owner-expected.txt: Added.
+ * compositing/overflow/scrollbars-with-clipped-owner.html: Added.
+
2012-06-19 Shinya Kawanaka <[email protected]>
[Shadow][Editing] applying document.execCommand('bold') twice to elements having shadow insertion points causes a crash.
Added: trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner-expected.png (0 => 120750)
--- trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner-expected.png (rev 0)
+++ trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner-expected.png 2012-06-19 21:00:09 UTC (rev 120750)
@@ -0,0 +1,6 @@
+\x89PNG
+
+
+IHDR X ' )tEXtchecksum e6569751cdaedb5052c93328d11da15f\xD09!B IDATx\x9C\xED\xD8\xC1q\xC2PAp)BA\x99Id\x862!9\x84\xBB\xCF{xǩ\xBD^.\xFBX\xD7\xC7\xF1\xE3eY \xFEmǏ \xE0X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 X 1\x81 \x9BF\xE04\xE6y= \xCE\xC1 &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b 6\x8D p\xCF\xE7\xF3\xF8\xB1 @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` Ħu}\x8C\xDE\xF0\x85\xE6y=\xA1w\xBF\xDFGO \x80s\xF0\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ش,\xCB\xE8
+ _\xC5 &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b v\xDD\xF7}\xF4 \x80O\xB7m\xDB\xF1c, \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 , \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]_\xAF\xD7\xE8
+ \x9F\xEEv\xBB?\xF6\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\xD8/\xFA\xDD\xAEU\xD9͕ IEND\xAEB`\x82
\ No newline at end of file
Added: trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner-expected.txt (0 => 120750)
--- trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner-expected.txt 2012-06-19 21:00:09 UTC (rev 120750)
@@ -0,0 +1 @@
+
Added: trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner.html (0 => 120750)
--- trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner.html (rev 0)
+++ trunk/LayoutTests/compositing/overflow/scrollbars-with-clipped-owner.html 2012-06-19 21:00:09 UTC (rev 120750)
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style>
+ body {
+ margin: 0px;
+ overflow:hidden;
+ }
+
+ #outer-scrollable {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ right: 0px;
+ bottom: 0px;
+ overflow: scroll;
+ }
+
+ #tall {
+ height: 1000px;
+ }
+
+ #inner-scrollable {
+ position: relative;
+ overflow: auto;
+ width: 200px;
+ height: 200px;
+ z-index: 0;
+ }
+
+ #content {
+ width: 300px;
+ height: 300px;
+ background-color: blue;
+ margin: 0px;
+ -webkit-transform:translateZ(0);
+ }
+ </style>
+ <script>
+ function doTest() {
+ if (window.testRunner)
+ testRunner.dumpAsText(true);
+
+ // This test succeeds if the scrollbars on the inner-scrollable
+ // are positioned properly.
+ var scroller = document.getElementById("outer-scrollable");
+ scroller.scrollTop = 100;
+ }
+ window.addEventListener("load", doTest, false);
+ </script>
+ </head>
+ <body>
+ <div id="outer-scrollable">
+ <div id="tall">
+ <div id="inner-scrollable">
+ <div id="content"></div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (120749 => 120750)
--- trunk/Source/WebCore/ChangeLog 2012-06-19 20:13:45 UTC (rev 120749)
+++ trunk/Source/WebCore/ChangeLog 2012-06-19 21:00:09 UTC (rev 120750)
@@ -1,3 +1,20 @@
+2012-06-19 Adrienne Walker <[email protected]>
+
+ Fix scrollbar layers being misplaced with a clipped owner layer
+ https://bugs.webkit.org/show_bug.cgi?id=89486
+
+ Reviewed by Simon Fraser.
+
+ Scrollbar layers are positioned relative to their parent layer. If
+ that parent gets clipped, then that positioning becomes incorrect and
+ scrollbars get positioned relative to the clipped bounds instead of
+ the full bounds. Fix by not clipping in this case.
+
+ Test: compositing/overflow/scrollbars-with-clipped-owner.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
+
2012-06-19 Shinya Kawanaka <[email protected]>
[Shadow][Editing] applying document.execCommand('bold') twice to elements having shadow insertion points causes a crash.
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (120749 => 120750)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-06-19 20:13:45 UTC (rev 120749)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-06-19 21:00:09 UTC (rev 120750)
@@ -244,6 +244,10 @@
bool RenderLayerBacking::shouldClipCompositedBounds() const
{
+ // Scrollbar layers use this layer for relative positioning, so don't clip.
+ if (layerForHorizontalScrollbar() || layerForVerticalScrollbar())
+ return false;
+
if (m_usingTiledCacheLayer)
return true;
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
