Title: [233376] trunk
- Revision
- 233376
- Author
- n_w...@apple.com
- Date
- 2018-06-29 16:33:30 -0700 (Fri, 29 Jun 2018)
Log Message
AX: [iOS] VoiceOver scroll position is jumpy in frames
https://bugs.webkit.org/show_bug.cgi?id=186956
Reviewed by Simon Fraser.
Source/WebCore:
iOS is using delegate scrolling and we should not take into account
the scroll offset when converting rects.
Also fixed a issue where we want to scroll the element into view even
if it's partially visible.
Test: fast/scrolling/ios/iframe-scroll-into-view.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::scrollToMakeVisible const):
* platform/ScrollView.cpp:
(WebCore::ScrollView::contentsToContainingViewContents const):
LayoutTests:
* fast/scrolling/ios/iframe-scroll-into-view-expected.html: Added.
* fast/scrolling/ios/iframe-scroll-into-view.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (233375 => 233376)
--- trunk/LayoutTests/ChangeLog 2018-06-29 23:17:45 UTC (rev 233375)
+++ trunk/LayoutTests/ChangeLog 2018-06-29 23:33:30 UTC (rev 233376)
@@ -1,3 +1,13 @@
+2018-06-29 Nan Wang <n_w...@apple.com>
+
+ AX: [iOS] VoiceOver scroll position is jumpy in frames
+ https://bugs.webkit.org/show_bug.cgi?id=186956
+
+ Reviewed by Simon Fraser.
+
+ * fast/scrolling/ios/iframe-scroll-into-view-expected.html: Added.
+ * fast/scrolling/ios/iframe-scroll-into-view.html: Added.
+
2018-06-29 Truitt Savell <tsav...@apple.com>
Layout Test webrtc/datachannel/mdns-ice-candidates.html is flaky
Added: trunk/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view-expected.html (0 => 233376)
--- trunk/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view-expected.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view-expected.html 2018-06-29 23:33:30 UTC (rev 233376)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<style>
+body {
+ margin: 0;
+}
+.frame {
+ height: 200px;
+ width: 200px;
+}
+</style>
+</head>
+
+ <body>
+<div class="frame">This tests that the iframe should be scroll to the top of the page on iOS.</div>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view.html (0 => 233376)
--- trunk/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view.html 2018-06-29 23:33:30 UTC (rev 233376)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<style>
+body {
+ margin: 0;
+}
+iframe {
+ border: 0;
+ height: 200px;
+ width: 200px;
+}
+</style>
+</head>
+
+ <body>
+<div style="height: 2000px;"></div>
+<iframe srcdoc="<body style='margin: 0;'><div>This tests that the iframe should be scroll to the top of the page on iOS.</div></body>" _onload_="runTest()"></iframe>
+<div style="height: 2000px;"></div>
+</body>
+
+<script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function runTest() {
+ window.scrollTo(0, 200);
+ window.frames[0].document.body.scrollIntoView();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ </script>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (233375 => 233376)
--- trunk/Source/WebCore/ChangeLog 2018-06-29 23:17:45 UTC (rev 233375)
+++ trunk/Source/WebCore/ChangeLog 2018-06-29 23:33:30 UTC (rev 233376)
@@ -1,3 +1,23 @@
+2018-06-29 Nan Wang <n_w...@apple.com>
+
+ AX: [iOS] VoiceOver scroll position is jumpy in frames
+ https://bugs.webkit.org/show_bug.cgi?id=186956
+
+ Reviewed by Simon Fraser.
+
+ iOS is using delegate scrolling and we should not take into account
+ the scroll offset when converting rects.
+
+ Also fixed a issue where we want to scroll the element into view even
+ if it's partially visible.
+
+ Test: fast/scrolling/ios/iframe-scroll-into-view.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::scrollToMakeVisible const):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::contentsToContainingViewContents const):
+
2018-06-29 Chris Dumez <cdu...@apple.com>
WebKitLegacy: Can trigger recursive loads triggering debug assertions
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (233375 => 233376)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2018-06-29 23:17:45 UTC (rev 233375)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2018-06-29 23:33:30 UTC (rev 233376)
@@ -2992,7 +2992,7 @@
parentObject()->scrollToMakeVisible();
if (auto* renderer = this->renderer())
- renderer->scrollRectToVisible(SelectionRevealMode::Reveal, boundingBoxRect(), false, ScrollAlignment::alignCenterIfNotVisible, ScrollAlignment::alignCenterIfNotVisible, ShouldAllowCrossOriginScrolling::Yes);
+ renderer->scrollRectToVisible(SelectionRevealMode::Reveal, boundingBoxRect(), false, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded, ShouldAllowCrossOriginScrolling::Yes);
}
void AccessibilityObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (233375 => 233376)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2018-06-29 23:17:45 UTC (rev 233375)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2018-06-29 23:33:30 UTC (rev 233376)
@@ -847,6 +847,9 @@
IntRect ScrollView::contentsToContainingViewContents(IntRect rect) const
{
+ if (delegatesScrolling())
+ return convertToContainingView(contentsToView(rect));
+
if (const ScrollView* parentScrollView = parent()) {
IntRect rectInContainingView = convertToContainingView(contentsToView(rect));
return parentScrollView->viewToContents(rectInContainingView);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes