Changeset 130989 in webkit
- Timestamp:
- Oct 10, 2012 6:24:51 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r130988 r130989 1 2012-10-10 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=98968 4 REGRESSION: Unable to scroll with trackpad on some websites after 5 r130783 6 7 Reviewed by Simon Fraser. 8 9 This bug seems to reproduce mostly on web pages that require login. 10 The re-routing causes extra churn of the RenderLayerBacking, and we 11 end up destroying and re-creating the backing and therefore the 12 ScrollingStateNodes, and when the timing is just wrong we get into a 13 state where the ScrollingTree has a set of incorrect information. 14 This patch fixes the bug by making sure the ScrollingStateNodes keep 15 the ScrollingTree in synch with their re-set data. 16 17 Tell the ScrollingStateTree that the root layer has changed. 18 * page/scrolling/ScrollingCoordinator.cpp: 19 (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange): 20 21 New virtual function will set every property as having changed. 22 * page/scrolling/ScrollingStateNode.h: 23 (WebCore::ScrollingStateNode::setHasChangedProperties): 24 * page/scrolling/ScrollingStateScrollingNode.cpp: 25 (WebCore::ScrollingStateScrollingNode::setHasChangedProperties): 26 (WebCore): 27 * page/scrolling/ScrollingStateScrollingNode.h: 28 29 When the root layer changes, make sure we update the ScrollingTree 30 appropriately by indicating that every property could have changed. 31 * page/scrolling/ScrollingStateTree.cpp: 32 (WebCore::ScrollingStateTree::rootLayerDidChange): 33 (WebCore): 34 * page/scrolling/ScrollingStateTree.h: 35 (ScrollingStateTree): 36 1 37 2012-10-10 MORITA Hajime <morrita@google.com> 2 38 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r130783 r130989 252 252 ensureRootStateNodeForFrameView(frameView); 253 253 ASSERT(m_scrollingStateTree->rootStateNode()); 254 m_scrollingStateTree->rootLayerDidChange(); 254 255 #endif 255 256 -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h
r130783 r130989 57 57 virtual unsigned changedProperties() const = 0; 58 58 virtual void resetChangedProperties() = 0; 59 virtual void setHasChangedProperties() { setScrollLayerDidChange(true); } 59 60 60 61 PlatformLayer* platformScrollLayer() const; -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
r130342 r130989 78 78 } 79 79 80 void ScrollingStateScrollingNode::setHasChangedProperties() 81 { 82 m_changedProperties = All; 83 ScrollingStateNode::setHasChangedProperties(); 84 } 85 80 86 PassOwnPtr<ScrollingStateNode> ScrollingStateScrollingNode::cloneAndResetNode() 81 87 { -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
r130783 r130989 57 57 ScrollOrigin = 1 << 11, 58 58 RequestedScrollPosition = 1 << 12, 59 All = (1 << 13) - 1 // This will need to be updated if we add or remove anything the ChangedProperties. 59 60 }; 60 61 … … 66 67 virtual unsigned changedProperties() const OVERRIDE { return m_changedProperties; } 67 68 virtual void resetChangedProperties() OVERRIDE { m_changedProperties = 0; } 69 virtual void setHasChangedProperties(); 68 70 69 71 const IntRect& viewportRect() const { return m_viewportRect; } -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
r130783 r130989 69 69 } 70 70 71 void ScrollingStateTree::rootLayerDidChange() 72 { 73 // If the root layer has changed, then destroyed and re-created the root state node. That means that the 74 // cached properties in ScrollingStateScrollingNode are no longer reflective of the properties we have 75 // cached over in the ScrollingTree. To resolve this, we will mark all of the properties as having changed 76 // so that the ScrollingTree will be in synch with the state tree. 77 setHasChangedProperties(true); 78 rootStateNode()->setHasChangedProperties(); 79 } 80 71 81 } // namespace WebCore 72 82 -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h
r130783 r130989 63 63 void removeNode(ScrollingStateNode*); 64 64 65 void rootLayerDidChange(); 66 65 67 void setHasChangedProperties(bool changedProperties) { m_hasChangedProperties = changedProperties; } 66 68 bool hasChangedProperties() const { return m_hasChangedProperties; }
Note: See TracChangeset
for help on using the changeset viewer.