From 7d1b0e098627c78968491d1a5530f0f3ae9ae776 Mon Sep 17 00:00:00 2001 From: "achicu@adobe.com" Date: Wed, 27 Jun 2012 17:38:05 +0000 Subject: [PATCH] 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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121348 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 17 ++++++ .../css3/filters/blur-filter-page-scroll.html | 59 +++++++++++++++++++++ LayoutTests/platform/chromium/TestExpectations | 1 + .../filters/blur-filter-page-scroll-expected.png | Bin 0 -> 3469 bytes .../filters/blur-filter-page-scroll-expected.txt | 13 +++++ .../filters/blur-filter-page-scroll-expected.png | Bin 0 -> 3467 bytes .../filters/blur-filter-page-scroll-expected.txt | 12 +++++ Source/WebCore/ChangeLog | 16 ++++++ Source/WebCore/page/FrameView.cpp | 10 ++++ 9 files changed, 128 insertions(+) create mode 100644 LayoutTests/css3/filters/blur-filter-page-scroll.html create mode 100644 LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.png create mode 100644 LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt create mode 100644 LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.png create mode 100644 LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.txt diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index d1f5ea3..d85e7ec 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,20 @@ +2012-06-27 Alexandru Chiculita + + 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 Unexpected end of style sheet in @font-face rule discards it rather than closes all open constructs diff --git a/LayoutTests/css3/filters/blur-filter-page-scroll.html b/LayoutTests/css3/filters/blur-filter-page-scroll.html new file mode 100644 index 0000000..d9d0045 --- /dev/null +++ b/LayoutTests/css3/filters/blur-filter-page-scroll.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + +
+
+
+
+
+ + diff --git a/LayoutTests/platform/chromium/TestExpectations b/LayoutTests/platform/chromium/TestExpectations index f165e2f..235f240 100644 --- a/LayoutTests/platform/chromium/TestExpectations +++ b/LayoutTests/platform/chromium/TestExpectations @@ -2727,6 +2727,7 @@ BUGWK82783 SKIP : css3/filters/filter-repaint.html = PASS 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 diff --git a/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.png b/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..96117aa1cc85bf2870ab20542165cbe574fa0120 GIT binary patch literal 3469 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRznkB9gCCM47$=SuFxeR8; z2IfgdhRKO3iHS*x1_r5#X^DoZ$p*%0$!P{A$!2RVW_<)2ChzIu7*a9k?VXLe!i*Aa z5A9zp(O}ec5(w{LePPtN{DgpH+sv4aj?*{-Soj6F1Z0IiMdo*Wwdq~``|H;Ae$O|b z-@e`d`|i6ob~Zc=3p?%mD#I^T^yr>5?fPq0l*@1zfp@#t|YBZb$H`{y% zM%#nbn{Uh5?O*e9FfdFIRA69maBBbxOENMsFr=^ycfpyd=hB}grRmMD2Bz%~@w;ct z{9LL&ZRfn1{l=evaWn(d!R4=cY3r`fjd*tW%%2%Ek1O*4!^Q9V)id+!EG`($o(W7) zw;$(##I682XHGF#&X2!eZzG#73`}8*^wPhYEBs^S9$_hKgk+#mZw~u1ax{u*5XEOc z-C+intkY9>-RyxnL2;BTu0k`K^tI;oWax8&t;uc GLK6UaJq@4$ literal 0 HcmV?d00001 diff --git a/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt b/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt new file mode 100644 index 0000000..625ff2f --- /dev/null +++ b/LayoutTests/platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt @@ -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 diff --git a/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.png b/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..ea3c7792281fd34369c56d34a2b6a48c68a93940 GIT binary patch literal 3467 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRznkB9gCCM47$=SuFxeUoE z=1Hb$DTyY@DVAnthK9xlX{i<|7AA=%mS%>=CdQxJ#J2$rll63Q45^s&_V&iCDS-kF z7kAFK*Hi4h8kM=Y|KV@@Gfhez2?3GaSKMyI?we5HSKpp#-?rOs|Nnwtg*NBrx3@Dg zF#MQ4`)}Pl{`Q@JzkGZndHcHM+3l8R*IULGnldmv*t&D>OJK@;3+O&OVdVaGr zFnpNu_spF$F(L}Pwcj!Ux$#Ua3=AhY1Q-|;lpPot8hRLj#u^Q0!OgbcfgV3_y2wWE zeBEm%AUlPHgMnd!ATUxL+!}z9Dakn81=FJQ)2`h;Gf4>;5W?5$()RAmIkxRx+O@xD z^6KX<1tx>*nYsPPyDjJ1CrAIDdH3&`U$tBJ0)@jfw%f)zK70Ptc-zj{&EK-Go!xaS z324Ua&D%_ick6La*gE_8`WOE|f#`oT_Fs8S*@y_v5t3>~y*ca)hS4adZ4}>}R}HLR zAEa8!@TKoBWgPBx?Fea7jCym}w;D&In7&b5&vNF(Y6LlEKr}&t;ucLK6VG CKNL#< literal 0 HcmV?d00001 diff --git a/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.txt b/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.txt new file mode 100644 index 0000000..bb2c703 --- /dev/null +++ b/LayoutTests/platform/mac/css3/filters/blur-filter-page-scroll-expected.txt @@ -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 diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index bc9e43f..a391149 100755 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,19 @@ +2012-06-27 Alexandru Chiculita + + 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 REGRESSION(r121296): New zero-size background tests asserting on Mac. diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp index bea7e28..2cecc02 100644 --- a/Source/WebCore/page/FrameView.cpp +++ b/Source/WebCore/page/FrameView.cpp @@ -1462,6 +1462,16 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect 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()) -- 2.7.4