Title: [125107] branches/safari-536.26-branch/Source/WebCore

Diff

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (125106 => 125107)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-08 23:19:42 UTC (rev 125106)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-08 23:23:36 UTC (rev 125107)
@@ -1,5 +1,41 @@
 2012-08-07  Lucas Forschler  <[email protected]>
 
+    Merge 124811
+
+    2012-08-06  Beth Dakin  <[email protected]>
+
+            https://bugs.webkit.org/show_bug.cgi?id=93199
+            REGRESSION (r124489): Crash in FrameView::scrollContentsFastPath when 
+            scrolling Facebook and Google image search
+            -and corresponding-
+            <rdar://problem/12035066>
+
+            Reviewed by Anders Carlsson.
+
+            As the comment in setShouldUpdateScrollLayerPositionOnMainThread() 
+            indicates, the goal of adding a call to 
+            updateMainFrameScrollPositionAndScrollLayerPosition() within that 
+            function was just to make sure the layer position was up-to-date 
+            since that is what is not kept up to date when scrolling is happening 
+            on the scrolling thread. So I'm fixing this crash by having that code 
+            ONLY update the layer position instead of also updating the scroll 
+            position, since it was updating the scroll position that led to this 
+            crash.
+
+            New function updateMainFrameScrollLayerPosition() will update JUST 
+            the layer position.
+            * page/scrolling/ScrollingCoordinator.h:
+            (ScrollingCoordinator):        
+            * page/scrolling/ScrollingCoordinator.cpp:
+            (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPosition):
+
+            Update just the layer position here instead of the layer position and 
+            the scroll position.
+            (WebCore)::
+            (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+
+2012-08-07  Lucas Forschler  <[email protected]>
+
     Merge 124102
 
     2012-07-30  Anders Carlsson  <[email protected]>

Modified: branches/safari-536.26-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (125106 => 125107)


--- branches/safari-536.26-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-08-08 23:19:42 UTC (rev 125106)
+++ branches/safari-536.26-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-08-08 23:23:36 UTC (rev 125107)
@@ -288,6 +288,23 @@
     frameView->setConstrainsScrollingToContentEdge(true);
 }
 
+void ScrollingCoordinator::updateMainFrameScrollLayerPosition()
+{
+#if USE(ACCELERATED_COMPOSITING) && ENABLE(THREADED_SCROLLING)
+    ASSERT(isMainThread());
+
+    if (!m_page)
+        return;
+
+    FrameView* frameView = m_page->mainFrame()->view();
+    if (!frameView)
+        return;
+
+    if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(frameView))
+        scrollLayer->setPosition(-frameView->scrollPosition());
+#endif
+}
+
 void ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition()
 {
 #if USE(ACCELERATED_COMPOSITING) && ENABLE(THREADED_SCROLLING)
@@ -395,7 +412,7 @@
     // at this point. So we'll update it before we switch back to main thread scrolling
     // in order to avoid layer positioning bugs.
     if (shouldUpdateScrollLayerPositionOnMainThread)
-        updateMainFrameScrollPositionAndScrollLayerPosition();
+        updateMainFrameScrollLayerPosition();
     m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThread(shouldUpdateScrollLayerPositionOnMainThread);
     scheduleTreeStateCommit();
 }

Modified: branches/safari-536.26-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.h (125106 => 125107)


--- branches/safari-536.26-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.h	2012-08-08 23:19:42 UTC (rev 125106)
+++ branches/safari-536.26-branch/Source/WebCore/page/scrolling/ScrollingCoordinator.h	2012-08-08 23:23:36 UTC (rev 125107)
@@ -145,6 +145,8 @@
     void setWheelEventHandlerCount(unsigned);
     void setShouldUpdateScrollLayerPositionOnMainThread(bool);
 
+    void updateMainFrameScrollLayerPosition();
+
     Page* m_page;
 
     bool m_forceMainThreadScrollLayerPositionUpdates;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to