| Differences between
and this patch
- a/Source/WebCore/ChangeLog +30 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2017-10-20  Frederic Wang  <fwang@igalia.com>
2
3
        Consider non-main frames for frameViewRootLayerDidChange
4
        https://bugs.webkit.org/show_bug.cgi?id=178508
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        No new tests, tested manually.
9
10
        AsyncScrollingCoordinator::frameViewRootLayerDidChange assumes that frameView is always a
11
        main-frame. It calls ensureRootStateNodeForFrameView, which always attaches a frame node with
12
        null parent ID. It also has an ASSERT to check m_scrollingStateTree->rootStateNode(), instead
13
        of m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID()). This patch makes the
14
        ASSERT more generic and adds a computation of the correct parent ID. The change has been
15
        verified with a simple testcase and a debugger but it seems difficult to produce a testcase
16
        that has a visible effect on the scrolling tree.
17
18
        * page/scrolling/AsyncScrollingCoordinator.cpp: Include RenderLayerCompositor.h to use
19
        scrollCoordinatedAncestorInParentOfFrame.
20
        (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): Modify the ASSERT to
21
        verify the availability of a scrolling node for the frame, not just the root node.
22
        (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): For non-main
23
        frames, use RenderLayerCompositor::scrollCoordinatedAncestorInParentOfFrame to calculate
24
        the real parent ID.
25
        * rendering/RenderLayerCompositor.cpp: Make scrollCoordinatedAncestorInParentOfFrame a
26
        public method of RenderLayerCompositor.
27
        (WebCore::RenderLayerCompositor::scrollCoordinatedAncestorInParentOfFrame):
28
        (WebCore::scrollCoordinatedAncestorInParentOfFrame): Deleted.
29
        * rendering/RenderLayerCompositor.h: Declare scrollCoordinatedAncestorInParentOfFrame.
30
1
2017-10-20  Ms2ger  <Ms2ger@igalia.com>
31
2017-10-20  Ms2ger  <Ms2ger@igalia.com>
2
32
3
        Add the MAX_CLIENT_WAIT_TIMEOUT_WEBGL constant to WebGL2RenderingContext.
33
        Add the MAX_CLIENT_WAIT_TIMEOUT_WEBGL constant to WebGL2RenderingContext.
- a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp -2 / +9 lines
Lines 38-43 a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp_sec1
38
#include "MainFrame.h"
38
#include "MainFrame.h"
39
#include "Page.h"
39
#include "Page.h"
40
#include "PerformanceLoggingClient.h"
40
#include "PerformanceLoggingClient.h"
41
#include "RenderLayerCompositor.h"
41
#include "ScrollAnimator.h"
42
#include "ScrollAnimator.h"
42
#include "ScrollingConstraints.h"
43
#include "ScrollingConstraints.h"
43
#include "ScrollingStateFixedNode.h"
44
#include "ScrollingStateFixedNode.h"
Lines 220-226 void AsyncScrollingCoordinator::frameViewRootLayerDidChange(FrameView& frameView a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp_sec2
220
    
221
    
221
    // If the root layer does not have a ScrollingStateNode, then we should create one.
222
    // If the root layer does not have a ScrollingStateNode, then we should create one.
222
    ensureRootStateNodeForFrameView(frameView);
223
    ensureRootStateNodeForFrameView(frameView);
223
    ASSERT(m_scrollingStateTree->rootStateNode());
224
    ASSERT(m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID()));
224
225
225
    ScrollingCoordinator::frameViewRootLayerDidChange(frameView);
226
    ScrollingCoordinator::frameViewRootLayerDidChange(frameView);
226
227
Lines 512-518 void AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions(const a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp_sec3
512
void AsyncScrollingCoordinator::ensureRootStateNodeForFrameView(FrameView& frameView)
513
void AsyncScrollingCoordinator::ensureRootStateNodeForFrameView(FrameView& frameView)
513
{
514
{
514
    ASSERT(frameView.scrollLayerID());
515
    ASSERT(frameView.scrollLayerID());
515
    attachToStateTree(FrameScrollingNode, frameView.scrollLayerID(), 0);
516
    ScrollingNodeID parentNodeID = 0;
517
    auto& frame = frameView.frame();
518
    if (!frame.isMainFrame()) {
519
        parentNodeID = RenderLayerCompositor::scrollCoordinatedAncestorInParentOfFrame(frame);
520
        ASSERT(parentNodeID);
521
    }
522
    attachToStateTree(FrameScrollingNode, frameView.scrollLayerID(), parentNodeID);
516
}
523
}
517
524
518
void AsyncScrollingCoordinator::updateFrameScrollingNode(ScrollingNodeID nodeID, GraphicsLayer* layer, GraphicsLayer* scrolledContentsLayer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer, const ScrollingGeometry* scrollingGeometry)
525
void AsyncScrollingCoordinator::updateFrameScrollingNode(ScrollingNodeID nodeID, GraphicsLayer* layer, GraphicsLayer* scrolledContentsLayer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer, const ScrollingGeometry* scrollingGeometry)
- a/Source/WebCore/rendering/RenderLayerCompositor.cpp -1 / +1 lines
Lines 3613-3619 static ScrollingNodeID enclosingScrollingNodeID(RenderLayer& layer, IncludeSelfO a/Source/WebCore/rendering/RenderLayerCompositor.cpp_sec1
3613
    return 0;
3613
    return 0;
3614
}
3614
}
3615
3615
3616
static ScrollingNodeID scrollCoordinatedAncestorInParentOfFrame(Frame& frame)
3616
ScrollingNodeID RenderLayerCompositor::scrollCoordinatedAncestorInParentOfFrame(Frame& frame)
3617
{
3617
{
3618
    if (!frame.document() || !frame.view())
3618
    if (!frame.document() || !frame.view())
3619
        return 0;
3619
        return 0;
- a/Source/WebCore/rendering/RenderLayerCompositor.h +2 lines
Lines 332-337 public: a/Source/WebCore/rendering/RenderLayerCompositor.h_sec1
332
    void startTrackingCompositingUpdates() { m_compositingUpdateCount = 0; }
332
    void startTrackingCompositingUpdates() { m_compositingUpdateCount = 0; }
333
    unsigned compositingUpdateCount() const { return m_compositingUpdateCount; }
333
    unsigned compositingUpdateCount() const { return m_compositingUpdateCount; }
334
334
335
    static ScrollingNodeID scrollCoordinatedAncestorInParentOfFrame(Frame&);
336
335
private:
337
private:
336
    class OverlapMap;
338
    class OverlapMap;
337
    struct CompositingState;
339
    struct CompositingState;

Return to Bug 178508