Changeset 237754 in webkit
- Timestamp:
- Nov 2, 2018 3:07:18 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r237743 r237754 1 2018-11-02 Ali Juma <ajuma@chromium.org> 2 3 requestAnimationFrame causes bad location of position:fixed inside overflow:auto and iframe 4 https://bugs.webkit.org/show_bug.cgi?id=176243 5 6 Reviewed by Simon Fraser. 7 8 When a new layer tree is committed to the UIProcess, the positions of layers for fixed 9 or sticky nodes in the newly-committed tree can be stale, because of scrolling that has 10 happened in the UIProcess since the tree was updated in the WebProcess. To handle this, 11 RemoteLayerTreeDrawingAreaProxy::commitLayerTree updates the positions of these layers 12 by calling RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling, which 13 leads to a recursive traversal of the ScrollingTree to update each such layer. However, 14 since ScrollingTreeFrameScrollingNodeIOS didn't implement updateLayersAfterAncestorChange, 15 this traversal never descended into scrolling nodes within an iframe, so the layers for 16 these nodes were left with stale positions. 17 18 Implement ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterAncestorChange so that 19 fixed and sticky layers within an iframe do get their positions updated when a new layer 20 tree is committed. 21 22 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: 23 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: 24 (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterAncestorChange): 25 1 26 2018-11-02 Wenson Hsieh <wenson_hsieh@apple.com> 2 27 -
trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h
r237266 r237754 54 54 void updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double scale) override; 55 55 void updateLayersAfterDelegatedScroll(const FloatPoint&) override; 56 void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) override; 56 57 57 58 void setScrollLayerPosition(const FloatPoint&, const FloatRect& layoutViewport) override; -
trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm
r237266 r237754 137 137 } 138 138 139 void ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect&, const FloatSize&) 140 { 141 if (!m_children) 142 return; 143 144 FloatRect fixedPositionRect(scrollPosition(), scrollableAreaSize()); 145 for (auto& child : *m_children) 146 child->updateLayersAfterAncestorChange(changedNode, fixedPositionRect, FloatSize()); 147 } 148 139 149 void ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterDelegatedScroll(const FloatPoint& scrollPosition) 140 150 {
Note: See TracChangeset
for help on using the changeset viewer.