Changeset 130989 in webkit


Ignore:
Timestamp:
Oct 10, 2012 6:24:51 PM (12 years ago)
Author:
Beth Dakin
Message:

https://bugs.webkit.org/show_bug.cgi?id=98968
REGRESSION: Unable to scroll with trackpad on some websites after
r130783

Reviewed by Simon Fraser.

This bug seems to reproduce mostly on web pages that require login.
The re-routing causes extra churn of the RenderLayerBacking, and we
end up destroying and re-creating the backing and therefore the
ScrollingStateNodes, and when the timing is just wrong we get into a
state where the ScrollingTree has a set of incorrect information.
This patch fixes the bug by making sure the ScrollingStateNodes keep
the ScrollingTree in synch with their re-set data.

Tell the ScrollingStateTree that the root layer has changed.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):

New virtual function will set every property as having changed.

  • page/scrolling/ScrollingStateNode.h:

(WebCore::ScrollingStateNode::setHasChangedProperties):

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::setHasChangedProperties):
(WebCore):

  • page/scrolling/ScrollingStateScrollingNode.h:

When the root layer changes, make sure we update the ScrollingTree
appropriately by indicating that every property could have changed.

  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::rootLayerDidChange):
(WebCore):

  • page/scrolling/ScrollingStateTree.h:

(ScrollingStateTree):

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130988 r130989  
     12012-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
    1372012-10-10  MORITA Hajime  <morrita@google.com>
    238
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r130783 r130989  
    252252    ensureRootStateNodeForFrameView(frameView);
    253253    ASSERT(m_scrollingStateTree->rootStateNode());
     254    m_scrollingStateTree->rootLayerDidChange();
    254255#endif
    255256
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h

    r130783 r130989  
    5757    virtual unsigned changedProperties() const = 0;
    5858    virtual void resetChangedProperties() = 0;
     59    virtual void setHasChangedProperties() { setScrollLayerDidChange(true); }
    5960
    6061    PlatformLayer* platformScrollLayer() const;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp

    r130342 r130989  
    7878}
    7979
     80void ScrollingStateScrollingNode::setHasChangedProperties()
     81{
     82    m_changedProperties = All;
     83    ScrollingStateNode::setHasChangedProperties();
     84}
     85
    8086PassOwnPtr<ScrollingStateNode> ScrollingStateScrollingNode::cloneAndResetNode()
    8187{
  • trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h

    r130783 r130989  
    5757        ScrollOrigin = 1 << 11,
    5858        RequestedScrollPosition = 1 << 12,
     59        All = (1 << 13) - 1 // This will need to be updated if we add or remove anything the ChangedProperties.
    5960    };
    6061
     
    6667    virtual unsigned changedProperties() const OVERRIDE { return m_changedProperties; }
    6768    virtual void resetChangedProperties() OVERRIDE { m_changedProperties = 0; }
     69    virtual void setHasChangedProperties();
    6870
    6971    const IntRect& viewportRect() const { return m_viewportRect; }
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp

    r130783 r130989  
    6969}
    7070
     71void 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
    7181} // namespace WebCore
    7282
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h

    r130783 r130989  
    6363    void removeNode(ScrollingStateNode*);
    6464
     65    void rootLayerDidChange();
     66
    6567    void setHasChangedProperties(bool changedProperties) { m_hasChangedProperties = changedProperties; }
    6668    bool hasChangedProperties() const { return m_hasChangedProperties; }
Note: See TracChangeset for help on using the changeset viewer.