COMMIT_MESSAGE

 1Bug 173833 - [iOS] Adjust layer hierarchy to handle frame scrolling
 2

Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp

@@void AsyncScrollingCoordinator::frameViewLayoutUpdated(FrameView& frameView)
181181 scrollParameters.verticalScrollbarMode = frameView.verticalScrollbarMode();
182182
183183 node->setScrollableAreaParameters(scrollParameters);
 184
 185 if (auto* scrollLayer = scrollLayerForFrameView(frameView))
 186 scrollLayer->setSize(frameView.sizeForVisibleContent());
184187}
185188
186189void AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView(const FrameView& frameView)

@@void AsyncScrollingCoordinator::reconcileScrollingState(FrameView& frameView, co
433436 FloatPoint positionForFooterLayer = FloatPoint(scrollPositionForFixed.x(),
434437 FrameView::yPositionForFooterLayer(scrollPosition, topContentInset, frameView.totalContentsSize().height(), frameView.footerHeight()));
435438
 439#if PLATFORM(IOS)
 440 // FIXME: Consider padding of frame.
 441 ASSERT(scrolledContentsLayer);
 442 scrollLayer->setPosition(FloatPoint());
 443 scrollLayer->setSize(frameView.sizeForVisibleContent());
 444 FloatSize oldScrollLayerOffset = scrollLayer->offsetFromRenderer();
 445 scrollLayer->setOffsetFromRenderer(FloatSize());
 446 bool paddingBoxOffsetChanged = oldScrollLayerOffset != scrollLayer->offsetFromRenderer();
 447#endif
 448
436449 if (programmaticScroll || scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) {
 450#if PLATFORM(IOS)
 451 scrollLayer->setBoundsOrigin(frameView.scrollPosition());
 452#else
437453 scrollLayer->setPosition(-frameView.scrollPosition());
 454 if (scrolledContentsLayer)
 455 scrolledContentsLayer->setPosition(positionForContentsLayer);
 456#endif
438457 if (counterScrollingLayer)
439458 counterScrollingLayer->setPosition(scrollPositionForFixed);
440459 if (insetClipLayer)
441460 insetClipLayer->setPosition(positionForInsetClipLayer);
442461 if (contentShadowLayer)
443462 contentShadowLayer->setPosition(positionForContentsLayer);
444  if (scrolledContentsLayer)
445  scrolledContentsLayer->setPosition(positionForContentsLayer);
446463 if (headerLayer)
447464 headerLayer->setPosition(positionForHeaderLayer);
448465 if (footerLayer)
449466 footerLayer->setPosition(positionForFooterLayer);
450467 } else {
 468#if PLATFORM(IOS)
 469 scrollLayer->syncBoundsOrigin(frameView.scrollPosition());
 470#else
451471 scrollLayer->syncPosition(-frameView.scrollPosition());
 472 if (scrolledContentsLayer)
 473 scrolledContentsLayer->syncPosition(positionForContentsLayer);
 474#endif
452475 if (counterScrollingLayer)
453476 counterScrollingLayer->syncPosition(scrollPositionForFixed);
454477 if (insetClipLayer)
455478 insetClipLayer->syncPosition(positionForInsetClipLayer);
456479 if (contentShadowLayer)
457480 contentShadowLayer->syncPosition(positionForContentsLayer);
458  if (scrolledContentsLayer)
459  scrolledContentsLayer->syncPosition(positionForContentsLayer);
460481 if (headerLayer)
461482 headerLayer->syncPosition(positionForHeaderLayer);
462483 if (footerLayer)
463484 footerLayer->syncPosition(positionForFooterLayer);
464485 }
 486
 487#if PLATFORM(IOS)
 488 IntSize scrollSize = frameView.contentsSize();
 489 scrolledContentsLayer->setPosition(FloatPoint());
 490 if (scrollSize != scrolledContentsLayer->size() || paddingBoxOffsetChanged)
 491 scrolledContentsLayer->setNeedsDisplay();
 492 scrolledContentsLayer->setSize(scrollSize);
 493 LayoutSize scrolledContentsOffset = -toLayoutSize(frameView.scrollPosition());
 494 scrolledContentsLayer->setOffsetFromRenderer(scrolledContentsOffset, GraphicsLayer::DontSetNeedsDisplay);
 495#endif
465496}
466497
467498void AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea& scrollableArea, ScrollbarOrientation orientation)

@@void AsyncScrollingCoordinator::setSynchronousScrollingReasons(FrameView& frameV
613644void AsyncScrollingCoordinator::updateScrollLayerPosition(FrameView& frameView)
614645{
615646 ASSERT(isMainThread());
 647 // FIXME: Make this consistent with reconcileScrollingState.
616648 if (auto* scrollLayer = scrollLayerForFrameView(frameView))
617649 scrollLayer->setPosition(-frameView.scrollPosition());
618650}

Source/WebCore/page/scrolling/ScrollingTree.cpp

@@void ScrollingTree::updateTreeFromStateNode(const ScrollingStateNode* stateNode,
167167 m_rootNode = node;
168168 m_nodeMap.clear();
169169 }
 170 if (node->isFrameScrollingNode())
 171 downcast<ScrollingTreeFrameScrollingNode>(*node).setIsMainFrame(!parentNodeID);
170172 m_nodeMap.set(nodeID, node.get());
171173 }
172174

Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h

@@class ScrollingStateScrollingNode;
3838class ScrollingTreeFrameScrollingNode : public ScrollingTreeScrollingNode {
3939public:
4040 virtual ~ScrollingTreeFrameScrollingNode();
 41 WEBCORE_EXPORT virtual void setIsMainFrame(bool) { }
4142
4243 void commitStateBeforeChildren(const ScrollingStateNode&) override;
4344

@@public:
4546 void updateLayersAfterAncestorChange(const ScrollingTreeNode& /*changedNode*/, const FloatRect& /*fixedPositionRect*/, const FloatSize& /*cumulativeDelta*/) override { }
4647
4748 void handleWheelEvent(const PlatformWheelEvent&) override = 0;
48  void setScrollPosition(const FloatPoint&) override;
 49 WEBCORE_EXPORT void setScrollPosition(const FloatPoint&) override;
4950 void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) override = 0;
5051
5152 void updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double scale) override = 0;

@@protected:
8081 ScrollBehaviorForFixedElements scrollBehaviorForFixedElements() const { return m_behaviorForFixed; }
8182
8283private:
83  void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override;
 84 WEBCORE_EXPORT void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override;
8485
8586 FloatRect m_layoutViewport;
8687 FloatPoint m_minLayoutViewportOrigin;

Source/WebCore/page/scrolling/ScrollingTreeNode.cpp

@@void ScrollingTreeNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextB
7777 ts.dumpProperty("nodeID", scrollingNodeID());
7878}
7979
80 ScrollingTreeFrameScrollingNode* ScrollingTreeNode::enclosingFrameNode() const
 80ScrollingTreeFrameScrollingNode* ScrollingTreeNode::enclosingFrameNode()
8181{
82  auto* node = parent();
 82 auto* node = this;
8383 while (node && !node->isFrameScrollingNode())
8484 node = node->parent();
8585

Source/WebCore/page/scrolling/ScrollingTreeNode.h

@@public:
6666 void appendChild(Ref<ScrollingTreeNode>&&);
6767 void removeChild(ScrollingTreeNode&);
6868
69  WEBCORE_EXPORT ScrollingTreeFrameScrollingNode* enclosingFrameNode() const;
 69 WEBCORE_EXPORT ScrollingTreeFrameScrollingNode* enclosingFrameNode();
7070
7171 WEBCORE_EXPORT void dump(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const;
7272

Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h

@@namespace WebCore {
3737class ScrollingTreeFrameScrollingNodeIOS : public ScrollingTreeFrameScrollingNode {
3838public:
3939 WEBCORE_EXPORT static Ref<ScrollingTreeFrameScrollingNodeIOS> create(ScrollingTree&, ScrollingNodeID);
40  virtual ~ScrollingTreeFrameScrollingNodeIOS();
 40 WEBCORE_EXPORT virtual ~ScrollingTreeFrameScrollingNodeIOS();
4141
4242protected:
43  ScrollingTreeFrameScrollingNodeIOS(ScrollingTree&, ScrollingNodeID);
 43 WEBCORE_EXPORT ScrollingTreeFrameScrollingNodeIOS(ScrollingTree&, ScrollingNodeID);
4444
4545 // ScrollingTreeNode member functions.
46  void commitStateBeforeChildren(const ScrollingStateNode&) override;
47  void commitStateAfterChildren(const ScrollingStateNode&) override;
 46 WEBCORE_EXPORT void commitStateBeforeChildren(const ScrollingStateNode&) override;
 47 WEBCORE_EXPORT void commitStateAfterChildren(const ScrollingStateNode&) override;
4848
4949 void handleWheelEvent(const PlatformWheelEvent&) override { }
5050
51  FloatPoint scrollPosition() const override;
52  void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) override;
 51 WEBCORE_EXPORT FloatPoint scrollPosition() const override;
 52 WEBCORE_EXPORT void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) override;
5353
54  void updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double scale) override;
55  void updateLayersAfterDelegatedScroll(const FloatPoint&) override;
 54 WEBCORE_EXPORT void updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double scale) override;
 55 WEBCORE_EXPORT void updateLayersAfterDelegatedScroll(const FloatPoint&) override;
5656
57  void setScrollLayerPosition(const FloatPoint&, const FloatRect& layoutViewport) override;
 57 WEBCORE_EXPORT void setScrollLayerPosition(const FloatPoint&, const FloatRect& layoutViewport) override;
5858
59  FloatPoint minimumScrollPosition() const override;
60  FloatPoint maximumScrollPosition() const override;
 59 WEBCORE_EXPORT FloatPoint minimumScrollPosition() const override;
 60 WEBCORE_EXPORT FloatPoint maximumScrollPosition() const override;
6161
6262private:
6363 void updateChildNodesAfterScroll(const FloatPoint&);

Source/WebCore/rendering/RenderLayerCompositor.cpp

@@void RenderLayerCompositor::ensureRootLayer()
32863286 m_clipLayer->setName("frame clipping");
32873287 m_clipLayer->setMasksToBounds(true);
32883288
 3289#if PLATFORM(IOS)
 3290 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::Scrolling);
 3291#else
32893292 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
 3293#endif
32903294 m_scrollLayer->setName("frame scrolling");
32913295
32923296 // Hook them up

Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp

3535
3636#if PLATFORM(IOS)
3737#include "ScrollingTreeOverflowScrollingNodeIOS.h"
38 #include <WebCore/ScrollingTreeFrameScrollingNodeIOS.h>
 38#include "ScrollingTreeRemoteFrameScrollingNodeIOS.h"
3939#else
4040#include <WebCore/ScrollingTreeFrameScrollingNodeMac.h>
4141#endif

@@Ref<ScrollingTreeNode> RemoteScrollingTree::createScrollingTreeNode(ScrollingNod
115115 switch (nodeType) {
116116 case FrameScrollingNode:
117117#if PLATFORM(IOS)
118  return ScrollingTreeFrameScrollingNodeIOS::create(*this, nodeID);
 118 return ScrollingTreeRemoteFrameScrollingNodeIOS::create(*this, nodeID);
119119#else
120120 return ScrollingTreeFrameScrollingNodeMac::create(*this, nodeID);
121121#endif

Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm

@@void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&
7373 if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
7474 scrollingStateNode.setLayer(layerRepresentationFromLayerOrView(layerTreeHost.getLayer(scrollingStateNode.layer())));
7575
 76 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
 77 scrollingStateNode.setScrolledContentsLayer(layerRepresentationFromLayerOrView(layerTreeHost.getLayer(scrollingStateNode.scrolledContentsLayer())));
 78
7679 if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer))
7780 scrollingStateNode.setCounterScrollingLayer(layerRepresentationFromLayerOrView(layerTreeHost.getLayer(scrollingStateNode.counterScrollingLayer())));
7881

Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeRemoteFrameScrollingNodeIOS.h

 1/*
 2 * Copyright (C) 2017 Igalia S.L. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#pragma once
 27
 28#if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS)
 29
 30#include <WebCore/ScrollingTreeFrameScrollingNodeIOS.h>
 31
 32namespace WebKit {
 33
 34class ScrollingTreeScrollingNodeDelegateIOS;
 35
 36class ScrollingTreeRemoteFrameScrollingNodeIOS : public WebCore::ScrollingTreeFrameScrollingNodeIOS {
 37public:
 38 static Ref<ScrollingTreeRemoteFrameScrollingNodeIOS> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
 39 virtual ~ScrollingTreeRemoteFrameScrollingNodeIOS();
 40
 41private:
 42 ScrollingTreeRemoteFrameScrollingNodeIOS(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
 43 void setIsMainFrame(bool) override;
 44
 45 void commitStateBeforeChildren(const WebCore::ScrollingStateNode&) override;
 46 void commitStateAfterChildren(const WebCore::ScrollingStateNode&) override;
 47
 48 WebCore::FloatPoint scrollPosition() const override;
 49
 50 void setScrollLayerPosition(const WebCore::FloatPoint&, const WebCore::FloatRect& layoutViewport) override;
 51
 52 void updateLayersAfterDelegatedScroll(const WebCore::FloatPoint& scrollPosition) override;
 53
 54 void updateLayersAfterAncestorChange(const WebCore::ScrollingTreeNode& changedNode, const WebCore::FloatRect& fixedPositionRect, const WebCore::FloatSize& cumulativeDelta) override;
 55
 56 std::unique_ptr<ScrollingTreeScrollingNodeDelegateIOS> m_scrollingNodeDelegate;
 57};
 58
 59} // namespace WebKit
 60
 61#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS)

Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeRemoteFrameScrollingNodeIOS.mm

 1/*
 2 * Copyright (C) 2017 Igalia S.L. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#import "config.h"
 27#import "ScrollingTreeRemoteFrameScrollingNodeIOS.h"
 28
 29#if PLATFORM(IOS)
 30#if ENABLE(ASYNC_SCROLLING)
 31
 32#import "ScrollingTreeScrollingNodeDelegateIOS.h"
 33
 34#import <WebCore/ScrollingStateFrameScrollingNode.h>
 35
 36using namespace WebCore;
 37
 38namespace WebKit {
 39
 40Ref<ScrollingTreeRemoteFrameScrollingNodeIOS> ScrollingTreeRemoteFrameScrollingNodeIOS::create(WebCore::ScrollingTree& scrollingTree, WebCore::ScrollingNodeID nodeID)
 41{
 42 return adoptRef(*new ScrollingTreeRemoteFrameScrollingNodeIOS(scrollingTree, nodeID));
 43}
 44
 45ScrollingTreeRemoteFrameScrollingNodeIOS::ScrollingTreeRemoteFrameScrollingNodeIOS(WebCore::ScrollingTree& scrollingTree, WebCore::ScrollingNodeID nodeID)
 46 : ScrollingTreeFrameScrollingNodeIOS(scrollingTree, nodeID)
 47{
 48}
 49
 50ScrollingTreeRemoteFrameScrollingNodeIOS::~ScrollingTreeRemoteFrameScrollingNodeIOS()
 51{
 52}
 53
 54void ScrollingTreeRemoteFrameScrollingNodeIOS::setIsMainFrame(bool isMainFrame)
 55{
 56 if (isMainFrame != !m_scrollingNodeDelegate)
 57 m_scrollingNodeDelegate.reset(isMainFrame ? nullptr : new ScrollingTreeScrollingNodeDelegateIOS(*this));
 58}
 59
 60void ScrollingTreeRemoteFrameScrollingNodeIOS::commitStateBeforeChildren(const WebCore::ScrollingStateNode& stateNode)
 61{
 62 const auto& scrollingStateNode = downcast<ScrollingStateScrollingNode>(stateNode);
 63 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollLayer) && m_scrollingNodeDelegate)
 64 m_scrollingNodeDelegate->resetScrollViewDelegate();
 65
 66 ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren(stateNode);
 67
 68 if (m_scrollingNodeDelegate)
 69 m_scrollingNodeDelegate->commitStateBeforeChildren(scrollingStateNode);
 70}
 71
 72void ScrollingTreeRemoteFrameScrollingNodeIOS::commitStateAfterChildren(const ScrollingStateNode& stateNode)
 73{
 74 ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren(stateNode);
 75 if (m_scrollingNodeDelegate)
 76 m_scrollingNodeDelegate->commitStateAfterChildren(downcast<ScrollingStateScrollingNode>(stateNode));
 77}
 78
 79void ScrollingTreeRemoteFrameScrollingNodeIOS::updateLayersAfterDelegatedScroll(const FloatPoint& scrollPosition)
 80{
 81 if (m_scrollingNodeDelegate)
 82 m_scrollingNodeDelegate->updateChildNodesAfterScroll(scrollPosition);
 83 else
 84 ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterDelegatedScroll(scrollPosition);
 85}
 86
 87void ScrollingTreeRemoteFrameScrollingNodeIOS::updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta)
 88{
 89 ASSERT(m_scrollingNodeDelegate);
 90 m_scrollingNodeDelegate->updateLayersAfterAncestorChange(changedNode, this->fixedPositionRect(), cumulativeDelta);
 91}
 92
 93FloatPoint ScrollingTreeRemoteFrameScrollingNodeIOS::scrollPosition() const
 94{
 95 return m_scrollingNodeDelegate ? m_scrollingNodeDelegate->scrollPosition() : ScrollingTreeFrameScrollingNodeIOS::scrollPosition();
 96}
 97
 98void ScrollingTreeRemoteFrameScrollingNodeIOS::setScrollLayerPosition(const FloatPoint& scrollPosition, const FloatRect& layoutViewport)
 99{
 100 if (m_scrollingNodeDelegate)
 101 m_scrollingNodeDelegate->setScrollLayerPosition(scrollPosition);
 102 else
 103 ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition(scrollPosition, layoutViewport);
 104}
 105
 106} // namespace WebKit
 107
 108#endif // ENABLE(ASYNC_SCROLLING)
 109#endif // PLATFORM(IOS)

Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm

@@void ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren(const Scro
156156 if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
157157 m_scrollLayer = scrollingStateNode.layer();
158158
159  if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
160  m_scrolledContentsLayer = scrollingStateNode.scrolledContentsLayer();
 159 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) {
 160 // FIXME: Why do we have different representations for overflow and frame nodes?
 161 auto& layer = scrollingStateNode.scrolledContentsLayer();
 162 m_scrolledContentsLayer = layer.representsPlatformLayerID() ? layer.toRepresentation(LayerRepresentation::Type::PlatformLayerRepresentation) : layer;
 163 }
161164}
162165
163166void ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren(const ScrollingStateScrollingNode& scrollingStateNode)

@@void ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll(const Fl
246249 return;
247250
248251 FloatRect fixedPositionRect;
249  ScrollingTreeFrameScrollingNode* frameNode = scrollingNode().enclosingFrameNode();
 252 auto* frameNode = scrollingNode().enclosingFrameNode();
250253 if (frameNode && frameNode->parent())
251254 fixedPositionRect = frameNode->fixedPositionRect();
252255 else

Source/WebKit/WebKit.xcodeproj/project.pbxproj

8888 0F5E200418E77051003EC3E5 /* PlatformCAAnimationRemote.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5E200218E77051003EC3E5 /* PlatformCAAnimationRemote.h */; };
8989 0F850FE61ED7C39F00FB77A7 /* WebPerformanceLoggingClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F850FE41ED7C39F00FB77A7 /* WebPerformanceLoggingClient.cpp */; };
9090 0F850FE71ED7C39F00FB77A7 /* WebPerformanceLoggingClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F850FE51ED7C39F00FB77A7 /* WebPerformanceLoggingClient.h */; };
 91 0F931C1C18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F931C1A18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.h */; };
 92 0F931C1D18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F931C1B18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.mm */; };
9193 0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F931C1A18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h */; };
9294 0F931C1C18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F931C1A18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h */; };
9395 0F931C1D18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F931C1B18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm */; };

23352337 0F707C791A1FEEA300DA7A45 /* RemoteLayerTreeScrollingPerformanceData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeScrollingPerformanceData.h; sourceTree = "<group>"; };
23362338 0F850FE41ED7C39F00FB77A7 /* WebPerformanceLoggingClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPerformanceLoggingClient.cpp; sourceTree = "<group>"; };
23372339 0F850FE51ED7C39F00FB77A7 /* WebPerformanceLoggingClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPerformanceLoggingClient.h; sourceTree = "<group>"; };
 2340 0F931C1A18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeRemoteFrameScrollingNodeIOS.h; sourceTree = "<group>"; };
 2341 0F931C1B18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeRemoteFrameScrollingNodeIOS.mm; sourceTree = "<group>"; };
23382342 0F931C1A18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeOverflowScrollingNodeIOS.h; sourceTree = "<group>"; };
23392343 0F931C1A18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeScrollingNodeDelegateIOS.h; sourceTree = "<group>"; };
23402344 0F931C1B18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeOverflowScrollingNodeIOS.mm; sourceTree = "<group>"; };

55465550 children = (
55475551 0F0C365718C051BA00F607D7 /* RemoteLayerTreeHostIOS.mm */,
55485552 0F0C365B18C05CA100F607D7 /* RemoteScrollingCoordinatorProxyIOS.mm */,
 5553 0F931C1A18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.h */,
 5554 0F931C1B18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.mm */,
55495555 0F931C1A18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h */,
55505556 0F931C1B18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm */,
55515557 0F931C1A18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h */,

88868892 BC2D021712AC41CB00E732A3 /* SameDocumentNavigationType.h in Headers */,
88878893 1AAB4A8D1296F0A20023952F /* SandboxExtension.h in Headers */,
88888894 E1E552C516AE065F004ED653 /* SandboxInitializationParameters.h in Headers */,
 8895 0F931C1C18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.h in Headers */,
88898896 0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */,
88908897 0F931C1C18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h in Headers */,
88918898 51D130541382EAC000351EDD /* SecItemRequestData.h in Headers */,

1048610493 1AAB4AAA1296F1540023952F /* SandboxExtensionMac.mm in Sources */,
1048710494 E1E552C416AE065F004ED653 /* SandboxInitialiationParametersMac.mm in Sources */,
1048810495 E19BDA8B19368D4600B97F57 /* SandboxUtilities.mm in Sources */,
 10496 0F931C1D18C5711900DBA82F /* ScrollingTreeRemoteFrameScrollingNodeIOS.mm in Sources */,
1048910497 0F931C1D18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm in Sources */,
1049010498 0F931C1D18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.mm in Sources */,
1049110499 51D130531382EAC000351EDD /* SecItemRequestData.cpp in Sources */,