[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

cfleizach at apple.com cfleizach at apple.com
Sun Feb 20 23:11:13 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 99abb088d52355bf949358887e09376fbd90e104
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 18 20:27:48 2011 +0000

    REGRESSION: A problem with Voiceover and finding links
    https://bugs.webkit.org/show_bug.cgi?id=52324
    
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    Fallout from recent change to make WebCore return its own scroll view.
       1) There were two scroll views in the hierarchy, one which no needed to be ignored.
       2) Hit tests for sub frames needed to be offset.
       3) The check for whether an attachment is ignored must happen earlier than using
          the helpText to determine if an element should be ignored.
    
    Test: platform/mac/accessibility/iframe-with-title-correct-hierarchy.html
    
    * accessibility/AccessibilityObject.cpp:
    (WebCore::AccessibilityObject::elementAccessibilityHitTest):
    * accessibility/AccessibilityRenderObject.cpp:
    (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
    * accessibility/mac/AccessibilityObjectWrapper.mm:
    (-[AccessibilityObjectWrapper scrollViewParent]):
    
    Source/WebKit/mac:
    
    * WebView/WebDynamicScrollBarsView.mm:
    (-[WebDynamicScrollBarsView accessibilityIsIgnored]):
    
    LayoutTests:
    
    * platform/mac/accessibility/iframe-with-title-correct-hierarchy-expected.txt: Added.
    * platform/mac/accessibility/iframe-with-title-correct-hierarchy.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76044 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ca1361e..4f906be 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-18  Chris Fleizach  <cfleizach at apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION: A problem with Voiceover and finding links
+        https://bugs.webkit.org/show_bug.cgi?id=52324
+
+        * platform/mac/accessibility/iframe-with-title-correct-hierarchy-expected.txt: Added.
+        * platform/mac/accessibility/iframe-with-title-correct-hierarchy.html: Added.
+
 2011-01-18  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/platform/mac/accessibility/iframe-with-title-correct-hierarchy-expected.txt b/LayoutTests/platform/mac/accessibility/iframe-with-title-correct-hierarchy-expected.txt
new file mode 100644
index 0000000..7d65863
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/iframe-with-title-correct-hierarchy-expected.txt
@@ -0,0 +1,17 @@
+test
+
+This makes sure that if an iframe has a title attribute, it will still show up in the hierarchy correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS iframeScroll.role is 'AXRole: AXScrollArea'
+PASS iframeScroll.parentElement().role is 'AXRole: AXGroup'
+PASS iframeScroll.parentElement().parentElement().role is 'AXRole: AXWebArea'
+PASS iframeScroll.parentElement().parentElement().isEqual(bodyElement) is true
+PASS iframeWeb.parentElement().isEqual(iframeScroll) is true
+PASS hitTest.isEqual(iframeWeb) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/iframe-with-title-correct-hierarchy.html b/LayoutTests/platform/mac/accessibility/iframe-with-title-correct-hierarchy.html
new file mode 100644
index 0000000..845128f
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/iframe-with-title-correct-hierarchy.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+    var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<div role="button">test</div>
+<div style="position: relative; left: 100px">
+<iframe id="frame" scrolling=YES  width=100 height=100 border=1 title="iframe" src="resources/cake.png"></iframe>
+</div>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+    description("This makes sure that if an iframe has a title attribute, it will still show up in the hierarchy correctly.");
+
+    if (window.accessibilityController) {
+       document.getElementById("body").focus();
+       var bodyElement = accessibilityController.focusedElement;
+       document.getElementById("frame").focus();
+
+       // scroll area -> web area -> group -> iframe (scroll area)
+       var iframeScroll = accessibilityController.rootElement.childAtIndex(0).childAtIndex(1).childAtIndex(0);
+       shouldBe("iframeScroll.role", "'AXRole: AXScrollArea'");
+       shouldBe("iframeScroll.parentElement().role", "'AXRole: AXGroup'");
+       shouldBe("iframeScroll.parentElement().parentElement().role", "'AXRole: AXWebArea'");
+       shouldBeTrue("iframeScroll.parentElement().parentElement().isEqual(bodyElement)");
+
+       // web area (of scroll area)
+       var iframeWeb = iframeScroll.childAtIndex(0);
+       shouldBeTrue("iframeWeb.parentElement().isEqual(iframeScroll)");
+       var x = iframeWeb.x + 5;
+       var y = iframeWeb.y + 5;
+
+       var hitTest = accessibilityController.elementAtPoint(x, y);
+       shouldBeTrue("hitTest.isEqual(iframeWeb)");
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index c274545..10cafb9 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2011-01-18  Chris Fleizach  <cfleizach at apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION: A problem with Voiceover and finding links
+        https://bugs.webkit.org/show_bug.cgi?id=52324
+
+        Fallout from recent change to make WebCore return its own scroll view.
+           1) There were two scroll views in the hierarchy, one which no needed to be ignored.
+           2) Hit tests for sub frames needed to be offset.
+           3) The check for whether an attachment is ignored must happen earlier than using
+              the helpText to determine if an element should be ignored.
+
+        Test: platform/mac/accessibility/iframe-with-title-correct-hierarchy.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::elementAccessibilityHitTest):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+        * accessibility/mac/AccessibilityObjectWrapper.mm:
+        (-[AccessibilityObjectWrapper scrollViewParent]):
+
 2011-01-18  Adam Roben  <aroben at apple.com>
 
         Call alternate CFHTTPCookie functions if available
diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp
index 511bd3f..f2a2d7d 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp
@@ -1013,8 +1013,9 @@ AccessibilityObject* AccessibilityObject::elementAccessibilityHitTest(const IntP
     // Send the hit test back into the sub-frame if necessary.
     if (isAttachment()) {
         Widget* widget = widgetForAttachmentView();
+        // Normalize the point for the widget's bounds.
         if (widget && widget->isFrameView())
-            return axObjectCache()->getOrCreate(static_cast<ScrollView*>(widget))->accessibilityHitTest(point);
+            return axObjectCache()->getOrCreate(widget)->accessibilityHitTest(IntPoint(point - widget->frameRect().location()));
     }
 
     return const_cast<AccessibilityObject*>(this); 
diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
index 8b0c5ca..ca8d4a7 100644
--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -1772,6 +1772,10 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
     if (!isAllowedChildOfTree())
         return true;
 
+    // Allow the platform to decide if the attachment is ignored or not.
+    if (isAttachment())
+        return accessibilityIgnoreAttachment();
+    
     // ignore popup menu items because AppKit does
     for (RenderObject* parent = m_renderer->parent(); parent; parent = parent->parent()) {
         if (parent->isBoxModelObject() && toRenderBoxModelObject(parent)->isMenuList())
@@ -1817,9 +1821,6 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
     if (ariaRoleAttribute() != UnknownRole)
         return false;
 
-    if (!helpText().isEmpty())
-        return false;
-    
     // don't ignore labels, because they serve as TitleUIElements
     Node* node = m_renderer->node();
     if (node && node->hasTagName(labelTag))
@@ -1877,11 +1878,17 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
         return false;
     }
     
-    // make a platform-specific decision
-    if (isAttachment())
-        return accessibilityIgnoreAttachment();
+    if (isWebArea() || m_renderer->isListMarker())
+        return false;
+    
+    // Using the help text to decide an element's visibility is not as definitive
+    // as previous checks, so this should remain as one of the last.
+    if (!helpText().isEmpty())
+        return false;
     
-    return !m_renderer->isListMarker() && !isWebArea();
+    // By default, objects should be ignored so that the AX hierarchy is not 
+    // filled with unnecessary items.
+    return true;
 }
 
 bool AccessibilityRenderObject::isLoaded() const
diff --git a/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm b/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
index f3b388b..c2e3724 100644
--- a/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
+++ b/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
@@ -1455,7 +1455,7 @@ static NSString* roleValueToNSString(AccessibilityRole value)
         return nil;
     
     if (scroll->platformWidget())
-        return scroll->platformWidget();
+        return NSAccessibilityUnignoredAncestor(scroll->platformWidget());
 
     return [self remoteAccessibilityParentObject];
 }
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index fcd7edb..c072537 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-18  Chris Fleizach  <cfleizach at apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION: A problem with Voiceover and finding links
+        https://bugs.webkit.org/show_bug.cgi?id=52324
+
+        * WebView/WebDynamicScrollBarsView.mm:
+        (-[WebDynamicScrollBarsView accessibilityIsIgnored]):
+
 2011-01-17  David Kilzer  <ddkilzer at apple.com>
 
         <http://webkit.org/b/52596> Add missing DOMDocument/DOMDocumentFragment headers to Xcode project
diff --git a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
index 79c3067..b8edef8 100644
--- a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
+++ b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
@@ -565,11 +565,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
 
 - (BOOL)accessibilityIsIgnored 
 {
-    id docView = [self documentView];
-    if ([docView isKindOfClass:[WebFrameView class]] && ![(WebFrameView *)docView allowsScrolling])
-        return YES;
-    
-    return [super accessibilityIsIgnored];
+    return YES;
 }
 
 - (void)setScrollOrigin:(NSPoint)scrollOrigin updatePosition:(BOOL)updatePosition

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list