Changeset 238665 in webkit
- Timestamp:
- Nov 29, 2018 3:44:50 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238661 r238665 1 2018-11-29 Frederic Wang <fwang@igalia.com> 2 3 Add ParentRelativeScrollableRect to ScrollingCoordinator::ScrollingGeometry 4 https://bugs.webkit.org/show_bug.cgi?id=172914 5 6 Reviewed by Simon Fraser. 7 8 This patch adds a ParentRelativeScrollableRect ScrollingCoordinator::ScrollingGeometry and 9 the corresponding set/get/dump APIs. Currently, the setter is never used so the behavior is 10 unchanged. In the future, this rect will be used for hit testing of subframes during 11 asynchronous macOS scrolling (but 172917). 12 13 No new tests, behavior unchanged. 14 15 * page/scrolling/AsyncScrollingCoordinator.cpp: 16 (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode): 17 (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): 18 * page/scrolling/ScrollingCoordinator.h: 19 * page/scrolling/ScrollingStateScrollingNode.cpp: 20 (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): 21 (WebCore::ScrollingStateScrollingNode::setParentRelativeScrollableRect): 22 (WebCore::ScrollingStateScrollingNode::dumpProperties const): 23 * page/scrolling/ScrollingStateScrollingNode.h: 24 (WebCore::ScrollingStateScrollingNode::parentRelativeScrollableRect const): 25 * page/scrolling/ScrollingTreeScrollingNode.cpp: 26 (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren): 27 (WebCore::ScrollingTreeScrollingNode::dumpProperties const): 28 * page/scrolling/ScrollingTreeScrollingNode.h: 29 (WebCore::ScrollingTreeScrollingNode::parentRelativeScrollableRect const): 30 1 31 2018-11-28 Wenson Hsieh <wenson_hsieh@apple.com> 2 32 -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r237266 r238665 524 524 525 525 if (scrollingGeometry) { 526 node->setParentRelativeScrollableRect(scrollingGeometry->parentRelativeScrollableRect); 526 527 node->setScrollOrigin(scrollingGeometry->scrollOrigin); 527 528 node->setScrollPosition(scrollingGeometry->scrollPosition); … … 543 544 544 545 if (scrollingGeometry) { 546 node->setParentRelativeScrollableRect(scrollingGeometry->parentRelativeScrollableRect); 545 547 node->setScrollOrigin(scrollingGeometry->scrollOrigin); 546 548 node->setScrollPosition(scrollingGeometry->scrollPosition); -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r228264 r238665 174 174 175 175 struct ScrollingGeometry { 176 LayoutRect parentRelativeScrollableRect; 176 177 FloatSize scrollableAreaSize; 177 178 FloatSize contentSize; -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
r223728 r238665 44 44 , m_totalContentsSize(stateNode.totalContentsSize()) 45 45 , m_reachableContentsSize(stateNode.reachableContentsSize()) 46 , m_parentRelativeScrollableRect(stateNode.parentRelativeScrollableRect()) 46 47 , m_scrollPosition(stateNode.scrollPosition()) 47 48 , m_requestedScrollPosition(stateNode.requestedScrollPosition()) … … 87 88 } 88 89 90 void ScrollingStateScrollingNode::setParentRelativeScrollableRect(const LayoutRect& parentRelativeScrollableRect) 91 { 92 if (m_parentRelativeScrollableRect == parentRelativeScrollableRect) 93 return; 94 95 m_parentRelativeScrollableRect = parentRelativeScrollableRect; 96 setPropertyChanged(ParentRelativeScrollableRect); 97 } 98 89 99 void ScrollingStateScrollingNode::setScrollPosition(const FloatPoint& scrollPosition) 90 100 { … … 232 242 ts.dumpProperty("requested scroll position represents programmatic scroll", m_requestedScrollPositionRepresentsProgrammaticScroll); 233 243 244 if (!m_parentRelativeScrollableRect.isEmpty()) 245 ts.dumpProperty("parent relative scrollable rect", m_parentRelativeScrollableRect); 246 234 247 if (m_scrollOrigin != IntPoint()) 235 248 ts.dumpProperty("scroll origin", m_scrollOrigin); -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
r220503 r238665 43 43 TotalContentsSize, 44 44 ReachableContentsSize, 45 ParentRelativeScrollableRect, 45 46 ScrollPosition, 46 47 ScrollOrigin, … … 68 69 const FloatSize& reachableContentsSize() const { return m_reachableContentsSize; } 69 70 WEBCORE_EXPORT void setReachableContentsSize(const FloatSize&); 71 72 const LayoutRect& parentRelativeScrollableRect() const { return m_parentRelativeScrollableRect; } 73 WEBCORE_EXPORT void setParentRelativeScrollableRect(const LayoutRect&); 70 74 71 75 const FloatPoint& scrollPosition() const { return m_scrollPosition; } … … 119 123 FloatSize m_totalContentsSize; 120 124 FloatSize m_reachableContentsSize; 125 LayoutRect m_parentRelativeScrollableRect; 121 126 FloatPoint m_scrollPosition; 122 127 FloatPoint m_requestedScrollPosition; -
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
r223728 r238665 63 63 if (state.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition)) 64 64 m_lastCommittedScrollPosition = state.scrollPosition(); 65 66 if (state.hasChangedProperty(ScrollingStateScrollingNode::ParentRelativeScrollableRect)) 67 m_parentRelativeScrollableRect = state.parentRelativeScrollableRect(); 65 68 66 69 if (state.hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin)) … … 140 143 ts.dumpProperty("reachable content size", m_reachableContentsSize); 141 144 ts.dumpProperty("last committed scroll position", m_lastCommittedScrollPosition); 145 146 if (!m_parentRelativeScrollableRect.isEmpty()) 147 ts.dumpProperty("parent relative scrollable rect", m_parentRelativeScrollableRect); 148 142 149 if (m_scrollOrigin != IntPoint()) 143 150 ts.dumpProperty("scroll origin", m_scrollOrigin); -
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
r237266 r238665 88 88 const FloatSize& totalContentsSize() const { return m_totalContentsSize; } 89 89 const FloatSize& reachableContentsSize() const { return m_reachableContentsSize; } 90 const LayoutRect& parentRelativeScrollableRect() const { return m_parentRelativeScrollableRect; } 90 91 const IntPoint& scrollOrigin() const { return m_scrollOrigin; } 91 92 … … 112 113 FloatSize m_reachableContentsSize; 113 114 FloatPoint m_lastCommittedScrollPosition; 115 LayoutRect m_parentRelativeScrollableRect; 114 116 IntPoint m_scrollOrigin; 115 117 #if ENABLE(CSS_SCROLL_SNAP)
Note: See TracChangeset
for help on using the changeset viewer.