<rdar://problem/5119360> ER - Seed: Google results do not have AXHeading information
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2008 19:36:01 +0000 (19:36 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2008 19:36:01 +0000 (19:36 +0000)
Make headers appear in AX regardless of whether they have BlockFlow renderers or not

Reviewed by Darin Adler.

* page/mac/WebCoreAXObject.mm:
(headingLevel): no longer ignores BlockFlow rendered headers
(-[WebCoreAXObject accessibilityIsIgnored]): does not ignore headers

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30760 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/mac/WebCoreAXObject.mm

index be7a39f3a1d562ad38007a86dfebb2d751d650ed..b97e43f234dcac1ec3d9feacc29fa35bf0a49502 100644 (file)
@@ -1,3 +1,13 @@
+2008-03-04  Chris Fleizach  <cfleizach@apple.com>
+
+        Reviewed by Darin Adler.
+
+        - fix <rdar://problem/5119360> ER - Seed: Google results do not have AXHeading information
+
+        * page/mac/WebCoreAXObject.mm:
+        (headingLevel):
+        (-[WebCoreAXObject accessibilityIsIgnored]):
+
 2008-03-04  Sam Weinig  <sam@webkit.org>
 
         GTK+ build fix.
index d514b0e3230dadebad5269e07d7a434d8fd740e1..7bc2b9674902e23ac991fc3f3dd9e9afb65a4d7a 100644 (file)
@@ -363,9 +363,7 @@ static int blockquoteLevel(RenderObject* renderer)
 
 static int headingLevel(RenderObject* renderer)
 {
-    if (!renderer->isBlockFlow())
-        return 0;
-        
+    // headings can be in block flow and non-block flow
     Node* node = renderer->element();
     if (!node)
         return 0;
@@ -841,6 +839,9 @@ static IntRect boundingBoxRect(RenderObject* obj)
     if ([self isAttachment])
         return [[self attachmentView] accessibilityIsIgnored];
         
+    if ([self isHeading])
+        return NO;
+    
     if (m_areaElement || (m_renderer->element() && m_renderer->element()->isLink()))
         return NO;