Title: [121348] trunk
Revision
121348
Author
[email protected]
Date
2012-06-27 10:38:05 -0700 (Wed, 27 Jun 2012)

Log Message

Blur filter causes issues when scrolling
https://bugs.webkit.org/show_bug.cgi?id=89475

Reviewed by Simon Fraser.

Source/WebCore:

This patch disables the fast scrolling when there is a fixed postioned element that
has a filter applied on its parent layer. Otherwise the scroll blitting will just
copy the outsets of the blur effect.

Test: css3/filters/blur-filter-page-scroll.html

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

LayoutTests:

Checking that the fixed positioned element repaints correctly when there is a blur filter
applied on its parent layer.

* css3/filters/blur-filter-page-scroll.html: Added.
* platform/chromium/css3/filters/blur-filter-page-scroll-expected.png: Added.
* platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt: Added.
* platform/chromium/TestExpectations: The new test needs to be checked on Windows.
* platform/mac/css3/filters/blur-filter-page-scroll-expected.png: Added.
* platform/mac/css3/filters/blur-filter-page-scroll-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (121347 => 121348)


--- trunk/LayoutTests/ChangeLog	2012-06-27 17:22:30 UTC (rev 121347)
+++ trunk/LayoutTests/ChangeLog	2012-06-27 17:38:05 UTC (rev 121348)
@@ -1,3 +1,20 @@
+2012-06-27  Alexandru Chiculita  <[email protected]>
+
+        Blur filter causes issues when scrolling
+        https://bugs.webkit.org/show_bug.cgi?id=89475
+
+        Reviewed by Simon Fraser.
+
+        Checking that the fixed positioned element repaints correctly when there is a blur filter
+        applied on its parent layer.
+
+        * css3/filters/blur-filter-page-scroll.html: Added.
+        * platform/chromium/css3/filters/blur-filter-page-scroll-expected.png: Added.
+        * platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt: Added.
+        * platform/chromium/TestExpectations: The new test needs to be checked on Windows.
+        * platform/mac/css3/filters/blur-filter-page-scroll-expected.png: Added.
+        * platform/mac/css3/filters/blur-filter-page-scroll-expected.txt: Added.
+
 2012-06-27  Alexander Pavlov  <[email protected]>
 
         Unexpected end of style sheet in @font-face rule discards it rather than closes all open constructs

Added: trunk/LayoutTests/css3/filters/blur-filter-page-scroll.html (0 => 121348)


--- trunk/LayoutTests/css3/filters/blur-filter-page-scroll.html	                        (rev 0)
+++ trunk/LayoutTests/css3/filters/blur-filter-page-scroll.html	2012-06-27 17:38:05 UTC (rev 121348)
@@ -0,0 +1,59 @@
+<!-- This test asserts that blit-scrolling is disabled when blur is applied on a layer 
+    that contains a fixed positioned object.
+    One fixed black bar should be visible at the top of the page. The page should be scrolled
+    100px and no red should be visible. The rest of the page should be green.
+ -->
+<!DOCTYPE html>
+<html>
+    <head>
+        <script>
+            if (window.testRunner) {
+                // Force software rendering mode.
+                window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
+            }
+        </script>
+        <!-- Make sure the mock scrollbars are enabled after the call to overridePreference, otherwise the setting will be overwritten. -->
+        <script src=""
+        <style>
+            body {
+                margin: 0px;
+                border: 0px;
+                padding: 0px;
+            }
+
+            .blur {
+                -webkit-filter: blur(1px);
+            }
+
+            #fixedBox {
+                position: fixed;
+                background-color: #000000;
+                height: 100px;
+                width: 100%;
+            }
+
+            #redBox {
+                background-color: red; 
+                height: 200px;
+            }
+
+            #greenBox {
+                background-color: green;
+                height: 1000px;
+            }
+        </style>
+        <script src=""
+        <script type="text/_javascript_">
+            function repaintTest() {
+                window.scrollTo(0, 100);
+            }
+        </script>
+    </head>
+    <body _onload_="runRepaintTest()">
+        <div class="blur">
+            <div id="fixedBox"></div>
+            <div id="redBox"></div>
+            <div id="greenBox"></div>
+        </div>
+    </body>
+</html>

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (121347 => 121348)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-06-27 17:22:30 UTC (rev 121347)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-06-27 17:38:05 UTC (rev 121348)
@@ -2727,6 +2727,7 @@
 BUGWK82783 SKIP : css3/filters/filter-with-transform.html = PASS
 BUGWK82783 SKIP : css3/filters/filter-repaint-sepia.html = PASS
 BUGWK82783 SKIP : css3/filters/nested-filter.html = PASS
+BUGWK82783 SKIP WIN : css3/filters/blur-filter-page-scroll.html = PASS
 
 // Following tests need baselines on Win and Linux
 BUGWK84800 SKIP WIN LINUX : css3/filters/custom/filter-repaint-custom-clipped.html = PASS

Added: trunk/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.png (0 => 121348)


--- trunk/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.png	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.png	2012-06-27 17:38:05 UTC (rev 121348)
@@ -0,0 +1,8 @@
+\x89PNG
+
+
+IHDR X\x9Av\x82p)tEXtchecksum6307b21cadaaba00eafa1ec03fcf04c6\xAC\xD1j\xF1
+IDATx\x9C\xEDܱm\x86\xE1?\xE8\xA4()BW\x88\xE82\x81\xA7\xC8\x86\x99\\xB1A\x96P
+\xF2Yo\x88\xF5<\x8D\xAB\xFB\xF5\xB5\xAFN\xE7\xB3Ϸ\xB7O\xF7\xBB\xDD<><\xC0\xDF\m6\xF3i\xBB\x9D\x9B\xBB\xBB\x83o,\xF73\xF3ef\xBEmp\x8A\xDE\xFF\xFE\xBDYqc\xD9\xCF\xCC\xF7\x99\xF9\xBA~p\xC2\xCEff\xBF\xF2ƫc\xF8\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 \xB3<\xF7\xE0e\xD9\xEDv?\xEB
+\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x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xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\xCC\xF2\xDC\x80\x97e\xBB\xDD\xFC\xAC7 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @\xE6'\x8B\x88\x86\xEF<IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt (0 => 121348)


--- trunk/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt	2012-06-27 17:38:05 UTC (rev 121348)
@@ -0,0 +1,13 @@
+CONSOLE MESSAGE: Invalid name for preference: WebKitAcceleratedCompositingEnabled
+layer at (0,0) size 785x1200
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x1200
+  RenderBlock {HTML} at (0,0) size 785x1200
+    RenderBody {BODY} at (0,0) size 785x1200
+layer at (0,0) size 785x1200
+  RenderBlock {DIV} at (0,0) size 785x1200
+    RenderBlock {DIV} at (0,0) size 785x200 [bgcolor=#FF0000]
+    RenderBlock {DIV} at (0,200) size 785x1000 [bgcolor=#008000]
+layer at (0,100) size 785x100
+  RenderBlock (positioned) {DIV} at (0,0) size 785x100 [bgcolor=#000000]
+scrolled to 0,100

Added: trunk/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.png (0 => 121348)


--- trunk/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.png	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.png	2012-06-27 17:38:05 UTC (rev 121348)
@@ -0,0 +1,6 @@
+\x89PNG
+
+
+IHDR X\x9Av\x82p)tEXtchecksumcd7b5fda4cd9661130fe8d84a4961343\xF3\x86\xB6
+IDATx\x9C\xED۱j\x94Q\x80ѹ\x9B?.!\x8D\xD5Zi\xA3\x8F\xE1\xFB?̂"\x88`PY\x8B\xD4F\xD8]\xBE\x90pN\x87i?\x86\xBB>\xBF\xFFp\xFAq<Ο\x87\x87\xF8\x97\x9B\xFD~\xEE\x87\xB9\xFD\xF4\xF1\xEC\xDB\xD79ͷ9ͯ9]q5൹\x9DӼ\x9DӼ\xBB`\xC6\xF6}f\xBĚ\xFB\xF0\x94\xFD\xCC\xDC\xCC\ \xBB+\xED\xF0_\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 \xB3=\xF7\xC0\xCBr<\xCF~\xEBd\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @f[of\xD6\xDD̒"\xC0\xD6~f\xBD\xB9lƶ\xEEf\xD6\xFD\xCCn\x9D\xA5\x80\xD7im\x8FNj9\x9D?c[\xFB\x99\xDD\xFD\xCC\xFA}\xB5\xBD\x80Wh\xB7=^A\xE6\xE7\xF93\xB6\xB9]\xB3\xF6k\xD6ͺ\xDAb\xC0볶5s\xBB.\x90\xB5\x9Bǯ\xE8\xFE\x80O\xD9]\xFEw\vd\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90ٞ{\xE0e9g\xBFu2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2Қ
+0\x9A2IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.txt (0 => 121348)


--- trunk/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.txt	2012-06-27 17:38:05 UTC (rev 121348)
@@ -0,0 +1,12 @@
+layer at (0,0) size 785x1200
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x1200
+  RenderBlock {HTML} at (0,0) size 785x1200
+    RenderBody {BODY} at (0,0) size 785x1200
+layer at (0,0) size 785x1200
+  RenderBlock {DIV} at (0,0) size 785x1200
+    RenderBlock {DIV} at (0,0) size 785x200 [bgcolor=#FF0000]
+    RenderBlock {DIV} at (0,200) size 785x1000 [bgcolor=#008000]
+layer at (0,100) size 785x100
+  RenderBlock (positioned) {DIV} at (0,0) size 785x100 [bgcolor=#000000]
+scrolled to 0,100

Modified: trunk/Source/WebCore/ChangeLog (121347 => 121348)


--- trunk/Source/WebCore/ChangeLog	2012-06-27 17:22:30 UTC (rev 121347)
+++ trunk/Source/WebCore/ChangeLog	2012-06-27 17:38:05 UTC (rev 121348)
@@ -1,3 +1,19 @@
+2012-06-27  Alexandru Chiculita  <[email protected]>
+
+        Blur filter causes issues when scrolling
+        https://bugs.webkit.org/show_bug.cgi?id=89475
+
+        Reviewed by Simon Fraser.
+
+        This patch disables the fast scrolling when there is a fixed postioned element that
+        has a filter applied on its parent layer. Otherwise the scroll blitting will just
+        copy the outsets of the blur effect.
+
+        Test: css3/filters/blur-filter-page-scroll.html
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollContentsFastPath):
+
 2012-06-27  Andreas Kling  <[email protected]>
 
         REGRESSION(r121296): New zero-size background tests asserting on Mac.

Modified: trunk/Source/WebCore/page/FrameView.cpp (121347 => 121348)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-06-27 17:22:30 UTC (rev 121347)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-06-27 17:38:05 UTC (rev 121348)
@@ -1462,6 +1462,16 @@
         if (renderBox->isComposited())
             continue;
 #endif
+#if ENABLE(CSS_FILTERS)
+        if (renderBox->layer() && renderBox->layer()->parent()) {
+            RenderBoxModelObject* renderer = renderBox->layer()->parent()->renderer();
+            if (renderer->style()->hasFilterOutsets()) {
+                // If the fixed layer has a blur/drop-shadow filter applied on its parent, we cannot 
+                // scroll using the fast path, otherwise the outsets of the filter will be moved around the page.
+                return false;
+            }
+        }
+#endif
         IntRect updateRect = pixelSnappedIntRect(renderBox->layer()->repaintRectIncludingNonCompositingDescendants());
         updateRect = contentsToRootView(updateRect);
         if (!isCompositedContentLayer && clipsRepaints())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to