2011-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 20:18:53 +0000 (20:18 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 20:18:53 +0000 (20:18 +0000)
        Unreviewed, rolling out r82295 and r82300.
        http://trac.webkit.org/changeset/82295
        http://trac.webkit.org/changeset/82300
        https://bugs.webkit.org/show_bug.cgi?id=57380

        This patch breaks compile on Chromium (Requested by
        abarth|gardener on #webkit).

        * platform/gtk/accessibility/aria-roles-unignored-expected.txt: Removed.
        * platform/gtk/accessibility/aria-roles-unignored.html: Removed.
2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r82295 and r82300.
        http://trac.webkit.org/changeset/82295
        http://trac.webkit.org/changeset/82300
        https://bugs.webkit.org/show_bug.cgi?id=57380

        This patch breaks compile on Chromium (Requested by
        abarth|gardener on #webkit).

        * public/WebAccessibilityRole.h:
        * src/AssertMatchingEnums.cpp:
2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r82295 and r82300.
        http://trac.webkit.org/changeset/82295
        http://trac.webkit.org/changeset/82300
        https://bugs.webkit.org/show_bug.cgi?id=57380

        This patch breaks compile on Chromium (Requested by
        abarth|gardener on #webkit).

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
        (atkRole):
        (webkit_accessible_get_role):
        * accessibility/mac/AccessibilityObjectWrapper.mm:

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

LayoutTests/ChangeLog
LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt [deleted file]
LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebAccessibilityRole.h
Source/WebKit/chromium/src/AssertMatchingEnums.cpp

index 1a6c436..b545bfa 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r82295 and r82300.
+        http://trac.webkit.org/changeset/82295
+        http://trac.webkit.org/changeset/82300
+        https://bugs.webkit.org/show_bug.cgi?id=57380
+
+        This patch breaks compile on Chromium (Requested by
+        abarth|gardener on #webkit).
+
+        * platform/gtk/accessibility/aria-roles-unignored-expected.txt: Removed.
+        * platform/gtk/accessibility/aria-roles-unignored.html: Removed.
+
 2011-03-29  David Hyatt  <hyatt@apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt b/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt
deleted file mode 100644 (file)
index 3255164..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-Simple paragraph
-
-A paragraph pretending to be a table
-
-A label Who said label? It's a heading!
-A form with a button Click me!
-Just a button Click me!
-Just some text inside a div
-This div is contains a textbox (an entry)
-This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS element.role is 'AXRole: paragraph'
-PASS element.role is 'AXRole: table'
-PASS element.role is 'AXRole: label'
-PASS element.role is 'AXRole: heading'
-PASS element.role is 'AXRole: form'
-PASS element.role is 'AXRole: push button'
-PASS element.role is 'AXRole: panel'
-PASS element.role is 'AXRole: entry'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html b/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html
deleted file mode 100644 (file)
index 043734f..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<!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">
-
-<p>Simple paragraph</p>
-<p role="grid">A paragraph pretending to be a table</p>
-
-<label>A label</label>
-<label role="heading">Who said label? It's a heading!</label>
-
-<form>A form with a button <button name="button" value="Button">Click me!</button></form>
-<form role="button">Just a button <button name="button" value="Button">Click me!</button></form>
-
-<div>Just some text inside a div</form>
-<div role="textbox">This div is contains a textbox (an entry)</div>
-
-<p id="description"></p>
-<div id="console"></div>
-<script>
-description("This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements");
-
-if (window.layoutController) {
-    layoutTestController.dumpAsText();
-}
-
-if (window.accessibilityController) {
-    document.getElementById("body").focus();
-    var webArea = accessibilityController.focusedElement;
-
-    // Paragraphs
-    var element = webArea.childAtIndex(0);
-    shouldBe("element.role", "'AXRole: paragraph'");
-    element = webArea.childAtIndex(1);
-    shouldBe("element.role", "'AXRole: table'");
-
-    // Labels are exposed as inside a panel
-    var labelsPanel = webArea.childAtIndex(2);
-    element = labelsPanel.childAtIndex(0);
-    shouldBe("element.role", "'AXRole: label'");
-    element = labelsPanel.childAtIndex(1);
-    shouldBe("element.role", "'AXRole: heading'");
-
-    // Forms
-    element = webArea.childAtIndex(3);
-    shouldBe("element.role", "'AXRole: form'");
-    element = webArea.childAtIndex(4);
-    shouldBe("element.role", "'AXRole: push button'");
-
-    // Divs
-    element = webArea.childAtIndex(5);
-    shouldBe("element.role", "'AXRole: panel'");
-    element = webArea.childAtIndex(6);
-    shouldBe("element.role", "'AXRole: entry'");
-}
-
-successfullyParsed = true;
-</script>
-<script src="../../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
index fc301eb..a80d8c4 100644 (file)
@@ -1,3 +1,21 @@
+2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r82295 and r82300.
+        http://trac.webkit.org/changeset/82295
+        http://trac.webkit.org/changeset/82300
+        https://bugs.webkit.org/show_bug.cgi?id=57380
+
+        This patch breaks compile on Chromium (Requested by
+        abarth|gardener on #webkit).
+
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+        (atkRole):
+        (webkit_accessible_get_role):
+        * accessibility/mac/AccessibilityObjectWrapper.mm:
+
 2011-03-29  Anders Carlsson  <andersca@apple.com>
 
         Fix clang build.
index 2d27e39..4687cae 100644 (file)
@@ -171,10 +171,6 @@ enum AccessibilityRole {
     ListItemRole,
     MenuListPopupRole,
     MenuListOptionRole,
-    ParagraphRole,
-    LabelRole,
-    DivRole,
-    FormRole,
 
     // ARIA Grouping roles
     LandmarkApplicationRole,
index 1d0fe5c..6d203a9 100644 (file)
@@ -3089,19 +3089,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
         return SplitterRole;
 #endif
 
-    if (node && node->hasTagName(pTag))
-        return ParagraphRole;
-
-    if (node && node->hasTagName(labelTag))
-        return LabelRole;
-
-    if (node && node->hasTagName(divTag))
-        return DivRole;
-
-    if (node && node->hasTagName(formTag))
-        return FormRole;
-
-    if (m_renderer->isBlockFlow())
+    if (m_renderer->isBlockFlow() || (node && node->hasTagName(labelTag)))
         return GroupRole;
     
     // If the element does not have role, but it has ARIA attributes, accessibility should fallback to exposing it as a group.
index 7dff2e3..e6c27e7 100644 (file)
@@ -476,14 +476,6 @@ static AtkRole atkRole(AccessibilityRole role)
     case ListItemRole:
     case ListBoxOptionRole:
         return ATK_ROLE_LIST_ITEM;
-    case ParagraphRole:
-        return ATK_ROLE_PARAGRAPH;
-    case LabelRole:
-        return ATK_ROLE_LABEL;
-    case DivRole:
-        return ATK_ROLE_SECTION;
-    case FormRole:
-        return ATK_ROLE_FORM;
     default:
         return ATK_ROLE_UNKNOWN;
     }
@@ -491,16 +483,31 @@ static AtkRole atkRole(AccessibilityRole role)
 
 static AtkRole webkit_accessible_get_role(AtkObject* object)
 {
-    AccessibilityObject* coreObject = core(object);
+    AccessibilityObject* axObject = core(object);
 
-    if (!coreObject)
+    if (!axObject)
         return ATK_ROLE_UNKNOWN;
 
+    // WebCore does not know about paragraph role, label role, or section role
+    if (axObject->isAccessibilityRenderObject()) {
+        Node* node = static_cast<AccessibilityRenderObject*>(axObject)->renderer()->node();
+        if (node) {
+            if (node->hasTagName(HTMLNames::pTag))
+                return ATK_ROLE_PARAGRAPH;
+            if (node->hasTagName(HTMLNames::labelTag))
+                return ATK_ROLE_LABEL;
+            if (node->hasTagName(HTMLNames::divTag))
+                return ATK_ROLE_SECTION;
+            if (node->hasTagName(HTMLNames::formTag))
+                return ATK_ROLE_FORM;
+        }
+    }
+
     // Note: Why doesn't WebCore have a password field for this
-    if (coreObject->isPasswordField())
+    if (axObject->isPasswordField())
         return ATK_ROLE_PASSWORD_TEXT;
 
-    return atkRole(coreObject->roleValue());
+    return atkRole(axObject->roleValue());
 }
 
 static bool selectionBelongsToObject(AccessibilityObject* coreObject, VisibleSelection& selection)
index c0dd795..a4c8d8a 100644 (file)
@@ -1287,11 +1287,7 @@ static const AccessibilityRoleMap& createAccessibilityRoleMap()
         { TabPanelRole, NSAccessibilityGroupRole },
         { TreeRole, NSAccessibilityOutlineRole },
         { TreeItemRole, NSAccessibilityRowRole },
-        { ListItemRole, NSAccessibilityGroupRole },
-        { ParagraphRole, NSAccessibilityGroupRole },
-        { LabelRole, NSAccessibilityGroupRole },
-        { DivRole, NSAccessibilityGroupRole },
-        { FormRole, NSAccessibilityGroupRole }
+        { ListItemRole, NSAccessibilityGroupRole }
     };
     AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;
     
index 3cb9ddf..31e6813 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r82295 and r82300.
+        http://trac.webkit.org/changeset/82295
+        http://trac.webkit.org/changeset/82300
+        https://bugs.webkit.org/show_bug.cgi?id=57380
+
+        This patch breaks compile on Chromium (Requested by
+        abarth|gardener on #webkit).
+
+        * public/WebAccessibilityRole.h:
+        * src/AssertMatchingEnums.cpp:
+
 2011-03-29  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Reviewed by Adam Barth.
index 391b3e2..b0748a7 100644 (file)
@@ -116,11 +116,6 @@ enum WebAccessibilityRole {
     WebAccessibilityRoleMenuListPopup,
     WebAccessibilityRoleMenuListOption,
 
-    WebAccessibilityRoleParagraph,
-    WebAccessibilityRoleLabel,
-    WebAccessibilityRoleDiv,
-    WebAccessibilityRoleForm,
-
     WebAccessibilityRoleLandmarkApplication,
     WebAccessibilityRoleLandmarkBanner,
     WebAccessibilityRoleLandmarkComplementary,
index f286524..2ab783f 100644 (file)
@@ -173,10 +173,6 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeItemRole, TreeItemRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDirectory, DirectoryRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleEditableText, EditableTextRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListItem, ListItemRole);
-COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleParagraph, ParagraphRole);
-COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLabel, LabelRole);
-COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDiv, LabelRole);
-COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleForm, FormRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkApplication, LandmarkApplicationRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkBanner, LandmarkBannerRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkComplementary, LandmarkComplementaryRole);