Changeset 246593 in webkit
- Timestamp:
- Jun 19, 2019 10:21:11 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246591 r246593 1 2019-06-19 Antti Koivisto <antti@apple.com> 2 3 RequestedScrollPosition shouldn't be applied after node reattach 4 https://bugs.webkit.org/show_bug.cgi?id=198994 5 <rdar://problem/51439685> 6 7 Reviewed by Simon Fraser. 8 9 * scrollingcoordinator/ios/scroll-position-after-reattach-expected.html: Added. 10 * scrollingcoordinator/ios/scroll-position-after-reattach.html: Added. 11 1 12 2019-06-19 Truitt Savell <tsavell@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r246579 r246593 1 2019-06-19 Antti Koivisto <antti@apple.com> 2 3 RequestedScrollPosition shouldn't be applied after node reattach 4 https://bugs.webkit.org/show_bug.cgi?id=198994 5 <rdar://problem/51439685> 6 7 Reviewed by Simon Fraser. 8 9 Test: scrollingcoordinator/ios/scroll-position-after-reattach.html 10 11 If a scrolling node gets reattached, its scroll position resets to (0,0) or whatever the previous 12 requestedScrollPosition was, and the current position is lost. 13 14 * page/scrolling/ScrollingStateFixedNode.cpp: 15 (WebCore::ScrollingStateFixedNode::setPropertyChangedBitsAfterReattach): 16 (WebCore::ScrollingStateFixedNode::setAllPropertiesChanged): Deleted. 17 18 Rename to better reflect what this is for. 19 20 * page/scrolling/ScrollingStateFixedNode.h: 21 * page/scrolling/ScrollingStateFrameHostingNode.cpp: 22 (WebCore::ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach): 23 (WebCore::ScrollingStateFrameHostingNode::setAllPropertiesChanged): Deleted. 24 * page/scrolling/ScrollingStateFrameHostingNode.h: 25 * page/scrolling/ScrollingStateFrameScrollingNode.cpp: 26 (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach): 27 (WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged): Deleted. 28 * page/scrolling/ScrollingStateFrameScrollingNode.h: 29 * page/scrolling/ScrollingStateNode.cpp: 30 (WebCore::ScrollingStateNode::setPropertyChangedBitsAfterReattach): 31 (WebCore::ScrollingStateNode::setAllPropertiesChanged): Deleted. 32 * page/scrolling/ScrollingStateNode.h: 33 * page/scrolling/ScrollingStatePositionedNode.cpp: 34 (WebCore::ScrollingStatePositionedNode::setPropertyChangedBitsAfterReattach): 35 (WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged): Deleted. 36 * page/scrolling/ScrollingStatePositionedNode.h: 37 * page/scrolling/ScrollingStateScrollingNode.cpp: 38 (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach): 39 40 Don't set RequestedScrollPosition. It is a special property that is applied only once on request 41 and shouldn't get reapplied. Nodes should keep their existing scroll position on reattach. 42 43 (WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged): Deleted. 44 * page/scrolling/ScrollingStateScrollingNode.h: 45 * page/scrolling/ScrollingStateStickyNode.cpp: 46 (WebCore::ScrollingStateStickyNode::setPropertyChangedBitsAfterReattach): 47 (WebCore::ScrollingStateStickyNode::setAllPropertiesChanged): Deleted. 48 * page/scrolling/ScrollingStateStickyNode.h: 49 * page/scrolling/ScrollingStateTree.cpp: 50 (WebCore::ScrollingStateTree::nodeWasReattachedRecursive): 51 1 52 2019-06-18 Saam Barati <sbarati@apple.com> 2 53 -
trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp
r246033 r246593 59 59 } 60 60 61 void ScrollingStateFixedNode::set AllPropertiesChanged()61 void ScrollingStateFixedNode::setPropertyChangedBitsAfterReattach() 62 62 { 63 63 setPropertyChangedBit(ViewportConstraints); 64 ScrollingStateNode::set AllPropertiesChanged();64 ScrollingStateNode::setPropertyChangedBitsAfterReattach(); 65 65 } 66 66 -
trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h
r246033 r246593 56 56 ScrollingStateFixedNode(const ScrollingStateFixedNode&, ScrollingStateTree&); 57 57 58 void set AllPropertiesChanged() override;58 void setPropertyChangedBitsAfterReattach() override; 59 59 60 60 void reconcileLayerPositionForViewportRect(const LayoutRect& viewportRect, ScrollingLayerPositionAction) override; -
trunk/Source/WebCore/page/scrolling/ScrollingStateFrameHostingNode.cpp
r246033 r246593 58 58 } 59 59 60 void ScrollingStateFrameHostingNode::set AllPropertiesChanged()60 void ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach() 61 61 { 62 62 setPropertyChangedBit(ParentRelativeScrollableRect); 63 63 64 ScrollingStateNode::set AllPropertiesChanged();64 ScrollingStateNode::setPropertyChangedBitsAfterReattach(); 65 65 } 66 66 -
trunk/Source/WebCore/page/scrolling/ScrollingStateFrameHostingNode.h
r246033 r246593 54 54 ScrollingStateFrameHostingNode(const ScrollingStateFrameHostingNode&, ScrollingStateTree&); 55 55 56 void set AllPropertiesChanged() override;56 void setPropertyChangedBitsAfterReattach() override; 57 57 58 58 LayoutRect m_parentRelativeScrollableRect; -
trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp
r246033 r246593 86 86 } 87 87 88 void ScrollingStateFrameScrollingNode::set AllPropertiesChanged()88 void ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach() 89 89 { 90 90 setPropertyChangedBit(FrameScaleFactor); … … 108 108 setPropertyChangedBit(MaxLayoutViewportOrigin); 109 109 110 ScrollingStateScrollingNode::set AllPropertiesChanged();110 ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach(); 111 111 } 112 112 -
trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h
r246033 r246593 136 136 ScrollingStateFrameScrollingNode(const ScrollingStateFrameScrollingNode&, ScrollingStateTree&); 137 137 138 void set AllPropertiesChanged() override;138 void setPropertyChangedBitsAfterReattach() override; 139 139 140 140 LayerRepresentation m_rootContentsLayer; -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp
r246033 r246593 68 68 } 69 69 70 void ScrollingStateNode::set AllPropertiesChanged()70 void ScrollingStateNode::setPropertyChangedBitsAfterReattach() 71 71 { 72 72 setPropertyChangedBit(Layer); -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h
r246033 r246593 213 213 void resetChangedProperties() { m_changedProperties = 0; } 214 214 void setPropertyChanged(unsigned propertyBit); 215 virtual void set AllPropertiesChanged();215 virtual void setPropertyChangedBitsAfterReattach(); 216 216 217 217 ChangedProperties changedProperties() const { return m_changedProperties; } -
trunk/Source/WebCore/page/scrolling/ScrollingStatePositionedNode.cpp
r246033 r246593 60 60 } 61 61 62 void ScrollingStatePositionedNode::set AllPropertiesChanged()62 void ScrollingStatePositionedNode::setPropertyChangedBitsAfterReattach() 63 63 { 64 64 setPropertyChangedBit(RelatedOverflowScrollingNodes); 65 65 setPropertyChangedBit(LayoutConstraintData); 66 ScrollingStateNode::set AllPropertiesChanged();66 ScrollingStateNode::setPropertyChangedBitsAfterReattach(); 67 67 } 68 68 -
trunk/Source/WebCore/page/scrolling/ScrollingStatePositionedNode.h
r246033 r246593 62 62 ScrollingStatePositionedNode(const ScrollingStatePositionedNode&, ScrollingStateTree&); 63 63 64 void set AllPropertiesChanged() override;64 void setPropertyChangedBitsAfterReattach() override; 65 65 66 66 void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
r246033 r246593 74 74 ScrollingStateScrollingNode::~ScrollingStateScrollingNode() = default; 75 75 76 void ScrollingStateScrollingNode::set AllPropertiesChanged()76 void ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach() 77 77 { 78 78 setPropertyChangedBit(ScrollableAreaSize); … … 83 83 setPropertyChangedBit(ScrollOrigin); 84 84 setPropertyChangedBit(ScrollableAreaParams); 85 setPropertyChangedBit(RequestedScrollPosition);86 85 #if ENABLE(CSS_SCROLL_SNAP) 87 86 setPropertyChangedBit(HorizontalSnapOffsets); … … 99 98 setPropertyChangedBit(PainterForScrollbar); 100 99 101 ScrollingStateNode::set AllPropertiesChanged();100 ScrollingStateNode::setPropertyChangedBitsAfterReattach(); 102 101 } 103 102 -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
r246033 r246593 140 140 ScrollingStateScrollingNode(const ScrollingStateScrollingNode&, ScrollingStateTree&); 141 141 142 void set AllPropertiesChanged() override;142 void setPropertyChangedBitsAfterReattach() override; 143 143 144 144 void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; -
trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp
r246033 r246593 59 59 } 60 60 61 void ScrollingStateStickyNode::set AllPropertiesChanged()61 void ScrollingStateStickyNode::setPropertyChangedBitsAfterReattach() 62 62 { 63 63 setPropertyChangedBit(ViewportConstraints); 64 ScrollingStateNode::set AllPropertiesChanged();64 ScrollingStateNode::setPropertyChangedBitsAfterReattach(); 65 65 } 66 66 -
trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h
r246033 r246593 56 56 ScrollingStateStickyNode(const ScrollingStateStickyNode&, ScrollingStateTree&); 57 57 58 void set AllPropertiesChanged() override;58 void setPropertyChangedBitsAfterReattach() override; 59 59 60 60 void reconcileLayerPositionForViewportRect(const LayoutRect& viewportRect, ScrollingLayerPositionAction) override; -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
r246033 r246593 275 275 { 276 276 // When a node is re-attached, the ScrollingTree is recreating the ScrollingNode from scratch, so we need to set all the dirty bits. 277 node.set AllPropertiesChanged();277 node.setPropertyChangedBitsAfterReattach(); 278 278 279 279 if (auto* children = node.children()) {
Note: See TracChangeset
for help on using the changeset viewer.