https://bugs.webkit.org/show_bug.cgi?id=100813
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2012 05:58:02 +0000 (05:58 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2012 05:58:02 +0000 (05:58 +0000)
ScrollingCoordinatorMac::stateNodeForID() should return a
ScrollingStateNode* instead of a ScrollingStateScrollingNode*

Reviewed by Sam Weinig.

ScrollingCoordinatorMac::stateNodeForID() should return a
ScrollingStateNode* instead of a ScrollingStateScrollingNode* so that
it can be used for other types of nodes once we add them.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
(WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinatorMac::stateNodeForID):

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

Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm

index 2f24ae0..9e2096d 100644 (file)
@@ -1,3 +1,22 @@
+2012-10-30  Beth Dakin  <bdakin@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=100813
+        ScrollingCoordinatorMac::stateNodeForID() should return a 
+        ScrollingStateNode* instead of a ScrollingStateScrollingNode*
+
+        Reviewed by Sam Weinig.
+
+        ScrollingCoordinatorMac::stateNodeForID() should return a 
+        ScrollingStateNode* instead of a ScrollingStateScrollingNode* so that 
+        it can be used for other types of nodes once we add them.
+        * page/scrolling/mac/ScrollingCoordinatorMac.h:
+        (ScrollingCoordinatorMac):
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
+        (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
+        (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
+        (WebCore::ScrollingCoordinatorMac::stateNodeForID):
+
 2012-10-30  Keishi Hattori  <keishi@webkit.org>
 
         F4 inside <input type=time> should not open calendar picker
index 3edecbd..e147a78 100644 (file)
@@ -77,7 +77,7 @@ private:
     virtual void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons);
 
     void ensureRootStateNodeForFrameView(FrameView*);
-    ScrollingStateScrollingNode* stateNodeForID(ScrollingNodeID);
+    ScrollingStateNode* stateNodeForID(ScrollingNodeID);
 
     struct ScrollParameters {
         ScrollElasticity horizontalScrollElasticity;
index c105a64..4e26c20 100644 (file)
@@ -109,7 +109,7 @@ void ScrollingCoordinatorMac::frameViewLayoutUpdated(FrameView* frameView)
     if (!coordinatesScrollingForFrameView(frameView))
         return;
 
-    ScrollingStateScrollingNode* node = stateNodeForID(frameView->scrollLayerID());
+    ScrollingStateScrollingNode* node = toScrollingStateScrollingNode(stateNodeForID(frameView->scrollLayerID()));
     if (!node)
         return;
 
@@ -130,7 +130,7 @@ void ScrollingCoordinatorMac::frameViewLayoutUpdated(FrameView* frameView)
 
 void ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView(FrameView* frameView)
 {
-    ScrollingStateScrollingNode* node = stateNodeForID(frameView->scrollLayerID());
+    ScrollingStateScrollingNode* node = toScrollingStateScrollingNode(stateNodeForID(frameView->scrollLayerID()));
     if (!node)
         return;
     setWheelEventHandlerCountForNode(computeCurrentWheelEventHandlerCount(), node);
@@ -191,7 +191,7 @@ bool ScrollingCoordinatorMac::requestScrollPositionUpdate(FrameView* frameView,
     if (frameView->frame()->document()->inPageCache())
         return true;
 
-    ScrollingStateScrollingNode* stateNode = stateNodeForID(frameView->scrollLayerID());
+    ScrollingStateScrollingNode* stateNode = toScrollingStateScrollingNode(stateNodeForID(frameView->scrollLayerID()));
     if (!stateNode)
         return false;
 
@@ -294,7 +294,7 @@ void ScrollingCoordinatorMac::clearStateTree()
     m_scrollingStateTree->removeNode(m_scrollingStateTree->rootStateNode());
 }
 
-ScrollingStateScrollingNode* ScrollingCoordinatorMac::stateNodeForID(ScrollingNodeID scrollLayerID)
+ScrollingStateNode* ScrollingCoordinatorMac::stateNodeForID(ScrollingNodeID scrollLayerID)
 {
     if (!scrollLayerID)
         return 0;
@@ -303,8 +303,7 @@ ScrollingStateScrollingNode* ScrollingCoordinatorMac::stateNodeForID(ScrollingNo
     if (it == m_stateNodeMap.end())
         return 0;
 
-    ScrollingStateNode* node = it->value;
-    return toScrollingStateScrollingNode(node);
+    return it->value;
 }
 
 void ScrollingCoordinatorMac::ensureRootStateNodeForFrameView(FrameView* frameView)