Title: [108434] trunk/Source/WebCore
- Revision
- 108434
- Author
- [email protected]
- Date
- 2012-02-21 19:11:59 -0800 (Tue, 21 Feb 2012)
Log Message
Background jitters on pages with background-attachment: fixed
https://bugs.webkit.org/show_bug.cgi?id=79182
Reviewed by Dan Bernstein.
Make sure to update the main frame scroll position before updating the scrolling layer.
This also fixes a (purely theoretical) bug where we wouldn't be updating the main frame
position if the main frame didn't have a scroll layer.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (108433 => 108434)
--- trunk/Source/WebCore/ChangeLog 2012-02-22 02:58:54 UTC (rev 108433)
+++ trunk/Source/WebCore/ChangeLog 2012-02-22 03:11:59 UTC (rev 108434)
@@ -1,3 +1,17 @@
+2012-02-21 Anders Carlsson <[email protected]>
+
+ Background jitters on pages with background-attachment: fixed
+ https://bugs.webkit.org/show_bug.cgi?id=79182
+
+ Reviewed by Dan Bernstein.
+
+ Make sure to update the main frame scroll position before updating the scrolling layer.
+ This also fixes a (purely theoretical) bug where we wouldn't be updating the main frame
+ position if the main frame didn't have a scroll layer.
+
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
+
2012-02-21 Dana Jansens <[email protected]>
Early-out in Region::unite() for adding an empty region.
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (108433 => 108434)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-02-22 02:58:54 UTC (rev 108433)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-02-22 03:11:59 UTC (rev 108434)
@@ -266,15 +266,16 @@
{
#if USE(ACCELERATED_COMPOSITING)
FrameView* frameView = m_page->mainFrame()->view();
- GraphicsLayer* scrollLayer = scrollLayerForFrameView(frameView);
- if (!scrollLayer)
- return;
- scrollLayer->setPosition(-frameView->scrollPosition());
+ // Make sure to update the main frame scroll position before changing the scroll layer position,
+ // otherwise we'll introduce jittering on pages with slow repaint objects (like background-attachment: fixed).
frameView->updateCompositingLayers();
frameView->setConstrainsScrollingToContentEdge(false);
frameView->notifyScrollPositionChanged(scrollPosition);
frameView->setConstrainsScrollingToContentEdge(true);
+
+ if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(frameView))
+ scrollLayer->setPosition(-frameView->scrollPosition());
#endif
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes