Title: [128132] trunk/Source
Revision
128132
Author
[email protected]
Date
2012-09-10 17:12:38 -0700 (Mon, 10 Sep 2012)

Log Message

Unreviewed, rolling out r127837.
http://trac.webkit.org/changeset/127837
https://bugs.webkit.org/show_bug.cgi?id=93898

Broke ScrollingCoordinator on chromium

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::hasNonLayerFixedObjects):
(WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* page/scrolling/ScrollingCoordinatorNone.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollingPeformanceLoggingEnabled):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::ScrollingTreeNode):
(WebCore::ScrollingTreeNode::update):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread):
(ScrollingTreeNode):
* page/scrolling/ScrollingTreeState.cpp:
(WebCore::ScrollingTreeState::ScrollingTreeState):
(WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingTreeState.h:
(WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread):
(ScrollingTreeState):
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/mac/ScrollingTreeMac.mm:
(WebCore::ScrollingTree::updateDebugRootLayer):
* page/scrolling/mac/ScrollingTreeNodeMac.mm:
(WebCore::ScrollingTreeNodeMac::update):
(WebCore::ScrollingTreeNodeMac::scrollPosition):
(WebCore::ScrollingTreeNodeMac::setScrollPosition):
(WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):

Source/WebKit2:

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (128131 => 128132)


--- trunk/Source/WebCore/ChangeLog	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/ChangeLog	2012-09-11 00:12:38 UTC (rev 128132)
@@ -1,3 +1,50 @@
+2012-09-10  James Robinson  <[email protected]>
+
+        Unreviewed, rolling out r127837.
+        http://trac.webkit.org/changeset/127837
+        https://bugs.webkit.org/show_bug.cgi?id=93898
+
+        Broke ScrollingCoordinator on chromium
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
+        (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
+        (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
+        (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects):
+        (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread):
+        (WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates):
+        (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+        * page/scrolling/ScrollingCoordinator.h:
+        (ScrollingCoordinator):
+        * page/scrolling/ScrollingCoordinatorNone.cpp:
+        (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+        * page/scrolling/ScrollingTree.cpp:
+        (WebCore::ScrollingTree::scrollingPeformanceLoggingEnabled):
+        * page/scrolling/ScrollingTree.h:
+        * page/scrolling/ScrollingTreeNode.cpp:
+        (WebCore::ScrollingTreeNode::ScrollingTreeNode):
+        (WebCore::ScrollingTreeNode::update):
+        * page/scrolling/ScrollingTreeNode.h:
+        (WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread):
+        (ScrollingTreeNode):
+        * page/scrolling/ScrollingTreeState.cpp:
+        (WebCore::ScrollingTreeState::ScrollingTreeState):
+        (WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread):
+        * page/scrolling/ScrollingTreeState.h:
+        (WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread):
+        (ScrollingTreeState):
+        * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
+        (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+        * page/scrolling/mac/ScrollingTreeMac.mm:
+        (WebCore::ScrollingTree::updateDebugRootLayer):
+        * page/scrolling/mac/ScrollingTreeNodeMac.mm:
+        (WebCore::ScrollingTreeNodeMac::update):
+        (WebCore::ScrollingTreeNodeMac::scrollPosition):
+        (WebCore::ScrollingTreeNodeMac::setScrollPosition):
+        (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
+        (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):
+
 2012-09-10  Philip Rogers  <[email protected]>
 
         Remove unnecessary codepaths in SMILTimeContainer::updateAnimations

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (128131 => 128132)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-09-11 00:12:38 UTC (rev 128132)
@@ -511,7 +511,7 @@
 		1AAADDA314DB409F00AF64B3 /* ScrollingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */; };
 		1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1AAADDBE14DC640700AF64B3 /* ScrollingTreeState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDBC14DC640600AF64B3 /* ScrollingTreeState.cpp */; };
-		1AAADDBF14DC640700AF64B3 /* ScrollingTreeState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDBD14DC640600AF64B3 /* ScrollingTreeState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		1AAADDBF14DC640700AF64B3 /* ScrollingTreeState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDBD14DC640600AF64B3 /* ScrollingTreeState.h */; };
 		1AAADDDA14DC74EC00AF64B3 /* ScrollingTreeStateMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDD814DC74EC00AF64B3 /* ScrollingTreeStateMac.mm */; };
 		1AAADDE314DC8C8F00AF64B3 /* ScrollingTreeNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDE114DC8C8F00AF64B3 /* ScrollingTreeNode.cpp */; };
 		1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDE214DC8C8F00AF64B3 /* ScrollingTreeNode.h */; };

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-09-11 00:12:38 UTC (rev 128132)
@@ -36,6 +36,7 @@
 #include "Region.h"
 #include "RenderView.h"
 #include "ScrollAnimator.h"
+#include "ScrollingTreeState.h"
 #include <wtf/MainThread.h>
 
 #if USE(ACCELERATED_COMPOSITING)
@@ -45,7 +46,6 @@
 #if ENABLE(THREADED_SCROLLING)
 #include "ScrollingThread.h"
 #include "ScrollingTree.h"
-#include "ScrollingTreeState.h"
 #include <wtf/Functional.h>
 #include <wtf/PassRefPtr.h>
 #endif
@@ -192,7 +192,7 @@
     if (!coordinatesScrollingForFrameView(frameView))
         return;
 
-    updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+    updateShouldUpdateScrollLayerPositionOnMainThread();
 }
 
 void ScrollingCoordinator::frameViewFixedObjectsDidChange(FrameView* frameView)
@@ -203,7 +203,7 @@
     if (!coordinatesScrollingForFrameView(frameView))
         return;
 
-    updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+    updateShouldUpdateScrollLayerPositionOnMainThread();
 }
 
 static GraphicsLayer* scrollLayerForFrameView(FrameView* frameView)
@@ -232,7 +232,7 @@
 
     frameViewLayoutUpdated(frameView);
     recomputeWheelEventHandlerCount();
-    updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+    updateShouldUpdateScrollLayerPositionOnMainThread();
     setScrollLayer(scrollLayerForFrameView(frameView));
 }
 
@@ -359,7 +359,7 @@
     setWheelEventHandlerCount(wheelEventHandlerCount);
 }
 
-bool ScrollingCoordinator::hasNonLayerViewportConstrainedObjects(FrameView* frameView)
+bool ScrollingCoordinator::hasNonLayerFixedObjects(FrameView* frameView)
 {
     const FrameView::ViewportConstrainedObjectSet* viewportConstrainedObjects = frameView->viewportConstrainedObjects();
     if (!viewportConstrainedObjects)
@@ -380,26 +380,15 @@
 #endif
 }
 
-void ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThreadReason()
+void ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread()
 {
-#if ENABLE(THREADED_SCROLLING)
     FrameView* frameView = m_page->mainFrame()->view();
 
-    ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasonsForUpdatingScrollLayerPositionOnMainThread = (ReasonForUpdatingScrollLayerPositionOnMainThreadFlags)0;
-
-    if (m_forceMainThreadScrollLayerPositionUpdates)
-        reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::ForcedOnMainThread;
-    if (frameView->hasSlowRepaintObjects())
-        reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasSlowRepaintObjects;
-    if (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects())
-        reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasNonCompositedViewportConstrainedObjects;
-    if (supportsFixedPositionLayers() && hasNonLayerViewportConstrainedObjects(frameView))
-        reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasNonLayerViewportConstrainedObjects;
-    if (m_page->mainFrame()->document()->isImageDocument())
-        reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::IsImageDocument;
-
-    setShouldUpdateScrollLayerPositionOnMainThreadReason(reasonsForUpdatingScrollLayerPositionOnMainThread);
-#endif
+    setShouldUpdateScrollLayerPositionOnMainThread(m_forceMainThreadScrollLayerPositionUpdates
+        || frameView->hasSlowRepaintObjects()
+        || (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects())
+        || (supportsFixedPositionLayers() && hasNonLayerFixedObjects(frameView))
+        || m_page->mainFrame()->document()->isImageDocument());
 }
 
 void ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates(bool forceMainThreadScrollLayerPositionUpdates)
@@ -408,7 +397,7 @@
         return;
 
     m_forceMainThreadScrollLayerPositionUpdates = forceMainThreadScrollLayerPositionUpdates;
-    updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+    updateShouldUpdateScrollLayerPositionOnMainThread();
 }
 
 #if ENABLE(THREADED_SCROLLING)
@@ -446,18 +435,16 @@
     scheduleTreeStateCommit();
 }
 
-#if ENABLE(THREADED_SCROLLING)
-void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons)
+void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool shouldUpdateScrollLayerPositionOnMainThread)
 {
     // The FrameView's GraphicsLayer is likely to be out-of-synch with the PlatformLayer
     // at this point. So we'll update it before we switch back to main thread scrolling
     // in order to avoid layer positioning bugs.
-    if (reasons)
+    if (shouldUpdateScrollLayerPositionOnMainThread)
         updateMainFrameScrollLayerPosition();
-    m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThreadReason(reasons);
+    m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThread(shouldUpdateScrollLayerPositionOnMainThread);
     scheduleTreeStateCommit();
 }
-#endif
 
 void ScrollingCoordinator::scheduleTreeStateCommit()
 {

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h	2012-09-11 00:12:38 UTC (rev 128132)
@@ -34,7 +34,6 @@
 #include <wtf/Forward.h>
 
 #if ENABLE(THREADED_SCROLLING)
-#include "ScrollingTreeState.h"
 #include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/Threading.h>
 #endif
@@ -132,8 +131,8 @@
     explicit ScrollingCoordinator(Page*);
 
     void recomputeWheelEventHandlerCount();
-    bool hasNonLayerViewportConstrainedObjects(FrameView*);
-    void updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+    bool hasNonLayerFixedObjects(FrameView*);
+    void updateShouldUpdateScrollLayerPositionOnMainThread();
 
     void setScrollLayer(GraphicsLayer*);
     void setNonFastScrollableRegion(const Region&);
@@ -156,9 +155,7 @@
 
     void setScrollParameters(const ScrollParameters&);
     void setWheelEventHandlerCount(unsigned);
-#if ENABLE(THREADED_SCROLLING)
-    void setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags);
-#endif
+    void setShouldUpdateScrollLayerPositionOnMainThread(bool);
 
     void updateMainFrameScrollLayerPosition();
 

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp	2012-09-11 00:12:38 UTC (rev 128132)
@@ -67,11 +67,9 @@
 {
 }
 
-#if ENABLE(THREADED_SCROLLING)
-void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags)
+void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool)
 {
 }
-#endif
 
 bool ScrollingCoordinator::supportsFixedPositionLayers() const
 {

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2012-09-11 00:12:38 UTC (rev 128132)
@@ -224,7 +224,7 @@
     m_scrollingPerformanceLoggingEnabled = flag;
 }
 
-bool ScrollingTree::scrollingPerformanceLoggingEnabled()
+bool ScrollingTree::scrollingPeformanceLoggingEnabled()
 {
     return m_scrollingPerformanceLoggingEnabled;
 }

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2012-09-11 00:12:38 UTC (rev 128132)
@@ -98,7 +98,7 @@
 #endif
 
     void setScrollingPerformanceLoggingEnabled(bool flag);
-    bool scrollingPerformanceLoggingEnabled();
+    bool scrollingPeformanceLoggingEnabled();
 
 private:
     explicit ScrollingTree(ScrollingCoordinator*);

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp	2012-09-11 00:12:38 UTC (rev 128132)
@@ -34,7 +34,7 @@
 
 ScrollingTreeNode::ScrollingTreeNode(ScrollingTree* scrollingTree)
     : m_scrollingTree(scrollingTree)
-    , m_shouldUpdateScrollLayerPositionOnMainThreadReason(0)
+    , m_shouldUpdateScrollLayerPositionOnMainThread(false)
     , m_horizontalScrollElasticity(ScrollElasticityNone)
     , m_verticalScrollElasticity(ScrollElasticityNone)
     , m_hasEnabledHorizontalScrollbar(false)
@@ -56,8 +56,8 @@
     if (state->changedProperties() & ScrollingTreeState::ContentsSize)
         m_contentsSize = state->contentsSize();
 
-    if (state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThreadReason)
-        m_shouldUpdateScrollLayerPositionOnMainThreadReason = state->shouldUpdateScrollLayerPositionOnMainThreadReason();
+    if (state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread)
+        m_shouldUpdateScrollLayerPositionOnMainThread = state->shouldUpdateScrollLayerPositionOnMainThread();
 
     if (state->changedProperties() & ScrollingTreeState::HorizontalScrollElasticity)
         m_horizontalScrollElasticity = state->horizontalScrollElasticity();

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2012-09-11 00:12:38 UTC (rev 128132)
@@ -30,7 +30,6 @@
 
 #include "IntRect.h"
 #include "ScrollTypes.h"
-#include "ScrollingTreeState.h"
 #include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
@@ -48,7 +47,7 @@
     virtual void handleWheelEvent(const PlatformWheelEvent&) = 0;
     virtual void setScrollPosition(const IntPoint&) = 0;
 
-    ReasonForUpdatingScrollLayerPositionOnMainThreadFlags shouldUpdateScrollLayerPositionOnMainThreadReason() const { return m_shouldUpdateScrollLayerPositionOnMainThreadReason; }
+    bool shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; }
 
 protected:
     explicit ScrollingTreeNode(ScrollingTree*);
@@ -75,7 +74,7 @@
     IntSize m_contentsSize;
     IntPoint m_scrollOrigin;
 
-    ReasonForUpdatingScrollLayerPositionOnMainThreadFlags m_shouldUpdateScrollLayerPositionOnMainThreadReason;
+    bool m_shouldUpdateScrollLayerPositionOnMainThread;
 
     ScrollElasticity m_horizontalScrollElasticity;
     ScrollElasticity m_verticalScrollElasticity;

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeState.cpp (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeState.cpp	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeState.cpp	2012-09-11 00:12:38 UTC (rev 128132)
@@ -38,7 +38,7 @@
 ScrollingTreeState::ScrollingTreeState()
     : m_changedProperties(0)
     , m_wheelEventHandlerCount(0)
-    , m_shouldUpdateScrollLayerPositionOnMainThreadReason(0)
+    , m_shouldUpdateScrollLayerPositionOnMainThread(false)
     , m_horizontalScrollElasticity(ScrollElasticityNone)
     , m_verticalScrollElasticity(ScrollElasticityNone)
     , m_hasEnabledHorizontalScrollbar(false)
@@ -88,13 +88,13 @@
     m_changedProperties |= WheelEventHandlerCount;
 }
 
-void ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons)
+void ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread(bool shouldUpdateScrollLayerPositionOnMainThread)
 {
-    if ((bool)m_shouldUpdateScrollLayerPositionOnMainThreadReason == (bool)reasons)
+    if (m_shouldUpdateScrollLayerPositionOnMainThread == shouldUpdateScrollLayerPositionOnMainThread)
         return;
 
-    m_shouldUpdateScrollLayerPositionOnMainThreadReason = reasons;
-    m_changedProperties |= ShouldUpdateScrollLayerPositionOnMainThreadReason;
+    m_shouldUpdateScrollLayerPositionOnMainThread = shouldUpdateScrollLayerPositionOnMainThread;
+    m_changedProperties |= ShouldUpdateScrollLayerPositionOnMainThread;
 }
 
 void ScrollingTreeState::setHorizontalScrollElasticity(ScrollElasticity horizontalScrollElasticity)

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeState.h (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeState.h	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeState.h	2012-09-11 00:12:38 UTC (rev 128132)
@@ -40,8 +40,6 @@
 
 namespace WebCore {
 
-typedef unsigned ReasonForUpdatingScrollLayerPositionOnMainThreadFlags;
-
 // The ScrollingTreeState object keeps track of the current state of scrolling related properties.
 // Whenever any properties change, the scrolling coordinator will be informed and will update the state
 // and schedule a timer that will clone the new state and send it over to the scrolling thread, avoiding locking.
@@ -56,7 +54,7 @@
         ContentsSize = 1 << 1,
         NonFastScrollableRegion = 1 << 2,
         WheelEventHandlerCount = 1 << 3,
-        ShouldUpdateScrollLayerPositionOnMainThreadReason = 1 << 4,
+        ShouldUpdateScrollLayerPositionOnMainThread = 1 << 4,
         HorizontalScrollElasticity = 1 << 5,
         VerticalScrollElasticity = 1 << 6,
         HasEnabledHorizontalScrollbar = 1 << 7,
@@ -68,14 +66,6 @@
         RequestedScrollPosition = 1 << 13,
     };
 
-    enum ReasonForUpdatingScrollLayerPositionOnMainThread {
-        ForcedOnMainThread = 1 << 0,
-        HasSlowRepaintObjects = 1 << 1,
-        HasNonCompositedViewportConstrainedObjects = 1 << 2,
-        HasNonLayerViewportConstrainedObjects = 1 << 3,
-        IsImageDocument = 1 << 4
-    };
-
     bool hasChangedProperties() const { return m_changedProperties; }
     unsigned changedProperties() const { return m_changedProperties; }
 
@@ -91,8 +81,8 @@
     unsigned wheelEventHandlerCount() const { return m_wheelEventHandlerCount; }
     void setWheelEventHandlerCount(unsigned);
 
-    ReasonForUpdatingScrollLayerPositionOnMainThreadFlags shouldUpdateScrollLayerPositionOnMainThreadReason() const { return m_shouldUpdateScrollLayerPositionOnMainThreadReason; }
-    void setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags);
+    bool shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; }
+    void setShouldUpdateScrollLayerPositionOnMainThread(bool);
 
     ScrollElasticity horizontalScrollElasticity() const { return m_horizontalScrollElasticity; }
     void setHorizontalScrollElasticity(ScrollElasticity);
@@ -136,7 +126,7 @@
 
     unsigned m_wheelEventHandlerCount;
 
-    ReasonForUpdatingScrollLayerPositionOnMainThreadFlags m_shouldUpdateScrollLayerPositionOnMainThreadReason;
+    bool m_shouldUpdateScrollLayerPositionOnMainThread;
 
     ScrollElasticity m_horizontalScrollElasticity;
     ScrollElasticity m_verticalScrollElasticity;

Modified: trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-09-11 00:12:38 UTC (rev 128132)
@@ -223,15 +223,13 @@
         m_private->scrollLayer()->setHaveWheelEventHandlers(wheelEventHandlerCount > 0);
 }
 
-#if ENABLE(THREADED_SCROLLING)
-void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons)
+void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool should)
 {
     // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves.
     setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
     if (m_private->scrollLayer())
-        m_private->scrollLayer()->setShouldScrollOnMainThread(reasons);
+        m_private->scrollLayer()->setShouldScrollOnMainThread(should);
 }
-#endif
 
 bool ScrollingCoordinator::supportsFixedPositionLayers() const
 {

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm	2012-09-11 00:12:38 UTC (rev 128132)
@@ -62,7 +62,7 @@
 
     RetainPtr<CGColorRef> backgroundColor;
 
-    if (m_rootNode->shouldUpdateScrollLayerPositionOnMainThreadReason())
+    if (m_rootNode->shouldUpdateScrollLayerPositionOnMainThread())
         backgroundColor = adoptCF(CGColorCreateGenericRGB(1, 0, 0, .7));
 
     {

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm (128131 => 128132)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm	2012-09-11 00:12:38 UTC (rev 128132)
@@ -37,13 +37,9 @@
 
 #include <wtf/CurrentTime.h>
 #include <wtf/Deque.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/CString.h>
 
 namespace WebCore {
 
-static void logThreadedScrollingMode(unsigned reasonsForUpdatingScrollLayerPositionOnMainThread);
-
 PassOwnPtr<ScrollingTreeNode> ScrollingTreeNode::create(ScrollingTree* scrollingTree)
 {
     return adoptPtr(new ScrollingTreeNodeMac(scrollingTree));
@@ -74,22 +70,15 @@
     if (state->changedProperties() & (ScrollingTreeState::ScrollLayer | ScrollingTreeState::ContentsSize | ScrollingTreeState::ViewportRect))
         updateMainFramePinState(scrollPosition());
 
-    if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThreadReason)) {
-        unsigned reasonsForUpdatingScrollLayerPositionOnMainThread = this->shouldUpdateScrollLayerPositionOnMainThreadReason();
-
-        if (reasonsForUpdatingScrollLayerPositionOnMainThread) {
-            // We're transitioning to the slow "update scroll layer position on the main thread" mode.
-            // Initialize the probable main thread scroll position with the current scroll layer position.
-            if (state->changedProperties() & ScrollingTreeState::RequestedScrollPosition)
-                m_probableMainThreadScrollPosition = state->requestedScrollPosition();
-            else {
-                CGPoint scrollLayerPosition = m_scrollLayer.get().position;
-                m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
-            }
+    if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread) && shouldUpdateScrollLayerPositionOnMainThread()) {
+        // We're transitioning to the slow "update scroll layer position on the main thread" mode.
+        // Initialize the probable main thread scroll position with the current scroll layer position.
+        if (state->changedProperties() & ScrollingTreeState::RequestedScrollPosition)
+            m_probableMainThreadScrollPosition = state->requestedScrollPosition();
+        else {
+            CGPoint scrollLayerPosition = m_scrollLayer.get().position;
+            m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
         }
-
-        if (scrollingTree()->scrollingPerformanceLoggingEnabled())
-            logThreadedScrollingMode(reasonsForUpdatingScrollLayerPositionOnMainThread);
     }
 }
 
@@ -236,7 +225,7 @@
 
 IntPoint ScrollingTreeNodeMac::scrollPosition() const
 {
-    if (shouldUpdateScrollLayerPositionOnMainThreadReason())
+    if (shouldUpdateScrollLayerPositionOnMainThread())
         return m_probableMainThreadScrollPosition;
 
     CGPoint scrollLayerPosition = m_scrollLayer.get().position;
@@ -251,7 +240,7 @@
 
     setScrollPositionWithoutContentEdgeConstraints(newScrollPosition);
 
-    if (scrollingTree()->scrollingPerformanceLoggingEnabled())
+    if (scrollingTree()->scrollingPeformanceLoggingEnabled())
         logExposedUnfilledArea();
 }
 
@@ -259,7 +248,7 @@
 {
     updateMainFramePinState(scrollPosition);
 
-    if (shouldUpdateScrollLayerPositionOnMainThreadReason()) {
+    if (shouldUpdateScrollLayerPositionOnMainThread()) {
         m_probableMainThreadScrollPosition = scrollPosition;
         scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition);
         return;
@@ -271,7 +260,7 @@
 
 void ScrollingTreeNodeMac::setScrollLayerPosition(const IntPoint& position)
 {
-    ASSERT(!shouldUpdateScrollLayerPositionOnMainThreadReason());
+    ASSERT(!shouldUpdateScrollLayerPositionOnMainThread());
     m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y());
 }
 
@@ -341,30 +330,6 @@
         WTFLogAlways("SCROLLING: Exposed tileless area. Time: %f Unfilled Pixels: %u\n", WTF::monotonicallyIncreasingTime(), unfilledArea);
 }
 
-static void logThreadedScrollingMode(unsigned reasonsForUpdatingScrollLayerPositionOnMainThread)
-{
-    if (reasonsForUpdatingScrollLayerPositionOnMainThread) {
-        StringBuilder reasonsDescription;
-
-        if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::ForcedOnMainThread)
-            reasonsDescription.append("forced,");
-        if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasSlowRepaintObjects)
-            reasonsDescription.append("slow-repaint objects,");
-        if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasNonCompositedViewportConstrainedObjects)
-            reasonsDescription.append("viewport-constrained objects,");
-        if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasNonLayerViewportConstrainedObjects)
-            reasonsDescription.append("non-layer viewport-constrained objects,");
-        if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::IsImageDocument)
-            reasonsDescription.append("image document,");
-
-        // Strip the trailing comma.
-        String reasonsDescriptionTrimmed = reasonsDescription.toString().left(reasonsDescription.length() - 1);
-
-        WTFLogAlways("SCROLLING: Switching to main-thread scrolling mode. Time: %f Reason(s): %s\n", WTF::monotonicallyIncreasingTime(), reasonsDescriptionTrimmed.ascii().data());
-    } else
-        WTFLogAlways("SCROLLING: Switching to threaded scrolling mode. Time: %f\n", WTF::monotonicallyIncreasingTime());
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(THREADED_SCROLLING)

Modified: trunk/Source/WebKit2/ChangeLog (128131 => 128132)


--- trunk/Source/WebKit2/ChangeLog	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-11 00:12:38 UTC (rev 128132)
@@ -1,3 +1,14 @@
+2012-09-10  James Robinson  <[email protected]>
+
+        Unreviewed, rolling out r127837.
+        http://trac.webkit.org/changeset/127837
+        https://bugs.webkit.org/show_bug.cgi?id=93898
+
+        Broke ScrollingCoordinator on chromium
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
+
 2012-09-10  Jer Noble  <[email protected]>
 
         Unreviewed; rolling out r128081.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (128131 => 128132)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-09-11 00:07:26 UTC (rev 128131)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-09-11 00:12:38 UTC (rev 128132)
@@ -208,9 +208,6 @@
 
 void TiledCoreAnimationDrawingArea::updatePreferences()
 {
-    bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();
-    ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled));
-
     bool showDebugBorders = m_webPage->corePage()->settings()->showDebugBorders();
 
     if (showDebugBorders == !!m_debugInfoLayer)
@@ -224,7 +221,10 @@
         m_debugInfoLayer = nullptr;
     }
 
+    bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();
+
     ScrollingThread::dispatch(bind(&ScrollingTree::setDebugRootLayer, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), m_debugInfoLayer));
+    ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled));
 }
 
 void TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>& functionRef)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to