Changeset 200636 in webkit


Ignore:
Timestamp:
May 10, 2016, 12:31:22 PM (10 years ago)
Author:
Simon Fraser
Message:

Fix scrolling tree dumping
https://bugs.webkit.org/show_bug.cgi?id=157529

Reviewed by Tim Horton.

Source/WebCore:

Scrolling tree dumps cannot contain layerIDs because they are not stable between
runs. Fix by adding ScrollingStateTreeAsTextBehavior flags, and not dumping
the layerID for tests.

Sadly RemoteScrollingCoordinatorTransaction has a lot of duplicated code for dumping
the scrolling state tree, which should be converted to dumpProperties() at some point.

Fix the one test that suffered from this problem, and unskip it.

Test: fast/scrolling/ios/remove-scrolling-role.html

  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::dumpProperties):

  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::dump):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateOverflowScrollingNode.cpp:

(WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateOverflowScrollingNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::dumpProperties):

  • page/scrolling/ScrollingStateStickyNode.h:

LayoutTests:

  • fast/scrolling/ios/remove-scrolling-role-expected.txt: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt.
  • fast/scrolling/ios/remove-scrolling-role.html: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html.
  • platform/ios-simulator-wk2/TestExpectations:
Location:
trunk
Files:
15 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r200635 r200636  
     12016-05-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix scrolling tree dumping
     4        https://bugs.webkit.org/show_bug.cgi?id=157529
     5
     6        Reviewed by Tim Horton.
     7
     8        * fast/scrolling/ios/remove-scrolling-role-expected.txt: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt.
     9        * fast/scrolling/ios/remove-scrolling-role.html: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html.
     10        * platform/ios-simulator-wk2/TestExpectations:
     11
    1122016-05-10  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt

    r200635 r200636  
    66      (scrollable area size 300 400)
    77      (contents size 300 2000)
    8       (scrolled contents layer 22)
    98    )
    109  )
  • trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r200635 r200636  
    16651665http/tests/navigation/postredirect-basic.html [ Failure ]
    16661666http/tests/navigation/postredirect-goback1.html [ Failure ]
    1667 platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html [ Failure ]
     1667
    16681668platform/ios-simulator/ios/fast/text/underline-scaling.html [ Failure ]
    16691669compositing/masks/compositing-clip-path-on-subpixel-position.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r200633 r200636  
     12016-05-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix scrolling tree dumping
     4        https://bugs.webkit.org/show_bug.cgi?id=157529
     5
     6        Reviewed by Tim Horton.
     7
     8        Scrolling tree dumps cannot contain layerIDs because they are not stable between
     9        runs. Fix by adding ScrollingStateTreeAsTextBehavior flags, and not dumping
     10        the layerID for tests.
     11
     12        Sadly RemoteScrollingCoordinatorTransaction has a lot of duplicated code for dumping
     13        the scrolling state tree, which should be converted to dumpProperties() at some point.
     14       
     15        Fix the one test that suffered from this problem, and unskip it.
     16
     17        Test: fast/scrolling/ios/remove-scrolling-role.html
     18
     19        * page/scrolling/ScrollingStateFixedNode.cpp:
     20        (WebCore::ScrollingStateFixedNode::dumpProperties):
     21        * page/scrolling/ScrollingStateFixedNode.h:
     22        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
     23        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
     24        * page/scrolling/ScrollingStateFrameScrollingNode.h:
     25        * page/scrolling/ScrollingStateNode.cpp:
     26        (WebCore::ScrollingStateNode::dump):
     27        (WebCore::ScrollingStateNode::scrollingStateTreeAsText):
     28        * page/scrolling/ScrollingStateNode.h:
     29        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
     30        (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
     31        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
     32        * page/scrolling/ScrollingStateScrollingNode.cpp:
     33        (WebCore::ScrollingStateScrollingNode::dumpProperties):
     34        * page/scrolling/ScrollingStateScrollingNode.h:
     35        * page/scrolling/ScrollingStateStickyNode.cpp:
     36        (WebCore::ScrollingStateStickyNode::dumpProperties):
     37        * page/scrolling/ScrollingStateStickyNode.h:
     38
    1392016-05-10  Csaba Osztrogonác  <ossy@webkit.org>
    240
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp

    r184066 r200636  
    7676}
    7777
    78 void ScrollingStateFixedNode::dumpProperties(TextStream& ts, int indent) const
     78void ScrollingStateFixedNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior) const
    7979{
    8080    ts << "(" << "Fixed node" << "\n";
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h

    r197563 r200636  
    5959    void syncLayerPositionForViewportRect(const LayoutRect& viewportRect) override;
    6060
    61     void dumpProperties(TextStream&, int indent) const override;
     61    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
    6262
    6363    FixedPositionViewportConstraints m_constraints;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp

    r198078 r200636  
    222222#endif
    223223
    224 void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, int indent) const
     224void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
    225225{
    226226    ts << "(Frame scrolling node" << "\n";
    227227   
    228     ScrollingStateScrollingNode::dumpProperties(ts, indent);
     228    ScrollingStateScrollingNode::dumpProperties(ts, indent, behavior);
    229229   
    230230    if (m_frameScaleFactor != 1) {
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h

    r198078 r200636  
    120120    void setScrollerImpsFromScrollbars(Scrollbar* verticalScrollbar, Scrollbar* horizontalScrollbar);
    121121
    122     void dumpProperties(TextStream&, int indent) const override;
     122    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
    123123
    124124private:
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp

    r180493 r200636  
    113113}
    114114
    115 void ScrollingStateNode::dump(TextStream& ts, int indent) const
     115void ScrollingStateNode::dump(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
    116116{
    117117    writeIndent(ts, indent);
    118     dumpProperties(ts, indent);
     118    dumpProperties(ts, indent, behavior);
    119119
    120120    if (m_children) {
     
    123123       
    124124        for (auto& child : *m_children)
    125             child->dump(ts, indent + 2);
     125            child->dump(ts, indent + 2, behavior);
    126126        writeIndent(ts, indent + 1);
    127127        ts << ")\n";
     
    136136    TextStream ts;
    137137
    138     dump(ts, 0);
     138    dump(ts, 0, ScrollingStateTreeAsTextBehaviorNormal);
    139139    return ts.release();
    140140}
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h

    r184066 r200636  
    4141class TextStream;
    4242
     43enum ScrollingStateTreeAsTextBehaviorFlags {
     44    ScrollingStateTreeAsTextBehaviorNormal               = 0,
     45    ScrollingStateTreeAsTextBehaviorIncludeLayerIDs      = 1 << 0,
     46    ScrollingStateTreeAsTextBehaviorDebug                = ScrollingStateTreeAsTextBehaviorIncludeLayerIDs
     47};
     48typedef unsigned ScrollingStateTreeAsTextBehavior;
     49
    4350// Used to allow ScrollingStateNodes to refer to layers in various contexts:
    4451// a) Async scrolling, main thread: ScrollingStateNode holds onto a GraphicsLayer, and uses m_layerID
     
    239246
    240247private:
    241     void dump(TextStream&, int indent) const;
    242 
    243     virtual void dumpProperties(TextStream&, int indent) const = 0;
     248    void dump(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const;
     249
     250    virtual void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const = 0;
    244251
    245252    const ScrollingNodeType m_nodeType;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp

    r184066 r200636  
    6969}
    7070
    71 void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, int indent) const
     71void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
    7272{
    7373    ts << "(" << "Overflow scrolling node" << "\n";
    7474   
    75     ScrollingStateScrollingNode::dumpProperties(ts, indent);
     75    ScrollingStateScrollingNode::dumpProperties(ts, indent, behavior);
    7676   
    77     if (m_scrolledContentsLayer.layerID()) {
     77    if ((behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) && m_scrolledContentsLayer.layerID()) {
    7878        writeIndent(ts, indent + 1);
    7979        ts << "(scrolled contents layer " << m_scrolledContentsLayer.layerID() << ")\n";
  • trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h

    r197563 r200636  
    4949    WEBCORE_EXPORT void setScrolledContentsLayer(const LayerRepresentation&);
    5050   
    51     void dumpProperties(TextStream&, int indent) const override;
     51    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
    5252
    5353private:
  • trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp

    r185762 r200636  
    169169}
    170170
    171 void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, int indent) const
     171void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior) const
    172172{
    173173    if (m_scrollPosition != FloatPoint()) {
  • trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h

    r197563 r200636  
    9696    WEBCORE_EXPORT void setExpectsWheelEventTestTrigger(bool);
    9797
    98     void dumpProperties(TextStream&, int indent) const override;
    99    
    10098protected:
    10199    ScrollingStateScrollingNode(ScrollingStateTree&, ScrollingNodeType, ScrollingNodeID);
    102100    ScrollingStateScrollingNode(const ScrollingStateScrollingNode&, ScrollingStateTree&);
     101
     102    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
    103103   
    104104private:
  • trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp

    r184066 r200636  
    7676}
    7777
    78 void ScrollingStateStickyNode::dumpProperties(TextStream& ts, int indent) const
     78void ScrollingStateStickyNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior) const
    7979{
    8080    ts << "(" << "Sticky node" << "\n";
  • trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h

    r197563 r200636  
    5959    void syncLayerPositionForViewportRect(const LayoutRect& viewportRect) override;
    6060
    61     void dumpProperties(TextStream&, int indent) const override;
     61    void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
    6262
    6363    StickyPositionViewportConstraints m_constraints;
Note: See TracChangeset for help on using the changeset viewer.