Changeset 245465 in webkit
- Timestamp:
- May 17, 2019, 9:14:06 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
- 2 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame-expected.html (modified) (1 diff)
-
LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame.html (modified) (1 diff)
-
LayoutTests/fast/scrolling/ios/frame-scrolling-no-expected.html (copied) (copied from trunk/LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame-expected.html ) (1 diff)
-
LayoutTests/fast/scrolling/ios/frame-scrolling-no.html (copied) (copied from trunk/LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame.html ) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245429 r245465 1 2019-05-17 Antti Koivisto <antti@apple.com> 2 3 [iOS] Respect scrolling="no" on composited frames 4 https://bugs.webkit.org/show_bug.cgi?id=197972 5 <rdar://problem/50252398> 6 7 Reviewed by Simon Fraser. 8 9 * fast/scrolling/ios/body-overflow-hidden-frame-expected.html: 10 * fast/scrolling/ios/body-overflow-hidden-frame.html: 11 12 Also fix overflow:hidden test so that the frame content forces composition. 13 14 * fast/scrolling/ios/frame-scrolling-no-expected.html: Added. 15 * fast/scrolling/ios/frame-scrolling-no.html: Added. 16 1 17 2019-05-16 Greg Doolittle <gr3g@apple.com> 2 18 -
trunk/LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame-expected.html
r245006 r245465 12 12 <style> 13 13 body { overflow: hidden } 14 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; }14 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } 15 15 </style> 16 16 <body> -
trunk/LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame.html
r245006 r245465 33 33 <style> 34 34 body { overflow: hidden } 35 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; }35 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } 36 36 </style> 37 37 <body> -
trunk/LayoutTests/fast/scrolling/ios/frame-scrolling-no-expected.html
r245464 r245465 7 7 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; } 8 8 </style> 9 <body onload="runTest()">10 <iframe s rcdoc="9 <body> 10 <iframe scrolling="no" srcdoc=" 11 11 <html> 12 12 <style> 13 body { overflow: hidden } 14 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; } 13 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } 15 14 </style> 16 15 <body> -
trunk/LayoutTests/fast/scrolling/ios/frame-scrolling-no.html
r245464 r245465 29 29 </script> 30 30 <body onload="runTest()"> 31 <iframe s rcdoc="31 <iframe scrolling="no" srcdoc=" 32 32 <html> 33 33 <style> 34 body { overflow: hidden } 35 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; } 34 .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } 36 35 </style> 37 36 <body> -
trunk/Source/WebKit/ChangeLog
r245462 r245465 1 2019-05-17 Antti Koivisto <antti@apple.com> 2 3 [iOS] Respect scrolling="no" on composited frames 4 https://bugs.webkit.org/show_bug.cgi?id=197972 5 <rdar://problem/50252398> 6 7 Reviewed by Simon Fraser. 8 9 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: 10 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: 11 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren): 12 13 Disallow scrolling based on canHaveScrollbars, similar to main frame. 14 15 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers): 16 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::scrollView const): 17 18 Factor into a function. 19 1 20 2019-05-17 Carlos Garcia Campos <cgarcia@igalia.com> 2 21 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h
r245134 r245465 34 34 35 35 OBJC_CLASS CALayer; 36 OBJC_CLASS UIScrollView; 36 37 OBJC_CLASS WKScrollingNodeScrollViewDelegate; 37 38 … … 74 75 75 76 private: 77 UIScrollView *scrollView() const; 78 76 79 RetainPtr<CALayer> m_scrollLayer; 77 80 RetainPtr<CALayer> m_scrolledContentsLayer; -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm
r245134 r245465 235 235 || scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin)) { 236 236 BEGIN_BLOCK_OBJC_EXCEPTIONS 237 UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; 238 ASSERT([scrollView isKindOfClass:[UIScrollView self]]); 239 237 UIScrollView *scrollView = this->scrollView(); 240 238 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollContainerLayer)) { 241 239 if (!m_scrollViewDelegate) … … 273 271 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::HorizontalSnapOffsets) || scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::VerticalSnapOffsets)) { 274 272 BEGIN_BLOCK_OBJC_EXCEPTIONS 275 UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; 276 ASSERT([scrollView isKindOfClass:[UIScrollView self]]); 277 278 scrollView.decelerationRate = scrollingNode().horizontalSnapOffsets().size() || scrollingNode().verticalSnapOffsets().size() ? UIScrollViewDecelerationRateFast : UIScrollViewDecelerationRateNormal; 279 #endif 273 scrollView().decelerationRate = scrollingNode().horizontalSnapOffsets().size() || scrollingNode().verticalSnapOffsets().size() ? UIScrollViewDecelerationRateFast : UIScrollViewDecelerationRateNormal; 280 274 END_BLOCK_OBJC_EXCEPTIONS 281 275 } 276 #endif 282 277 283 278 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollableAreaParams)) { 284 279 BEGIN_BLOCK_OBJC_EXCEPTIONS 285 UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; 286 ASSERT([scrollView isKindOfClass:[UIScrollView self]]); 280 UIScrollView *scrollView = this->scrollView(); 287 281 288 282 [scrollView setShowsHorizontalScrollIndicator:!scrollingNode().horizontalScrollbarHiddenByStyle()]; 289 283 [scrollView setShowsVerticalScrollIndicator:!scrollingNode().verticalScrollbarHiddenByStyle()]; 284 [scrollView setScrollEnabled:scrollingNode().canHaveScrollbars()]; 290 285 291 286 END_BLOCK_OBJC_EXCEPTIONS … … 303 298 304 299 BEGIN_BLOCK_OBJC_EXCEPTIONS 300 [scrollView() setContentOffset:scrollPosition]; 301 END_BLOCK_OBJC_EXCEPTIONS 302 } 303 304 void ScrollingTreeScrollingNodeDelegateIOS::scrollWillStart() const 305 { 306 scrollingTree().scrollingTreeNodeWillStartScroll(); 307 } 308 309 void ScrollingTreeScrollingNodeDelegateIOS::scrollDidEnd() const 310 { 311 scrollingTree().scrollingTreeNodeDidEndScroll(); 312 } 313 314 void ScrollingTreeScrollingNodeDelegateIOS::scrollViewWillStartPanGesture() const 315 { 316 scrollingTree().scrollingTreeNodeWillStartPanGesture(); 317 } 318 319 void ScrollingTreeScrollingNodeDelegateIOS::scrollViewDidScroll(const FloatPoint& scrollPosition, bool inUserInteraction) 320 { 321 if (m_updatingFromStateNode) 322 return; 323 324 scrollingNode().wasScrolledByDelegatedScrolling(scrollPosition); 325 } 326 327 void ScrollingTreeScrollingNodeDelegateIOS::currentSnapPointIndicesDidChange(unsigned horizontal, unsigned vertical) const 328 { 329 if (m_updatingFromStateNode) 330 return; 331 332 scrollingTree().currentSnapPointIndicesDidChange(scrollingNode().scrollingNodeID(), horizontal, vertical); 333 } 334 335 UIScrollView *ScrollingTreeScrollingNodeDelegateIOS::scrollView() const 336 { 305 337 UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; 306 338 ASSERT([scrollView isKindOfClass:[UIScrollView self]]); 307 [scrollView setContentOffset:scrollPosition]; 308 END_BLOCK_OBJC_EXCEPTIONS 309 } 310 311 void ScrollingTreeScrollingNodeDelegateIOS::scrollWillStart() const 312 { 313 scrollingTree().scrollingTreeNodeWillStartScroll(); 314 } 315 316 void ScrollingTreeScrollingNodeDelegateIOS::scrollDidEnd() const 317 { 318 scrollingTree().scrollingTreeNodeDidEndScroll(); 319 } 320 321 void ScrollingTreeScrollingNodeDelegateIOS::scrollViewWillStartPanGesture() const 322 { 323 scrollingTree().scrollingTreeNodeWillStartPanGesture(); 324 } 325 326 void ScrollingTreeScrollingNodeDelegateIOS::scrollViewDidScroll(const FloatPoint& scrollPosition, bool inUserInteraction) 327 { 328 if (m_updatingFromStateNode) 329 return; 330 331 scrollingNode().wasScrolledByDelegatedScrolling(scrollPosition); 332 } 333 334 void ScrollingTreeScrollingNodeDelegateIOS::currentSnapPointIndicesDidChange(unsigned horizontal, unsigned vertical) const 335 { 336 if (m_updatingFromStateNode) 337 return; 338 339 scrollingTree().currentSnapPointIndicesDidChange(scrollingNode().scrollingNodeID(), horizontal, vertical); 339 return scrollView; 340 340 } 341 341
Note:
See TracChangeset
for help on using the changeset viewer.