https://bugs.webkit.org/show_bug.cgi?id=196013
<rdar://problem/
49066649>
Reviewed by Simon Fraser.
Source/WebCore:
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.
Source/WebKit:
Add missing scroll offset <-> scroll position conversions.
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::scrollViewDidScroll):
LayoutTests:
* 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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245568
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-05-21 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 Simon Fraser.
+
+ * 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-21 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Add initial accessibility support using ATK
--- /dev/null
+<style>
+#container {
+ width: 300px;
+ height: 300px;
+ background-color: green;
+}
+</style>
+<div id="container">
+</div>
--- /dev/null
+<!-- 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>
-<!-- webkit-test-runner [ useThreadedScrolling=false ] -->
+<!-- webkit-test-runner [ useThreadedScrolling=false internal:AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<script type="text/javascript">
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 ]
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 ]
--- /dev/null
+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]
+2019-05-21 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 Simon Fraser.
+
+ 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-21 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Add initial accessibility support using ATK
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)
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
+2019-05-21 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 Simon Fraser.
+
+ 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-21 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Add initial accessibility support using ATK
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(); }
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
}
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);
}