Title: [169081] trunk
Revision
169081
Author
cfleiz...@apple.com
Date
2014-05-19 16:37:56 -0700 (Mon, 19 May 2014)

Log Message

AX: VoiceOver sees the WebArea out of order when topContentInset is used
https://bugs.webkit.org/show_bug.cgi?id=133091

Reviewed by Simon Fraser.


Source/WebCore: 
Modify the scroll view's frame so that it recognizes the content inset.
This is needed so that when VoiceOver sorts elements to create an ordering,
the web area is not ordered at the top of the screen.

Test: platform/mac-wk2/accessibility/content-inset-scrollview-frame.html

* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::elementRect):

LayoutTests: 
* platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt: Added.
* platform/mac-wk2/accessibility/content-inset-scrollview-frame.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (169080 => 169081)


--- trunk/LayoutTests/ChangeLog	2014-05-19 23:08:58 UTC (rev 169080)
+++ trunk/LayoutTests/ChangeLog	2014-05-19 23:37:56 UTC (rev 169081)
@@ -1,3 +1,13 @@
+2014-05-19  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: VoiceOver sees the WebArea out of order when topContentInset is used
+        https://bugs.webkit.org/show_bug.cgi?id=133091
+
+        Reviewed by Simon Fraser.
+
+        * platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt: Added.
+        * platform/mac-wk2/accessibility/content-inset-scrollview-frame.html: Added.
+
 2014-05-19  Simon Fraser  <simon.fra...@apple.com>
 
         Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes

Added: trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt (0 => 169081)


--- trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt	2014-05-19 23:37:56 UTC (rev 169081)
@@ -0,0 +1,14 @@
+This tests that a page with a content inset will not affect the bounds of the main frame scroll view. It will appear as the same as the web area's sbounds
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Web area role: AXRole: AXWebArea
+WebArea frame: {-10000, 10300}, {800, 600}
+ScrollView role: AXRole: AXScrollArea
+ScrollView frame (0 content inset): {-10000, 10300}, {800, 600}
+ScrollView frame (100 content inset): {-10000, 10200}, {800, 600}
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame.html (0 => 169081)


--- trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame.html	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame.html	2014-05-19 23:37:56 UTC (rev 169081)
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that a page with a content inset will not affect the bounds of the main frame scroll view. It will appear as the same as the web area's sbounds");
+
+    function outputFrame(message, element) {
+        debug(message + ": {" + element.x + ", " + element.y + "}, {" + element.width + ", " + element.height + "}");
+    }
+
+    if (window.accessibilityController) {
+        var webArea = accessibilityController.rootElement.childAtIndex(0);
+        debug("Web area role: " + webArea.role);
+        outputFrame("WebArea frame", webArea);
+
+        var scrollView = webArea.parentElement();
+        debug("ScrollView role: " + scrollView.role);
+        outputFrame("ScrollView frame (0 content inset)", scrollView);
+    
+        window.internals.setTopContentInset(100);
+
+        outputFrame("ScrollView frame (100 content inset)", scrollView);
+    }
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (169080 => 169081)


--- trunk/Source/WebCore/ChangeLog	2014-05-19 23:08:58 UTC (rev 169080)
+++ trunk/Source/WebCore/ChangeLog	2014-05-19 23:37:56 UTC (rev 169081)
@@ -1,3 +1,19 @@
+2014-05-19  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: VoiceOver sees the WebArea out of order when topContentInset is used
+        https://bugs.webkit.org/show_bug.cgi?id=133091
+
+        Reviewed by Simon Fraser.
+
+        Modify the scroll view's frame so that it recognizes the content inset.
+        This is needed so that when VoiceOver sorts elements to create an ordering,
+        the web area is not ordered at the top of the screen.
+
+        Test: platform/mac-wk2/accessibility/content-inset-scrollview-frame.html
+
+        * accessibility/AccessibilityScrollView.cpp:
+        (WebCore::AccessibilityScrollView::elementRect):
+
 2014-05-19  Beth Dakin  <bda...@apple.com>
 
         Scrollbars display incorrectly after switching between fast and slow scrolling 

Modified: trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp (169080 => 169081)


--- trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp	2014-05-19 23:08:58 UTC (rev 169080)
+++ trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp	2014-05-19 23:37:56 UTC (rev 169081)
@@ -221,7 +221,9 @@
     if (!m_scrollView)
         return LayoutRect();
 
-    return m_scrollView->frameRect();
+    LayoutRect rect = m_scrollView->frameRect();
+    rect.setY(rect.y() + m_scrollView->topContentInset());
+    return rect;
 }
 
 FrameView* AccessibilityScrollView::documentFrameView() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to