WebKit Bugzilla
Attachment 370293 Details for
Bug 196013
: RTL/overflow scroll tests fail with async overflow enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
rtl-overflow.patch (text/plain), 11.70 KB, created by
Antti Koivisto
on 2019-05-20 19:35:57 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-05-20 19:35:57 PDT
Size:
11.70 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 245535) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+2019-05-20 Antti Koivisto <antti@apple.com> >+ >+ RTL/overflow scroll tests fail with async overflow enabled >+ https://bugs.webkit.org/show_bug.cgi?id=196013 >+ <rdar://problem/49066649> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: compositing/ios/rtl-overflow-scrolling-2.html >+ >+ This patch makes the basic RTL cases work in the scrolling tree. >+ >+ * page/scrolling/AsyncScrollingCoordinator.cpp: >+ (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): >+ * page/scrolling/ScrollingTreeScrollingNode.cpp: >+ (WebCore::ScrollingTreeScrollingNode::minimumScrollPosition const): >+ (WebCore::ScrollingTreeScrollingNode::maximumScrollPosition const): >+ >+ Add missing scroll offset <-> scroll position conversions. >+ > 2019-05-20 Gabe Giosia <giosia@google.com> > > Range getBoundingClientRect returning zero rect on simple text node with <br> before it >Index: Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >=================================================================== >--- Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (revision 245535) >+++ Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (working copy) >@@ -335,7 +335,7 @@ void AsyncScrollingCoordinator::updateSc > if (auto* scrollableArea = frameView.scrollableAreaForScrollLayerID(scrollingNodeID)) { > auto previousScrollType = scrollableArea->currentScrollType(); > scrollableArea->setCurrentScrollType(scrollType); >- scrollableArea->scrollToOffsetWithoutAnimation(scrollPosition); >+ scrollableArea->scrollToOffsetWithoutAnimation(ScrollableArea::scrollOffsetFromPosition(scrollPosition, toFloatSize(scrollableArea->scrollOrigin()))); > scrollableArea->setCurrentScrollType(previousScrollType); > > if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) >Index: Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp >=================================================================== >--- Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp (revision 245535) >+++ Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp (working copy) >@@ -125,13 +125,15 @@ FloatPoint ScrollingTreeScrollingNode::c > > FloatPoint ScrollingTreeScrollingNode::minimumScrollPosition() const > { >- return { }; >+ auto minimumScrollOffset = FloatPoint { }; >+ return ScrollableArea::scrollPositionFromOffset(minimumScrollOffset, toFloatSize(scrollOrigin())); > } > > FloatPoint ScrollingTreeScrollingNode::maximumScrollPosition() const > { > FloatPoint contentSizePoint(totalContentsSize()); >- return FloatPoint(contentSizePoint - scrollableAreaSize()).expandedTo(FloatPoint()); >+ auto maximumScrollOffset = FloatPoint(contentSizePoint - scrollableAreaSize()).expandedTo(FloatPoint()); >+ return ScrollableArea::scrollPositionFromOffset(maximumScrollOffset, toFloatSize(scrollOrigin())); > } > > bool ScrollingTreeScrollingNode::scrollLimitReached(const PlatformWheelEvent& wheelEvent) const >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 245545) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2019-05-20 Antti Koivisto <antti@apple.com> >+ >+ RTL/overflow scroll tests fail with async overflow enabled >+ https://bugs.webkit.org/show_bug.cgi?id=196013 >+ <rdar://problem/49066649> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add missing scroll offset <-> scroll position conversions. >+ >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: >+ (WebKit::ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers): >+ (WebKit::ScrollingTreeScrollingNodeDelegateIOS::scrollViewDidScroll): >+ > 2019-05-20 Ross Kirsling <ross.kirsling@sony.com> > > Make lossy LayoutUnit constructors explicit >Index: Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h >=================================================================== >--- Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (revision 245535) >+++ Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (working copy) >@@ -55,7 +55,7 @@ public: > void scrollWillStart() const; > void scrollDidEnd() const; > void scrollViewWillStartPanGesture() const; >- void scrollViewDidScroll(const WebCore::FloatPoint& scrollPosition, bool inUserInteraction); >+ void scrollViewDidScroll(const WebCore::FloatPoint& scrollOffset, bool inUserInteraction); > > void currentSnapPointIndicesDidChange(unsigned horizontal, unsigned vertical) const; > CALayer *scrollLayer() const { return m_scrollLayer.get(); } >Index: Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm >=================================================================== >--- Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (revision 245535) >+++ Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (working copy) >@@ -294,10 +294,9 @@ void ScrollingTreeScrollingNodeDelegateI > > void ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers() > { >- auto scrollPosition = scrollingNode().currentScrollPosition(); >- > BEGIN_BLOCK_OBJC_EXCEPTIONS >- [scrollView() setContentOffset:scrollPosition]; >+ auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(scrollingNode().currentScrollPosition(), toFloatSize(scrollOrigin())); >+ [scrollView() setContentOffset:scrollOffset]; > END_BLOCK_OBJC_EXCEPTIONS > } > >@@ -316,11 +315,12 @@ void ScrollingTreeScrollingNodeDelegateI > scrollingTree().scrollingTreeNodeWillStartPanGesture(); > } > >-void ScrollingTreeScrollingNodeDelegateIOS::scrollViewDidScroll(const FloatPoint& scrollPosition, bool inUserInteraction) >+void ScrollingTreeScrollingNodeDelegateIOS::scrollViewDidScroll(const FloatPoint& scrollOffset, bool inUserInteraction) > { > if (m_updatingFromStateNode) > return; > >+ auto scrollPosition = ScrollableArea::scrollPositionFromOffset(scrollOffset, toFloatSize(scrollOrigin())); > scrollingNode().wasScrolledByDelegatedScrolling(scrollPosition); > } > >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 245535) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2019-05-20 Antti Koivisto <antti@apple.com> >+ >+ RTL/overflow scroll tests fail with async overflow enabled >+ https://bugs.webkit.org/show_bug.cgi?id=196013 >+ <rdar://problem/49066649> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * compositing/ios/rtl-overflow-scrolling-2-expected.html: Added. >+ * compositing/ios/rtl-overflow-scrolling-2.html: Added. >+ >+ Add a reftest version for better coverage. >+ >+ * compositing/rtl/rtl-overflow-scrolling.html: >+ * platform/ios-wk1/TestExpectations: >+ * platform/ios-wk2/TestExpectations: >+ * platform/ios-wk2/compositing/rtl/rtl-overflow-scrolling-expected.txt: Added. >+ > 2019-05-20 Gabe Giosia <giosia@google.com> > > Range getBoundingClientRect returning zero rect on simple text node with <br> before it >Index: LayoutTests/compositing/ios/rtl-overflow-scrolling-2-expected.html >=================================================================== >--- LayoutTests/compositing/ios/rtl-overflow-scrolling-2-expected.html (nonexistent) >+++ LayoutTests/compositing/ios/rtl-overflow-scrolling-2-expected.html (working copy) >@@ -0,0 +1,9 @@ >+<style> >+#container { >+ width: 300px; >+ height: 300px; >+ background-color: green; >+} >+</style> >+<div id="container"> >+</div> >Index: LayoutTests/compositing/ios/rtl-overflow-scrolling-2.html >=================================================================== >--- LayoutTests/compositing/ios/rtl-overflow-scrolling-2.html (nonexistent) >+++ LayoutTests/compositing/ios/rtl-overflow-scrolling-2.html (working copy) >@@ -0,0 +1,38 @@ >+<!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+<script type="text/javascript"> >+ function runTest() { >+ document.getElementById("container").scrollLeft = -500; >+ } >+</script> >+<style> >+#container { >+ direction: rtl; >+ overflow: scroll; >+ width: 300px; >+ height: 300px; >+} >+#overflow { >+ width: 1000px; >+ height: 1000px; >+ background-color: red; >+} >+#inner { >+ margin-left: 200px; >+ margin-right: 500px; >+ width: 300px; >+ height: 1000px; >+ background-color: green; >+} >+</style> >+</head> >+<body onload="runTest();"> >+<div id="container"> >+<div id="overflow"> >+<div id="inner"> >+</div> >+</div> >+</div> >+</body> >+</html> >Index: LayoutTests/compositing/rtl/rtl-overflow-scrolling.html >=================================================================== >--- LayoutTests/compositing/rtl/rtl-overflow-scrolling.html (revision 245535) >+++ LayoutTests/compositing/rtl/rtl-overflow-scrolling.html (working copy) >@@ -1,4 +1,4 @@ >-<!-- webkit-test-runner [ useThreadedScrolling=false ] --> >+<!-- webkit-test-runner [ useThreadedScrolling=false internal:AsyncOverflowScrollingEnabled=true ] --> > <html> > <head> > <script type="text/javascript"> >Index: LayoutTests/platform/ios-wk1/TestExpectations >=================================================================== >--- LayoutTests/platform/ios-wk1/TestExpectations (revision 245535) >+++ LayoutTests/platform/ios-wk1/TestExpectations (working copy) >@@ -629,6 +629,7 @@ compositing/overlap-blending/nested-over > compositing/overlap-blending/reflection-opacity-huge.html [ ImageOnlyFailure ] > compositing/text-on-scaled-layer.html [ ImageOnlyFailure ] > compositing/text-on-scaled-surface.html [ ImageOnlyFailure ] >+compositing/ios/rtl-overflow-scrolling-2.html [ ImageOnlyFailure ] > > # Compositing tests that are flaky: > compositing/cliprect-and-position-change-on-compositing-layer.html [ ImageOnlyFailure Pass ] >Index: LayoutTests/platform/ios-wk2/TestExpectations >=================================================================== >--- LayoutTests/platform/ios-wk2/TestExpectations (revision 245535) >+++ LayoutTests/platform/ios-wk2/TestExpectations (working copy) >@@ -1312,7 +1312,6 @@ webkit.org/b/194253 [ Debug ] scrollingc > webkit.org/b/195341 fast/viewport/ios/device-width-viewport-after-changing-view-scale.html [ Pass Failure ] > webkit.org/b/195341 compositing/ios/overflow-scroll-update-overlap.html [ ImageOnlyFailure ] > >-webkit.org/b/196013 compositing/rtl/rtl-overflow-scrolling.html [ Failure ] > webkit.org/b/196013 fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html [ ImageOnlyFailure ] > webkit.org/b/196013 fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html [ ImageOnlyFailure ] > webkit.org/b/196013 fast/scrolling/rubber-band-shows-background.html [ ImageOnlyFailure ] >Index: LayoutTests/platform/ios-wk2/compositing/rtl/rtl-overflow-scrolling-expected.txt >=================================================================== >--- LayoutTests/platform/ios-wk2/compositing/rtl/rtl-overflow-scrolling-expected.txt (nonexistent) >+++ LayoutTests/platform/ios-wk2/compositing/rtl/rtl-overflow-scrolling-expected.txt (working copy) >@@ -0,0 +1,8 @@ >+layer at (0,0) size 800x600 >+ RenderView at (0,0) size 800x600 >+layer at (0,0) size 800x600 >+ RenderBlock {HTML} at (0,0) size 800x600 >+ RenderBody {BODY} at (8,8) size 784x584 >+layer at (8,8) size 300x300 scrollX -15 scrollWidth 1000 scrollHeight 1000 >+ RenderBlock {DIV} at (0,0) size 300x300 >+ RenderBlock {DIV} at (-700,0) size 1000x1000 [bgcolor=#008000]
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 196013
: 370293