WebKit Bugzilla
Attachment 370094 Details for
Bug 197972
: [iOS] Respect scrolling="no" on composited frames
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
frame-scrolling-no.patch (text/plain), 10.46 KB, created by
Antti Koivisto
on 2019-05-16 17:50:15 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-05-16 17:50:15 PDT
Size:
10.46 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 245429) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2019-05-16 Antti Koivisto <antti@apple.com> >+ >+ [iOS] Respect scrolling="no" on composited frames >+ https://bugs.webkit.org/show_bug.cgi?id=197972 >+ <rdar://problem/50252398> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: >+ (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren): >+ >+ Disallow scrolling based on canHaveScrollbars, similar to main frame. >+ >+ (WebKit::ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers): >+ (WebKit::ScrollingTreeScrollingNodeDelegateIOS::scrollView const): >+ >+ Factor into a function. >+ > 2019-05-16 John Wilander <wilander@apple.com> > > Storage Access API: Call completion handlers in NetworkConnectionToWebProcess::hasStorageAccess() and NetworkConnectionToWebProcess::requestStorageAccess() when feature is off >Index: Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h >=================================================================== >--- Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (revision 245274) >+++ Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (working copy) >@@ -33,6 +33,7 @@ > #include <WebCore/ScrollingTreeScrollingNodeDelegate.h> > > OBJC_CLASS CALayer; >+OBJC_CLASS UIScrollView; > OBJC_CLASS WKScrollingNodeScrollViewDelegate; > > namespace WebCore { >@@ -73,6 +74,8 @@ public: > #endif > > private: >+ UIScrollView *scrollView() const; >+ > RetainPtr<CALayer> m_scrollLayer; > RetainPtr<CALayer> m_scrolledContentsLayer; > RetainPtr<WKScrollingNodeScrollViewDelegate> m_scrollViewDelegate; >Index: Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm >=================================================================== >--- Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (revision 245274) >+++ Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (working copy) >@@ -234,9 +234,7 @@ void ScrollingTreeScrollingNodeDelegateI > || scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition) > || scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin)) { > BEGIN_BLOCK_OBJC_EXCEPTIONS >- UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; >- ASSERT([scrollView isKindOfClass:[UIScrollView self]]); >- >+ UIScrollView *scrollView = this->scrollView(); > if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollContainerLayer)) { > if (!m_scrollViewDelegate) > m_scrollViewDelegate = adoptNS([[WKScrollingNodeScrollViewDelegate alloc] initWithScrollingTreeNodeDelegate:this]); >@@ -272,21 +270,18 @@ void ScrollingTreeScrollingNodeDelegateI > // FIXME: If only one axis snaps in 2D scrolling, the other axis will decelerate fast as well. Is this what we want? > if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::HorizontalSnapOffsets) || scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::VerticalSnapOffsets)) { > BEGIN_BLOCK_OBJC_EXCEPTIONS >- UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; >- ASSERT([scrollView isKindOfClass:[UIScrollView self]]); >- >- scrollView.decelerationRate = scrollingNode().horizontalSnapOffsets().size() || scrollingNode().verticalSnapOffsets().size() ? UIScrollViewDecelerationRateFast : UIScrollViewDecelerationRateNormal; >-#endif >+ scrollView().decelerationRate = scrollingNode().horizontalSnapOffsets().size() || scrollingNode().verticalSnapOffsets().size() ? UIScrollViewDecelerationRateFast : UIScrollViewDecelerationRateNormal; > END_BLOCK_OBJC_EXCEPTIONS > } >+#endif > > if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollableAreaParams)) { > BEGIN_BLOCK_OBJC_EXCEPTIONS >- UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; >- ASSERT([scrollView isKindOfClass:[UIScrollView self]]); >+ UIScrollView *scrollView = this->scrollView(); > > [scrollView setShowsHorizontalScrollIndicator:!scrollingNode().horizontalScrollbarHiddenByStyle()]; > [scrollView setShowsVerticalScrollIndicator:!scrollingNode().verticalScrollbarHiddenByStyle()]; >+ [scrollView setScrollEnabled:scrollingNode().canHaveScrollbars()]; > > END_BLOCK_OBJC_EXCEPTIONS > } >@@ -302,9 +297,7 @@ void ScrollingTreeScrollingNodeDelegateI > auto scrollPosition = scrollingNode().currentScrollPosition(); > > BEGIN_BLOCK_OBJC_EXCEPTIONS >- UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; >- ASSERT([scrollView isKindOfClass:[UIScrollView self]]); >- [scrollView setContentOffset:scrollPosition]; >+ [scrollView() setContentOffset:scrollPosition]; > END_BLOCK_OBJC_EXCEPTIONS > } > >@@ -339,6 +332,13 @@ void ScrollingTreeScrollingNodeDelegateI > scrollingTree().currentSnapPointIndicesDidChange(scrollingNode().scrollingNodeID(), horizontal, vertical); > } > >+UIScrollView *ScrollingTreeScrollingNodeDelegateIOS::scrollView() const >+{ >+ UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; >+ ASSERT([scrollView isKindOfClass:[UIScrollView self]]); >+ return scrollView; >+} >+ > #if ENABLE(POINTER_EVENTS) > void ScrollingTreeScrollingNodeDelegateIOS::computeActiveTouchActionsForGestureRecognizer(UIGestureRecognizer* gestureRecognizer) > { >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 245274) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2019-05-16 Antti Koivisto <antti@apple.com> >+ >+ [iOS] Respect scrolling="no" on composited frames >+ https://bugs.webkit.org/show_bug.cgi?id=197972 >+ <rdar://problem/50252398> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/scrolling/ios/body-overflow-hidden-frame-expected.html: >+ * fast/scrolling/ios/body-overflow-hidden-frame.html: >+ >+ Also fix overflow:hidden test so that the frame content forces composition. >+ >+ * fast/scrolling/ios/frame-scrolling-no-expected.html: Added. >+ * fast/scrolling/ios/frame-scrolling-no.html: Added. >+ > 2019-05-13 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] When running layout tests that tap in the same location, subsequent tests fail to fire click handlers >Index: LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame-expected.html >=================================================================== >--- LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame-expected.html (revision 245274) >+++ LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame-expected.html (working copy) >@@ -11,7 +11,7 @@ body { overflow: hidden } > <html> > <style> > body { overflow: hidden } >- .scroll-content { width: 500px; height: 5000px; border: 2px solid green; } >+ .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } > </style> > <body> > <div class='scroll-content'> >Index: LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame.html >=================================================================== >--- LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame.html (revision 245274) >+++ LayoutTests/fast/scrolling/ios/body-overflow-hidden-frame.html (working copy) >@@ -32,7 +32,7 @@ async function runTest() { > <html> > <style> > body { overflow: hidden } >- .scroll-content { width: 500px; height: 5000px; border: 2px solid green; } >+ .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } > </style> > <body> > <div class='scroll-content'> >Index: LayoutTests/fast/scrolling/ios/frame-scrolling-no-expected.html >=================================================================== >--- LayoutTests/fast/scrolling/ios/frame-scrolling-no-expected.html (nonexistent) >+++ LayoutTests/fast/scrolling/ios/frame-scrolling-no-expected.html (working copy) >@@ -0,0 +1,24 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true internal:AsyncFrameScrollingEnabled=true ] --> >+<html> >+<head> >+<meta name="viewport" content="width=device-width, initial-scale=1"> >+<style> >+body { overflow: hidden } >+.scroll-content { width: 500px; height: 5000px; border: 2px solid green; } >+</style> >+<body> >+<iframe scrolling="no" srcdoc=" >+ <html> >+ <style> >+ .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } >+ </style> >+ <body> >+ <div class='scroll-content'> >+ This document shouldn't be scrollable. >+ </div> >+ </body> >+ </html> >+" width=500 height=500> >+</iframe> >+</body> >+</html> >Index: LayoutTests/fast/scrolling/ios/frame-scrolling-no.html >=================================================================== >--- LayoutTests/fast/scrolling/ios/frame-scrolling-no.html (nonexistent) >+++ LayoutTests/fast/scrolling/ios/frame-scrolling-no.html (working copy) >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true internal:AsyncFrameScrollingEnabled=true ] --> >+<html> >+<head> >+<meta name="viewport" content="width=device-width, initial-scale=1"> >+<script src="../../../resources/basic-gestures.js"></script> >+<style> >+body { overflow: hidden } >+.scroll-content { width: 500px; height: 5000px; border: 2px solid green; } >+</style> >+<script> >+if (window.testRunner) >+ testRunner.waitUntilDone(); >+ >+function waitPromise(delay) >+{ >+ return new Promise(resolve => setTimeout(resolve, delay)); >+} >+ >+async function runTest() { >+ if (!window.testRunner) >+ return; >+ >+ await touchAndDragFromPointToPoint(150, 300, 150, 150); >+ await liftUpAtPoint(150, 150); >+ await waitPromise(50); >+ >+ testRunner.notifyDone(); >+} >+</script> >+<body onload="runTest()"> >+<iframe scrolling="no" srcdoc=" >+ <html> >+ <style> >+ .scroll-content { width: 500px; height: 5000px; border: 2px solid green; transform:translateZ(0) } >+ </style> >+ <body> >+ <div class='scroll-content'> >+ This document shouldn't be scrollable. >+ </div> >+ </body> >+ </html> >+" width=500 height=500> >+</iframe> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197972
: 370094