Unnecessary and incorrect invalidation about composited fixed-position layers
authorwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 20:04:02 +0000 (20:04 +0000)
committerwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 20:04:02 +0000 (20:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=75638

When a FrameView scrolls, composited fixed-position layers should
not contribute to the invalidation rect of the root layer.

Reviewed by Simon Fraser.

No new tests. Haven't found a good way to test this programatically.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107270 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp

index ab7141b..9c3695d 100644 (file)
@@ -1,3 +1,18 @@
+2012-02-09  Xianzhu Wang  <wangxianzhu@chromium.org>
+
+        Unnecessary and incorrect invalidation about composited fixed-position layers
+        https://bugs.webkit.org/show_bug.cgi?id=75638
+
+        When a FrameView scrolls, composited fixed-position layers should
+        not contribute to the invalidation rect of the root layer.
+
+        Reviewed by Simon Fraser.
+
+        No new tests. Haven't found a good way to test this programatically.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollContentsFastPath):
+
 2012-02-09  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r107035.
index baba068..e816ca0 100644 (file)
@@ -1463,6 +1463,10 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
         RenderBox* renderBox = *it;
         if (renderBox->style()->position() != FixedPosition)
             continue;
+#if USE(ACCELERATED_COMPOSITING)
+        if (renderBox->layer()->isComposited())
+            continue;
+#endif
         IntRect updateRect = renderBox->layer()->repaintRectIncludingDescendants();
         updateRect = contentsToRootView(updateRect);
         if (!isCompositedContentLayer && clipsRepaints())