Changeset 239018 in webkit


Ignore:
Timestamp:
Dec 9, 2018 12:00:32 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r239010.
https://bugs.webkit.org/show_bug.cgi?id=192537

Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
scrolling-layers-state.html again (Requested by ap on
#webkit).

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/239010

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r239016 r239018  
     12018-12-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r239010.
     4        https://bugs.webkit.org/show_bug.cgi?id=192537
     5
     6        Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
     7        scrolling-layers-state.html again (Requested by ap on
     8        #webkit).
     9
     10        Reverted changeset:
     11
     12        "Allow control over child order when adding nodes to the
     13        scrolling tree"
     14        https://bugs.webkit.org/show_bug.cgi?id=176914
     15        https://trac.webkit.org/changeset/239010
     16
    1172018-12-08  Eric Carlson  <eric.carlson@apple.com>
    218
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r239010 r239018  
    322322webkit.org/b/148408 tiled-drawing/scrolling/root-overflow-with-mousewheel.html [ Pass Failure Timeout ]
    323323
    324 webkit.org/b/192529 fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state.html [ Pass Failure ]
    325 
    326324webkit.org/b/139820 fast/frames/lots-of-objects.html [ Pass Timeout ]
    327325webkit.org/b/139820 fast/frames/lots-of-iframes.html [ Pass Timeout ]
  • trunk/Source/WebCore/ChangeLog

    r239016 r239018  
     12018-12-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r239010.
     4        https://bugs.webkit.org/show_bug.cgi?id=192537
     5
     6        Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
     7        scrolling-layers-state.html again (Requested by ap on
     8        #webkit).
     9
     10        Reverted changeset:
     11
     12        "Allow control over child order when adding nodes to the
     13        scrolling tree"
     14        https://bugs.webkit.org/show_bug.cgi?id=176914
     15        https://trac.webkit.org/changeset/239010
     16
    1172018-12-08  Eric Carlson  <eric.carlson@apple.com>
    218
  • trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp

    r239010 r239018  
    475475}
    476476
    477 ScrollingNodeID AsyncScrollingCoordinator::attachToStateTree(ScrollingNodeType nodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID, size_t childIndex)
    478 {
    479     LOG_WITH_STREAM(Scrolling, stream << "AsyncScrollingCoordinator::attachToStateTree " << nodeType << " node " << newNodeID << " parent " << parentID << " index " << childIndex);
    480     return m_scrollingStateTree->attachNode(nodeType, newNodeID, parentID, childIndex);
     477ScrollingNodeID AsyncScrollingCoordinator::attachToStateTree(ScrollingNodeType nodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID)
     478{
     479    return m_scrollingStateTree->attachNode(nodeType, newNodeID, parentID);
    481480}
    482481
     
    511510    // RenderLayerCompositor::updateBacking where the node has already been created.
    512511    ASSERT(frameView.frame().isMainFrame());
    513     attachToStateTree(MainFrameScrollingNode, frameView.scrollLayerID(), 0, 0);
     512    attachToStateTree(MainFrameScrollingNode, frameView.scrollLayerID(), 0);
    514513}
    515514
  • trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h

    r239010 r239018  
    9898    WEBCORE_EXPORT bool requestScrollPositionUpdate(FrameView&, const IntPoint&) override;
    9999
    100     WEBCORE_EXPORT ScrollingNodeID attachToStateTree(ScrollingNodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID, size_t childIndex) override;
     100    WEBCORE_EXPORT ScrollingNodeID attachToStateTree(ScrollingNodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID) override;
    101101    WEBCORE_EXPORT void detachFromStateTree(ScrollingNodeID) override;
    102102    WEBCORE_EXPORT void clearStateTree() override;
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h

    r239010 r239018  
    165165    virtual bool requestScrollPositionUpdate(FrameView&, const IntPoint&) { return false; }
    166166    virtual bool handleWheelEvent(FrameView&, const PlatformWheelEvent&) { return true; }
    167     virtual ScrollingNodeID attachToStateTree(ScrollingNodeType, ScrollingNodeID newNodeID, ScrollingNodeID /*parentID*/, size_t /*childIndex*/ = notFound) { return newNodeID; }
    168 
     167    virtual ScrollingNodeID attachToStateTree(ScrollingNodeType, ScrollingNodeID newNodeID, ScrollingNodeID /*parentID*/) { return newNodeID; }
    169168    virtual void detachFromStateTree(ScrollingNodeID) { }
    170169    virtual void clearStateTree() { }
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp

    r239010 r239018  
    9898}
    9999
    100 void ScrollingStateNode::insertChild(Ref<ScrollingStateNode>&& childNode, size_t index)
    101 {
    102     childNode->setParent(this);
    103 
    104     if (!m_children) {
    105         ASSERT(!index);
    106         m_children = std::make_unique<Vector<RefPtr<ScrollingStateNode>>>();
    107     }
    108 
    109     m_children->insert(index, WTFMove(childNode));
    110 }
    111 
    112 size_t ScrollingStateNode::indexOfChild(ScrollingStateNode& childNode) const
    113 {
    114     if (!m_children)
    115         return notFound;
    116 
    117     return m_children->find(&childNode);
    118 }
    119 
    120100void ScrollingStateNode::reconcileLayerPositionForViewportRect(const LayoutRect& viewportRect, ScrollingLayerPositionAction action)
    121101{
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h

    r239010 r239018  
    237237
    238238    void appendChild(Ref<ScrollingStateNode>&&);
    239     void insertChild(Ref<ScrollingStateNode>&&, size_t index);
    240 
    241     size_t indexOfChild(ScrollingStateNode&) const;
    242239
    243240    String scrollingStateTreeAsText(ScrollingStateTreeAsTextBehavior = ScrollingStateTreeAsTextBehaviorNormal) const;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp

    r239010 r239018  
    8383}
    8484
    85 bool ScrollingStateTree::nodeTypeAndParentMatch(ScrollingStateNode& node, ScrollingNodeType nodeType, ScrollingStateNode* parentNode) const
     85bool ScrollingStateTree::nodeTypeAndParentMatch(ScrollingStateNode& node, ScrollingNodeType nodeType, ScrollingNodeID parentID) const
    8686{
    8787    if (node.nodeType() != nodeType)
    8888        return false;
    8989
    90     return node.parent() == parentNode;
    91 }
    92 
    93 ScrollingNodeID ScrollingStateTree::attachNode(ScrollingNodeType nodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID, size_t childIndex)
     90    auto* parent = stateNodeForID(parentID);
     91    if (!parent)
     92        return true;
     93
     94    return node.parent() == parent;
     95}
     96
     97ScrollingNodeID ScrollingStateTree::attachNode(ScrollingNodeType nodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID)
    9498{
    9599    ASSERT(newNodeID);
    96100
    97101    if (auto* node = stateNodeForID(newNodeID)) {
    98         auto* parent = stateNodeForID(parentID);
    99         if (nodeTypeAndParentMatch(*node, nodeType, parent)) {
    100             if (!parentID)
    101                 return newNodeID;
    102 
    103             size_t currentIndex = parent->indexOfChild(*node);
    104             if (currentIndex == childIndex)
    105                 return newNodeID;
    106 
    107             ASSERT(currentIndex != notFound);
    108             Ref<ScrollingStateNode> protectedNode(*node);
    109             parent->children()->remove(currentIndex);
    110 
    111             if (childIndex == notFound)
    112                 parent->appendChild(WTFMove(protectedNode));
    113             else
    114                 parent->insertChild(WTFMove(protectedNode), childIndex);
    115 
     102        if (nodeTypeAndParentMatch(*node, nodeType, parentID))
    116103            return newNodeID;
    117         }
    118104
    119105#if ENABLE(ASYNC_SCROLLING)
     
    129115    ScrollingStateNode* newNode = nullptr;
    130116    if (!parentID) {
    131         ASSERT(!childIndex || childIndex == notFound);
    132117        // If we're resetting the root node, we should clear the HashMap and destroy the current children.
    133118        clear();
     
    138123    } else {
    139124        auto* parent = stateNodeForID(parentID);
    140         if (!parent) {
    141             ASSERT_NOT_REACHED();
     125        if (!parent)
    142126            return 0;
    143         }
    144127
    145128        if (nodeType == SubframeScrollingNode && parentID) {
    146129            if (auto orphanedNode = m_orphanedSubframeNodes.take(newNodeID)) {
    147130                newNode = orphanedNode.get();
    148                 if (childIndex == notFound)
    149                     parent->appendChild(orphanedNode.releaseNonNull());
    150                 else
    151                     parent->insertChild(orphanedNode.releaseNonNull(), childIndex);
     131                parent->appendChild(orphanedNode.releaseNonNull());
    152132            }
    153133        }
     
    156136            auto stateNode = createNode(nodeType, newNodeID);
    157137            newNode = stateNode.ptr();
    158             if (childIndex == notFound)
    159                 parent->appendChild(WTFMove(stateNode));
    160             else
    161                 parent->insertChild(WTFMove(stateNode), childIndex);
     138            parent->appendChild(WTFMove(stateNode));
    162139        }
    163140    }
    164141
    165     addNode(*newNode);
     142    m_stateNodeMap.set(newNodeID, newNode);
    166143    m_nodesRemovedSinceLastCommit.remove(newNodeID);
    167144    return newNodeID;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h

    r239010 r239018  
    5252    WEBCORE_EXPORT ScrollingStateNode* stateNodeForID(ScrollingNodeID) const;
    5353
    54     WEBCORE_EXPORT ScrollingNodeID attachNode(ScrollingNodeType, ScrollingNodeID, ScrollingNodeID parentID, size_t childIndex);
     54    WEBCORE_EXPORT ScrollingNodeID attachNode(ScrollingNodeType, ScrollingNodeID, ScrollingNodeID parentID);
    5555    void detachNode(ScrollingNodeID);
    5656    void clear();
     
    8282    Ref<ScrollingStateNode> createNode(ScrollingNodeType, ScrollingNodeID);
    8383
    84     bool nodeTypeAndParentMatch(ScrollingStateNode&, ScrollingNodeType, ScrollingStateNode* parentNode) const;
     84    bool nodeTypeAndParentMatch(ScrollingStateNode&, ScrollingNodeType, ScrollingNodeID parentID) const;
    8585
    8686    enum class SubframeNodeRemoval { Delete, Orphan };
  • trunk/Source/WebKit/ChangeLog

    r239015 r239018  
     12018-12-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r239010.
     4        https://bugs.webkit.org/show_bug.cgi?id=192537
     5
     6        Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
     7        scrolling-layers-state.html again (Requested by ap on
     8        #webkit).
     9
     10        Reverted changeset:
     11
     12        "Allow control over child order when adding nodes to the
     13        scrolling tree"
     14        https://bugs.webkit.org/show_bug.cgi?id=176914
     15        https://trac.webkit.org/changeset/239010
     16
    1172018-12-08  Alex Christensen  <achristensen@webkit.org>
    218
  • trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp

    r239010 r239018  
    414414            return false;
    415415
    416         m_scrollingStateTree->attachNode(nodeType, nodeID, parentNodeID, notFound); // Append new node.
     416        m_scrollingStateTree->attachNode(nodeType, nodeID, parentNodeID);
    417417        ScrollingStateNode* newNode = m_scrollingStateTree->stateNodeForID(nodeID);
    418418        ASSERT(newNode);
Note: See TracChangeset for help on using the changeset viewer.