AX: AOM: Implement string type properties
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Nov 2017 02:24:53 +0000 (02:24 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Nov 2017 02:24:53 +0000 (02:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179495

Reviewed by Chris Fleizach.

Source/WebCore:

Implemented the rest of the string type properties for Accessibility
Object Model.

Test: accessibility/mac/AOM-string-properties.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleLiveRegionCreated):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::childrenChanged):
(WebCore::AccessibilityNodeObject::isPressed const):
(WebCore::AccessibilityNodeObject::isChecked const):
(WebCore::AccessibilityNodeObject::valueDescription const):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::AccessibilityObject::supportsAutoComplete const):
(WebCore::AccessibilityObject::autoCompleteValue const):
(WebCore::AccessibilityObject::invalidStatus const):
(WebCore::AccessibilityObject::supportsCurrent const):
(WebCore::AccessibilityObject::currentState const):
(WebCore::AccessibilityObject::currentValue const):
(WebCore::AccessibilityObject::roleDescription const):
(WebCore::AccessibilityObject::keyShortcutsValue const):
(WebCore::AccessibilityObject::placeholderValue const):
(WebCore::AccessibilityObject::isInsideLiveRegion const):
(WebCore::AccessibilityObject::liveRegionAncestor const):
(WebCore::AccessibilityObject::supportsARIAAttributes const):
(WebCore::AccessibilityObject::supportsLiveRegion const):
(WebCore::AccessibilityObject::sortDirection const):
(WebCore::AccessibilityObject::supportsHasPopup const):
(WebCore::AccessibilityObject::hasPopupValue const):
(WebCore::AccessibilityObject::supportsPressed const):
(WebCore::AccessibilityObject::checkboxOrRadioValue const):
(WebCore::AccessibilityObject::pressedIsPresent const):
(WebCore::AccessibilityObject::buttonRoleType const):
(WebCore::AccessibilityObject::supportsARIAAutoComplete const): Deleted.
(WebCore::AccessibilityObject::ariaAutoCompleteValue const): Deleted.
(WebCore::AccessibilityObject::supportsARIACurrent const): Deleted.
(WebCore::AccessibilityObject::ariaCurrentState const): Deleted.
(WebCore::AccessibilityObject::ariaCurrentValue const): Deleted.
(WebCore::AccessibilityObject::ariaKeyShortcutsValue const): Deleted.
(WebCore::AccessibilityObject::isInsideARIALiveRegion const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionAncestor const): Deleted.
(WebCore::AccessibilityObject::supportsARIALiveRegion const): Deleted.
(WebCore::AccessibilityObject::supportsARIAHasPopup const): Deleted.
(WebCore::AccessibilityObject::ariaPopupValue const): Deleted.
(WebCore::AccessibilityObject::supportsARIAPressed const): Deleted.
(WebCore::AccessibilityObject::ariaPressedIsPresent const): Deleted.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::hasPopup const):
(WebCore::AccessibilityObject::liveRegionStatus const):
(WebCore::AccessibilityObject::liveRegionRelevant const):
(WebCore::AccessibilityObject::liveRegionAtomic const):
(WebCore::AccessibilityObject::ariaHasPopup const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionStatus const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionRelevant const): Deleted.
(WebCore::AccessibilityObject::ariaLiveRegionAtomic const): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::hasPopup const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::orientation const):
(WebCore::AccessibilityRenderObject::textChanged):
(WebCore::AccessibilityRenderObject::liveRegionStatus const):
(WebCore::AccessibilityRenderObject::liveRegionRelevant const):
(WebCore::AccessibilityRenderObject::liveRegionAtomic const):
(WebCore::AccessibilityRenderObject::ariaHasPopup const): Deleted.
(WebCore::AccessibilityRenderObject::ariaLiveRegionStatus const): Deleted.
(WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant const): Deleted.
(WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic const): Deleted.
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibleNode.cpp:
(WebCore::ariaAttributeMap):
(WebCore::isPropertyValueString):
(WebCore::AccessibleNode::notifyAttributeChanged):
(WebCore::AccessibleNode::autocomplete const):
(WebCore::AccessibleNode::setAutocomplete):
(WebCore::AccessibleNode::checked const):
(WebCore::AccessibleNode::setChecked):
(WebCore::AccessibleNode::current const):
(WebCore::AccessibleNode::setCurrent):
(WebCore::AccessibleNode::hasPopUp const):
(WebCore::AccessibleNode::setHasPopUp):
(WebCore::AccessibleNode::invalid const):
(WebCore::AccessibleNode::setInvalid):
(WebCore::AccessibleNode::keyShortcuts const):
(WebCore::AccessibleNode::setKeyShortcuts):
(WebCore::AccessibleNode::live const):
(WebCore::AccessibleNode::setLive):
(WebCore::AccessibleNode::setLabel):
(WebCore::AccessibleNode::orientation const):
(WebCore::AccessibleNode::setOrientation):
(WebCore::AccessibleNode::placeholder const):
(WebCore::AccessibleNode::setPlaceholder):
(WebCore::AccessibleNode::pressed const):
(WebCore::AccessibleNode::setPressed):
(WebCore::AccessibleNode::relevant const):
(WebCore::AccessibleNode::setRelevant):
(WebCore::AccessibleNode::role const):
(WebCore::AccessibleNode::setRole):
(WebCore::AccessibleNode::roleDescription const):
(WebCore::AccessibleNode::setRoleDescription):
(WebCore::AccessibleNode::sort const):
(WebCore::AccessibleNode::setSort):
(WebCore::AccessibleNode::valueText const):
(WebCore::AccessibleNode::setValueText):
* accessibility/AccessibleNode.h:
(WebCore::AXPropertyHashTraits::constructDeletedValue):
(WebCore::AXPropertyHashTraits::isDeletedValue):
* accessibility/AccessibleNode.idl:
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
(atkRole):
(setAtkStateSetFromCoreObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
(-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
(-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
(-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
(-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

LayoutTests:

* accessibility/accessibility-object-model.html:
* accessibility/mac/AOM-string-properties-expected.txt: Added.
* accessibility/mac/AOM-string-properties.html: Added.

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

19 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/accessibility-object-model.html
LayoutTests/accessibility/mac/AOM-string-properties-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/mac/AOM-string-properties.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/AccessibleNode.cpp
Source/WebCore/accessibility/AccessibleNode.h
Source/WebCore/accessibility/AccessibleNode.idl
Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/inspector/agents/InspectorDOMAgent.cpp

index 920ca12..d96b20f 100644 (file)
@@ -1,3 +1,14 @@
+2017-11-16  Nan Wang  <n_wang@apple.com>
+
+        AX: AOM: Implement string type properties
+        https://bugs.webkit.org/show_bug.cgi?id=179495
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/accessibility-object-model.html:
+        * accessibility/mac/AOM-string-properties-expected.txt: Added.
+        * accessibility/mac/AOM-string-properties.html: Added.
+
 2017-11-16  Ryan Haddad  <ryanhaddad@apple.com>
 
         Mark imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https.html as flaky.
index 4f76a30..ec522c4 100644 (file)
             var button2 = document.getElementById("button2");
             button2.parentElement.removeChild(button2);
         })();
-        gc();
         shouldBe("aomRemovedButton.role", "'checkbox'");
     }
     
diff --git a/LayoutTests/accessibility/mac/AOM-string-properties-expected.txt b/LayoutTests/accessibility/mac/AOM-string-properties-expected.txt
new file mode 100644 (file)
index 0000000..a68ad4c
--- /dev/null
@@ -0,0 +1,75 @@
+
+This tests string type Accessibility Object Model properties.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Autocomplete support
+PASS node.accessibleNode.autocomplete is "inline"
+PASS axNode.stringAttributeValue('AXAutocompleteValue') is "inline"
+
+Checked support
+PASS axNode.isChecked is false
+PASS node.accessibleNode.checked is "true"
+PASS axNode.isChecked is true
+
+Current support
+PASS axNode.stringAttributeValue('AXARIACurrent') is "false"
+PASS current.accessibleNode.current is "page"
+PASS axNode.stringAttributeValue('AXARIACurrent') is "page"
+
+HasPopUp support
+PASS axNode.stringAttributeValue('AXHasPopUpValue') is "false"
+PASS node.accessibleNode.hasPopUp is "dialog"
+PASS axNode.stringAttributeValue('AXHasPopUpValue') is "dialog"
+
+Invalid support
+PASS axNode.stringAttributeValue('AXInvalid') is "false"
+PASS node.accessibleNode.invalid is "grammar"
+PASS axNode.stringAttributeValue('AXInvalid') is "grammar"
+
+KeyShortcuts support
+PASS node.accessibleNode.keyShortcuts is "Ctrl+F"
+PASS axNode.stringAttributeValue('AXKeyShortcutsValue') is "Ctrl+F"
+
+Live support
+PASS axNode.stringAttributeValue('AXARIALive') is ""
+PASS node.accessibleNode.live is "polite"
+PASS axNode.stringAttributeValue('AXARIALive') is "polite"
+
+Orientation support
+PASS axNode.orientation is "AXOrientation: AXHorizontalOrientation"
+PASS node.accessibleNode.orientation is "vertical"
+PASS axNode.orientation is "AXOrientation: AXVerticalOrientation"
+
+Placeholder support
+PASS axNode.stringAttributeValue('AXPlaceholderValue') is ""
+PASS node.accessibleNode.placeholder is "test placeholder"
+PASS axNode.stringAttributeValue('AXPlaceholderValue') is "test placeholder"
+
+Pressed support
+PASS axNode.boolAttributeValue('AXARIAPressedIsPresent') is false
+PASS node.accessibleNode.pressed is "true"
+PASS axNode.boolAttributeValue('AXARIAPressedIsPresent') is true
+
+Relevant support
+PASS axNode.stringAttributeValue('AXARIARelevant') is "additions text"
+PASS node.accessibleNode.relevant is "additions"
+PASS axNode.stringAttributeValue('AXARIARelevant') is "additions"
+
+RoleDescription support
+PASS axNode.roleDescription is "AXRoleDescription: button"
+PASS node.accessibleNode.roleDescription is "test button"
+PASS axNode.roleDescription is "AXRoleDescription: test button"
+
+Sort support
+PASS axNode.stringAttributeValue('AXSortDirection') is "AXUnknownSortDirection"
+PASS node.accessibleNode.sort is "ascending"
+PASS axNode.stringAttributeValue('AXSortDirection') is "AXAscendingSortDirection"
+
+ValueText support
+PASS axNode.valueDescription is "AXValueDescription: "
+PASS node.accessibleNode.valueText is "Five"
+PASS axNode.valueDescription is "AXValueDescription: Five"
+
diff --git a/LayoutTests/accessibility/mac/AOM-string-properties.html b/LayoutTests/accessibility/mac/AOM-string-properties.html
new file mode 100644 (file)
index 0000000..5143674
--- /dev/null
@@ -0,0 +1,190 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/accessibility-helper.js"></script>
+</head>
+<body>
+
+<div role="combobox" id="autocomplete"></div>
+<div role="checkbox" id="checked"></div>
+<div role="tab" id="current"></div>
+<div role="button" id="hasPopUp"></div>
+<div role="textbox" id="invalid"></div>
+<div role="button" id="keyShortcuts"></div>
+<div role="banner" id="live"></div>
+<div role="slider" id="orientation"></div>
+<input id="placeholder">
+<div role="switch" id="pressed"></div>
+<div role="banner" id="relevant"></div>
+<div role="button" id="roleDescription"></div>
+<div role="columnheader" id="sort"></div>
+<div role="slider" id="valueText"></div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+    description("This tests string type Accessibility Object Model properties.");
+    if (window.accessibilityController) {
+        var node;
+        var axNode;
+
+        testAutocomplete();
+        testChecked();
+        testCurrent();
+        testHasPopUp();
+        testInvalid();
+        testKeyShortcuts();
+        testLive();
+        testOrientation();
+        testPlaceholder();
+        testPressed();
+        testRelevant();
+        testRoleDescription();
+        testSort();
+        testValueText();
+    }
+
+    function testAutocomplete() {
+        debug("\nAutocomplete support");
+        node = document.getElementById("autocomplete");
+        axNode = accessibilityController.accessibleElementById("autocomplete");
+        node.accessibleNode.autocomplete = "inline";
+        shouldBeEqualToString("node.accessibleNode.autocomplete", "inline");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXAutocompleteValue')", "inline");
+    }
+
+    function testChecked() {
+        debug("\nChecked support");
+        node = document.getElementById("checked");
+        axNode = accessibilityController.accessibleElementById("checked");
+        shouldBeFalse("axNode.isChecked");
+        node.accessibleNode.checked = "true";
+        shouldBeEqualToString("node.accessibleNode.checked", "true");
+        shouldBeTrue("axNode.isChecked");
+    }
+
+    function testCurrent() {
+        debug("\nCurrent support");
+        node = document.getElementById("current");
+        axNode = accessibilityController.accessibleElementById("current");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXARIACurrent')", "false");
+        node.accessibleNode.current = "page";
+        shouldBeEqualToString("current.accessibleNode.current", "page");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXARIACurrent')", "page");
+    }
+
+    function testHasPopUp() {
+        debug("\nHasPopUp support");
+        node = document.getElementById("hasPopUp");
+        axNode = accessibilityController.accessibleElementById("hasPopUp");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXHasPopUpValue')", "false");
+        node.accessibleNode.hasPopUp = "dialog";
+        shouldBeEqualToString("node.accessibleNode.hasPopUp", "dialog");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXHasPopUpValue')", "dialog");
+    }
+
+    function testInvalid() {
+        debug("\nInvalid support");
+        node = document.getElementById("invalid");
+        axNode = accessibilityController.accessibleElementById("invalid");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXInvalid')", "false");
+        node.accessibleNode.invalid = "grammar";
+        shouldBeEqualToString("node.accessibleNode.invalid", "grammar");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXInvalid')", "grammar");
+    }
+
+    function testKeyShortcuts() {
+        debug("\nKeyShortcuts support");
+        node = document.getElementById("keyShortcuts");
+        axNode = accessibilityController.accessibleElementById("keyShortcuts");
+        node.accessibleNode.keyShortcuts = "Ctrl+F";
+        shouldBeEqualToString("node.accessibleNode.keyShortcuts", "Ctrl+F");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXKeyShortcutsValue')", "Ctrl+F");
+    }
+
+    function testLive() {
+        debug("\nLive support");
+        node = document.getElementById("live");
+        axNode = accessibilityController.accessibleElementById("live");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXARIALive')", "");
+        node.accessibleNode.live = "polite";
+        shouldBeEqualToString("node.accessibleNode.live", "polite");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXARIALive')", "polite");
+    }
+
+    function testOrientation() {
+        debug("\nOrientation support");
+        node = document.getElementById("orientation");
+        axNode = accessibilityController.accessibleElementById("orientation");
+        shouldBeEqualToString("axNode.orientation", "AXOrientation: AXHorizontalOrientation");
+        node.accessibleNode.orientation = "vertical";
+        shouldBeEqualToString("node.accessibleNode.orientation", "vertical");
+        shouldBeEqualToString("axNode.orientation", "AXOrientation: AXVerticalOrientation");
+    }
+
+    function testPlaceholder() {
+        debug("\nPlaceholder support");
+        node = document.getElementById("placeholder");
+        axNode = accessibilityController.accessibleElementById("placeholder");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXPlaceholderValue')", "");
+        node.accessibleNode.placeholder = "test placeholder";
+        shouldBeEqualToString("node.accessibleNode.placeholder", "test placeholder");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXPlaceholderValue')", "test placeholder");
+    }
+
+    function testPressed() {
+        debug("\nPressed support");
+        node = document.getElementById("pressed");
+        axNode = accessibilityController.accessibleElementById("pressed");
+        shouldBeFalse("axNode.boolAttributeValue('AXARIAPressedIsPresent')");
+        node.accessibleNode.pressed = "true";
+        shouldBeEqualToString("node.accessibleNode.pressed", "true");
+        shouldBeTrue("axNode.boolAttributeValue('AXARIAPressedIsPresent')");
+    }
+
+    function testRelevant() {
+        debug("\nRelevant support");
+        node = document.getElementById("relevant");
+        axNode = accessibilityController.accessibleElementById("relevant");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXARIARelevant')", "additions text");
+        node.accessibleNode.relevant = "additions";
+        shouldBeEqualToString("node.accessibleNode.relevant", "additions");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXARIARelevant')", "additions");
+    }
+
+    function testRoleDescription() {
+        debug("\nRoleDescription support");
+        node = document.getElementById("roleDescription");
+        axNode = accessibilityController.accessibleElementById("roleDescription");
+        shouldBeEqualToString("axNode.roleDescription", "AXRoleDescription: button");
+        node.accessibleNode.roleDescription = "test button";
+        shouldBeEqualToString("node.accessibleNode.roleDescription", "test button");
+        shouldBeEqualToString("axNode.roleDescription", "AXRoleDescription: test button");
+    }
+
+    function testSort() {
+        debug("\nSort support");
+        node = document.getElementById("sort");
+        axNode = accessibilityController.accessibleElementById("sort");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXSortDirection')", "AXUnknownSortDirection");
+        node.accessibleNode.sort = "ascending";
+        shouldBeEqualToString("node.accessibleNode.sort", "ascending");
+        shouldBeEqualToString("axNode.stringAttributeValue('AXSortDirection')", "AXAscendingSortDirection");
+    }
+
+    function testValueText() {
+        debug("\nValueText support");
+        node = document.getElementById("valueText");
+        axNode = accessibilityController.accessibleElementById("valueText");
+        shouldBeEqualToString("axNode.valueDescription", "AXValueDescription: ");
+        node.accessibleNode.valueText = "Five";
+        shouldBeEqualToString("node.accessibleNode.valueText", "Five");
+        shouldBeEqualToString("axNode.valueDescription", "AXValueDescription: Five");
+    }
+
+</script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
index af16da1..c28ebb8 100644 (file)
@@ -1,3 +1,138 @@
+2017-11-16  Nan Wang  <n_wang@apple.com>
+
+        AX: AOM: Implement string type properties
+        https://bugs.webkit.org/show_bug.cgi?id=179495
+
+        Reviewed by Chris Fleizach.
+
+        Implemented the rest of the string type properties for Accessibility
+        Object Model.
+
+        Test: accessibility/mac/AOM-string-properties.html
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::handleLiveRegionCreated):
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::childrenChanged):
+        (WebCore::AccessibilityNodeObject::isPressed const):
+        (WebCore::AccessibilityNodeObject::isChecked const):
+        (WebCore::AccessibilityNodeObject::valueDescription const):
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
+        (WebCore::AccessibilityObject::supportsAutoComplete const):
+        (WebCore::AccessibilityObject::autoCompleteValue const):
+        (WebCore::AccessibilityObject::invalidStatus const):
+        (WebCore::AccessibilityObject::supportsCurrent const):
+        (WebCore::AccessibilityObject::currentState const):
+        (WebCore::AccessibilityObject::currentValue const):
+        (WebCore::AccessibilityObject::roleDescription const):
+        (WebCore::AccessibilityObject::keyShortcutsValue const):
+        (WebCore::AccessibilityObject::placeholderValue const):
+        (WebCore::AccessibilityObject::isInsideLiveRegion const):
+        (WebCore::AccessibilityObject::liveRegionAncestor const):
+        (WebCore::AccessibilityObject::supportsARIAAttributes const):
+        (WebCore::AccessibilityObject::supportsLiveRegion const):
+        (WebCore::AccessibilityObject::sortDirection const):
+        (WebCore::AccessibilityObject::supportsHasPopup const):
+        (WebCore::AccessibilityObject::hasPopupValue const):
+        (WebCore::AccessibilityObject::supportsPressed const):
+        (WebCore::AccessibilityObject::checkboxOrRadioValue const):
+        (WebCore::AccessibilityObject::pressedIsPresent const):
+        (WebCore::AccessibilityObject::buttonRoleType const):
+        (WebCore::AccessibilityObject::supportsARIAAutoComplete const): Deleted.
+        (WebCore::AccessibilityObject::ariaAutoCompleteValue const): Deleted.
+        (WebCore::AccessibilityObject::supportsARIACurrent const): Deleted.
+        (WebCore::AccessibilityObject::ariaCurrentState const): Deleted.
+        (WebCore::AccessibilityObject::ariaCurrentValue const): Deleted.
+        (WebCore::AccessibilityObject::ariaKeyShortcutsValue const): Deleted.
+        (WebCore::AccessibilityObject::isInsideARIALiveRegion const): Deleted.
+        (WebCore::AccessibilityObject::ariaLiveRegionAncestor const): Deleted.
+        (WebCore::AccessibilityObject::supportsARIALiveRegion const): Deleted.
+        (WebCore::AccessibilityObject::supportsARIAHasPopup const): Deleted.
+        (WebCore::AccessibilityObject::ariaPopupValue const): Deleted.
+        (WebCore::AccessibilityObject::supportsARIAPressed const): Deleted.
+        (WebCore::AccessibilityObject::ariaPressedIsPresent const): Deleted.
+        * accessibility/AccessibilityObject.h:
+        (WebCore::AccessibilityObject::hasPopup const):
+        (WebCore::AccessibilityObject::liveRegionStatus const):
+        (WebCore::AccessibilityObject::liveRegionRelevant const):
+        (WebCore::AccessibilityObject::liveRegionAtomic const):
+        (WebCore::AccessibilityObject::ariaHasPopup const): Deleted.
+        (WebCore::AccessibilityObject::ariaLiveRegionStatus const): Deleted.
+        (WebCore::AccessibilityObject::ariaLiveRegionRelevant const): Deleted.
+        (WebCore::AccessibilityObject::ariaLiveRegionAtomic const): Deleted.
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::hasPopup const):
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        (WebCore::AccessibilityRenderObject::orientation const):
+        (WebCore::AccessibilityRenderObject::textChanged):
+        (WebCore::AccessibilityRenderObject::liveRegionStatus const):
+        (WebCore::AccessibilityRenderObject::liveRegionRelevant const):
+        (WebCore::AccessibilityRenderObject::liveRegionAtomic const):
+        (WebCore::AccessibilityRenderObject::ariaHasPopup const): Deleted.
+        (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus const): Deleted.
+        (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant const): Deleted.
+        (WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic const): Deleted.
+        * accessibility/AccessibilityRenderObject.h:
+        * accessibility/AccessibleNode.cpp:
+        (WebCore::ariaAttributeMap):
+        (WebCore::isPropertyValueString):
+        (WebCore::AccessibleNode::notifyAttributeChanged):
+        (WebCore::AccessibleNode::autocomplete const):
+        (WebCore::AccessibleNode::setAutocomplete):
+        (WebCore::AccessibleNode::checked const):
+        (WebCore::AccessibleNode::setChecked):
+        (WebCore::AccessibleNode::current const):
+        (WebCore::AccessibleNode::setCurrent):
+        (WebCore::AccessibleNode::hasPopUp const):
+        (WebCore::AccessibleNode::setHasPopUp):
+        (WebCore::AccessibleNode::invalid const):
+        (WebCore::AccessibleNode::setInvalid):
+        (WebCore::AccessibleNode::keyShortcuts const):
+        (WebCore::AccessibleNode::setKeyShortcuts):
+        (WebCore::AccessibleNode::live const):
+        (WebCore::AccessibleNode::setLive):
+        (WebCore::AccessibleNode::setLabel):
+        (WebCore::AccessibleNode::orientation const):
+        (WebCore::AccessibleNode::setOrientation):
+        (WebCore::AccessibleNode::placeholder const):
+        (WebCore::AccessibleNode::setPlaceholder):
+        (WebCore::AccessibleNode::pressed const):
+        (WebCore::AccessibleNode::setPressed):
+        (WebCore::AccessibleNode::relevant const):
+        (WebCore::AccessibleNode::setRelevant):
+        (WebCore::AccessibleNode::role const):
+        (WebCore::AccessibleNode::setRole):
+        (WebCore::AccessibleNode::roleDescription const):
+        (WebCore::AccessibleNode::setRoleDescription):
+        (WebCore::AccessibleNode::sort const):
+        (WebCore::AccessibleNode::setSort):
+        (WebCore::AccessibleNode::valueText const):
+        (WebCore::AccessibleNode::setValueText):
+        * accessibility/AccessibleNode.h:
+        (WebCore::AXPropertyHashTraits::constructDeletedValue):
+        (WebCore::AXPropertyHashTraits::isDeletedValue):
+        * accessibility/AccessibleNode.idl:
+        * accessibility/atk/AXObjectCacheAtk.cpp:
+        (WebCore::AXObjectCache::postPlatformNotification):
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (webkitAccessibleGetAttributes):
+        (atkRole):
+        (setAtkStateSetFromCoreObject):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
+        (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
+        (-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
+        (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
+        (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
+        (-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+
 2017-11-16  Alex Christensen  <achristensen@webkit.org>
 
         Use RunLoop and Mode from NetworkingContext if they are given
index 6eaa6e6..c050fa0 100644 (file)
@@ -847,7 +847,7 @@ void AXObjectCache::handleLiveRegionCreated(Node* node)
         return;
     
     Element* element = downcast<Element>(node);
-    String liveRegionStatus = element->attributeWithoutSynchronization(aria_liveAttr);
+    String liveRegionStatus = AccessibleNode::effectiveStringValueForElement(*element, AXPropertyName::Live);
     if (liveRegionStatus.isEmpty()) {
         const AtomicString& ariaRole = AccessibleNode::effectiveStringValueForElement(*element, AXPropertyName::Role);
         if (!ariaRole.isEmpty())
index b5b20f2..0158954 100644 (file)
@@ -145,7 +145,7 @@ void AccessibilityNodeObject::childrenChanged()
         // Sometimes this function can be called many times within a short period of time, leading to posting too many AXLiveRegionChanged
         // notifications. To fix this, we used a timer to make sure we only post one notification for the children changes within a pre-defined
         // time interval.
-        if (parent->supportsARIALiveRegion())
+        if (parent->supportsLiveRegion())
             cache->postLiveRegionChangeNotification(parent);
         
         // If this element is an ARIA text control, notify the AT of changes.
@@ -658,7 +658,7 @@ bool AccessibilityNodeObject::isPressed() const
 
     // If this is an toggle button, check the aria-pressed attribute rather than node()->active()
     if (isToggleButton())
-        return equalLettersIgnoringASCIICase(getAttribute(aria_pressedAttr), "true");
+        return equalLettersIgnoringASCIICase(stringValueForProperty(AXPropertyName::Pressed), "true");
 
     if (!is<Element>(*node))
         return false;
@@ -690,7 +690,7 @@ bool AccessibilityNodeObject::isChecked() const
         break;
     }
     
-    if (validRole && equalLettersIgnoringASCIICase(getAttribute(aria_checkedAttr), "true"))
+    if (validRole && equalLettersIgnoringASCIICase(stringValueForProperty(AXPropertyName::Checked), "true"))
         return true;
 
     return false;
@@ -802,7 +802,7 @@ String AccessibilityNodeObject::valueDescription() const
     if (!isRangeControl())
         return String();
 
-    return getAttribute(aria_valuetextAttr).string();
+    return stringValueForProperty(AXPropertyName::ValueText);
 }
 
 float AccessibilityNodeObject::valueForRange() const
index e01f896..31cd641 100644 (file)
@@ -210,7 +210,7 @@ bool AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex(AccessibilityO
         return axObject->isList();
         
     case AccessibilitySearchKey::LiveRegion:
-        return axObject->supportsARIALiveRegion();
+        return axObject->supportsLiveRegion();
         
     case AccessibilitySearchKey::MisspelledWord:
         return axObject->hasMisspelling();
@@ -1665,14 +1665,14 @@ String AccessibilityObject::ariaReadOnlyValue() const
     return getAttribute(aria_readonlyAttr).string().convertToASCIILowercase();
 }
 
-bool AccessibilityObject::supportsARIAAutoComplete() const
+bool AccessibilityObject::supportsAutoComplete() const
 {
-    return (isComboBox() || isARIATextControl()) && hasAttribute(aria_autocompleteAttr);
+    return (isComboBox() || isARIATextControl()) && hasProperty(AXPropertyName::Autocomplete);
 }
 
-String AccessibilityObject::ariaAutoCompleteValue() const
+String AccessibilityObject::autoCompleteValue() const
 {
-    const AtomicString& autoComplete = getAttribute(aria_autocompleteAttr);
+    const AtomicString& autoComplete = stringValueForProperty(AXPropertyName::Autocomplete);
     if (equalLettersIgnoringASCIICase(autoComplete, "inline")
         || equalLettersIgnoringASCIICase(autoComplete, "list")
         || equalLettersIgnoringASCIICase(autoComplete, "both"))
@@ -2000,7 +2000,7 @@ String AccessibilityObject::invalidStatus() const
     String undefinedValue = ASCIILiteral("undefined");
 
     // aria-invalid can return false (default), grammar, spelling, or true.
-    String ariaInvalid = stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_invalidAttr));
+    String ariaInvalid = stripLeadingAndTrailingHTMLSpaces(stringValueForProperty(AXPropertyName::Invalid));
     
     if (ariaInvalid.isEmpty()) {
         // We should expose invalid status for input types.
@@ -2026,52 +2026,52 @@ String AccessibilityObject::invalidStatus() const
     return trueValue;
 }
 
-bool AccessibilityObject::supportsARIACurrent() const
+bool AccessibilityObject::supportsCurrent() const
 {
-    return hasAttribute(aria_currentAttr);
+    return hasProperty(AXPropertyName::Current);
 }
  
-AccessibilityARIACurrentState AccessibilityObject::ariaCurrentState() const
+AccessibilityCurrentState AccessibilityObject::currentState() const
 {
     // aria-current can return false (default), true, page, step, location, date or time.
-    String currentStateValue = stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_currentAttr));
+    String currentStateValue = stripLeadingAndTrailingHTMLSpaces(stringValueForProperty(AXPropertyName::Current));
     
     // If "false", empty, or missing, return false state.
     if (currentStateValue.isEmpty() || currentStateValue == "false")
-        return AccessibilityARIACurrentState::False;
+        return AccessibilityCurrentState::False;
     
     if (currentStateValue == "page")
-        return AccessibilityARIACurrentState::Page;
+        return AccessibilityCurrentState::Page;
     if (currentStateValue == "step")
-        return AccessibilityARIACurrentState::Step;
+        return AccessibilityCurrentState::Step;
     if (currentStateValue == "location")
-        return AccessibilityARIACurrentState::Location;
+        return AccessibilityCurrentState::Location;
     if (currentStateValue == "date")
-        return AccessibilityARIACurrentState::Date;
+        return AccessibilityCurrentState::Date;
     if (currentStateValue == "time")
-        return AccessibilityARIACurrentState::Time;
+        return AccessibilityCurrentState::Time;
     
     // Any value not included in the list of allowed values should be treated as "true".
-    return AccessibilityARIACurrentState::True;
+    return AccessibilityCurrentState::True;
 }
 
-String AccessibilityObject::ariaCurrentValue() const
+String AccessibilityObject::currentValue() const
 {
-    switch (ariaCurrentState()) {
-    case AccessibilityARIACurrentState::False:
+    switch (currentState()) {
+    case AccessibilityCurrentState::False:
         return "false";
-    case AccessibilityARIACurrentState::Page:
+    case AccessibilityCurrentState::Page:
         return "page";
-    case AccessibilityARIACurrentState::Step:
+    case AccessibilityCurrentState::Step:
         return "step";
-    case AccessibilityARIACurrentState::Location:
+    case AccessibilityCurrentState::Location:
         return "location";
-    case AccessibilityARIACurrentState::Time:
+    case AccessibilityCurrentState::Time:
         return "time";
-    case AccessibilityARIACurrentState::Date:
+    case AccessibilityCurrentState::Date:
         return "date";
     default:
-    case AccessibilityARIACurrentState::True:
+    case AccessibilityCurrentState::True:
         return "true";
     }
 }
@@ -2398,7 +2398,7 @@ bool AccessibilityObject::hasHighlighting() const
 
 String AccessibilityObject::roleDescription() const
 {
-    return stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_roledescriptionAttr));
+    return stripLeadingAndTrailingHTMLSpaces(stringValueForProperty(AXPropertyName::RoleDescription));
 }
     
 bool nodeHasPresentationRole(Node* node)
@@ -2446,9 +2446,9 @@ const AtomicString& AccessibilityObject::datetimeAttributeValue() const
     return getAttribute(datetimeAttr);
 }
     
-const AtomicString& AccessibilityObject::ariaKeyShortcutsValue() const
+const String AccessibilityObject::keyShortcutsValue() const
 {
-    return getAttribute(aria_keyshortcutsAttr);
+    return stringValueForProperty(AXPropertyName::KeyShortcuts);
 }
 
 Element* AccessibilityObject::element() const
@@ -2491,52 +2491,52 @@ bool AccessibilityObject::isValueAutofilled() const
     return downcast<HTMLInputElement>(*node).isAutoFilled();
 }
 
-const AtomicString& AccessibilityObject::placeholderValue() const
+const String AccessibilityObject::placeholderValue() const
 {
     const AtomicString& placeholder = getAttribute(placeholderAttr);
     if (!placeholder.isEmpty())
         return placeholder;
     
-    const AtomicString& ariaPlaceholder = getAttribute(aria_placeholderAttr);
+    const AtomicString& ariaPlaceholder = stringValueForProperty(AXPropertyName::Placeholder);
     if (!ariaPlaceholder.isEmpty())
         return ariaPlaceholder;
     
     return nullAtom();
 }
     
-bool AccessibilityObject::isInsideARIALiveRegion(bool excludeIfOff) const
+bool AccessibilityObject::isInsideLiveRegion(bool excludeIfOff) const
 {
-    return ariaLiveRegionAncestor(excludeIfOff);
+    return liveRegionAncestor(excludeIfOff);
 }
     
-AccessibilityObject* AccessibilityObject::ariaLiveRegionAncestor(bool excludeIfOff) const
+AccessibilityObject* AccessibilityObject::liveRegionAncestor(bool excludeIfOff) const
 {
     return const_cast<AccessibilityObject*>(AccessibilityObject::matchedParent(*this, true, [excludeIfOff] (const AccessibilityObject& object) {
-        return object.supportsARIALiveRegion(excludeIfOff);
+        return object.supportsLiveRegion(excludeIfOff);
     }));
 }
 
 bool AccessibilityObject::supportsARIAAttributes() const
 {
     // This returns whether the element supports any global ARIA attributes.
-    return supportsARIALiveRegion()
+    return supportsLiveRegion()
         || supportsARIADragging()
         || supportsARIADropping()
         || supportsARIAOwns()
         || hasAttribute(aria_atomicAttr)
         || hasAttribute(aria_busyAttr)
         || hasAttribute(aria_controlsAttr)
-        || hasAttribute(aria_currentAttr)
+        || hasProperty(AXPropertyName::Current)
         || hasAttribute(aria_describedbyAttr)
         || hasAttribute(aria_detailsAttr)
         || hasAttribute(aria_disabledAttr)
         || hasAttribute(aria_errormessageAttr)
         || hasAttribute(aria_flowtoAttr)
-        || hasAttribute(aria_haspopupAttr)
-        || hasAttribute(aria_invalidAttr)
+        || hasProperty(AXPropertyName::HasPopUp)
+        || hasProperty(AXPropertyName::Invalid)
         || hasProperty(AXPropertyName::Label)
         || hasAttribute(aria_labelledbyAttr)
-        || hasAttribute(aria_relevantAttr);
+        || hasProperty(AXPropertyName::Relevant);
 }
     
 bool AccessibilityObject::liveRegionStatusIsEnabled(const AtomicString& liveRegionStatus)
@@ -2544,10 +2544,10 @@ bool AccessibilityObject::liveRegionStatusIsEnabled(const AtomicString& liveRegi
     return equalLettersIgnoringASCIICase(liveRegionStatus, "polite") || equalLettersIgnoringASCIICase(liveRegionStatus, "assertive");
 }
     
-bool AccessibilityObject::supportsARIALiveRegion(bool excludeIfOff) const
+bool AccessibilityObject::supportsLiveRegion(bool excludeIfOff) const
 {
-    const AtomicString& liveRegionStatus = ariaLiveRegionStatus();
-    return excludeIfOff ? liveRegionStatusIsEnabled(liveRegionStatus) : !liveRegionStatus.isEmpty();
+    const AtomicString& liveRegionStatusValue = liveRegionStatus();
+    return excludeIfOff ? liveRegionStatusIsEnabled(liveRegionStatusValue) : !liveRegionStatusValue.isEmpty();
 }
 
 AccessibilityObject* AccessibilityObject::elementAccessibilityHitTest(const IntPoint& point) const
@@ -2598,7 +2598,7 @@ AccessibilitySortDirection AccessibilityObject::sortDirection() const
     if (role != AccessibilityRole::RowHeader && role != AccessibilityRole::ColumnHeader)
         return AccessibilitySortDirection::Invalid;
 
-    const AtomicString& sortAttribute = getAttribute(aria_sortAttr);
+    const AtomicString& sortAttribute = stringValueForProperty(AXPropertyName::Sort);
     if (equalLettersIgnoringASCIICase(sortAttribute, "ascending"))
         return AccessibilitySortDirection::Ascending;
     if (equalLettersIgnoringASCIICase(sortAttribute, "descending"))
@@ -2619,14 +2619,14 @@ bool AccessibilityObject::supportsRangeValue() const
         || isAttachmentElement();
 }
     
-bool AccessibilityObject::supportsARIAHasPopup() const
+bool AccessibilityObject::supportsHasPopup() const
 {
-    return hasAttribute(aria_haspopupAttr) || isComboBox();
+    return hasProperty(AXPropertyName::HasPopUp) || isComboBox();
 }
 
-String AccessibilityObject::ariaPopupValue() const
+String AccessibilityObject::hasPopupValue() const
 {
-    const AtomicString& hasPopup = getAttribute(aria_haspopupAttr);
+    const AtomicString& hasPopup = stringValueForProperty(AXPropertyName::HasPopUp);
     if (equalLettersIgnoringASCIICase(hasPopup, "true")
         || equalLettersIgnoringASCIICase(hasPopup, "dialog")
         || equalLettersIgnoringASCIICase(hasPopup, "grid")
@@ -2683,9 +2683,9 @@ void AccessibilityObject::classList(Vector<String>& classList) const
         classList.append(list.item(k).string());
 }
 
-bool AccessibilityObject::supportsARIAPressed() const
+bool AccessibilityObject::supportsPressed() const
 {
-    const AtomicString& expanded = getAttribute(aria_pressedAttr);
+    const AtomicString& expanded = stringValueForProperty(AXPropertyName::Pressed);
     return equalLettersIgnoringASCIICase(expanded, "true") || equalLettersIgnoringASCIICase(expanded, "false");
 }
     
@@ -2745,7 +2745,7 @@ AccessibilityButtonState AccessibilityObject::checkboxOrRadioValue() const
     // If it's a toggle button, the aria-pressed attribute is consulted.
 
     if (isToggleButton()) {
-        const AtomicString& ariaPressed = getAttribute(aria_pressedAttr);
+        const AtomicString& ariaPressed = stringValueForProperty(AXPropertyName::Pressed);
         if (equalLettersIgnoringASCIICase(ariaPressed, "true"))
             return AccessibilityButtonState::On;
         if (equalLettersIgnoringASCIICase(ariaPressed, "mixed"))
@@ -2753,7 +2753,7 @@ AccessibilityButtonState AccessibilityObject::checkboxOrRadioValue() const
         return AccessibilityButtonState::Off;
     }
     
-    const AtomicString& result = getAttribute(aria_checkedAttr);
+    const AtomicString& result = stringValueForProperty(AXPropertyName::Checked);
     if (equalLettersIgnoringASCIICase(result, "true"))
         return AccessibilityButtonState::On;
     if (equalLettersIgnoringASCIICase(result, "mixed")) {
@@ -3127,9 +3127,9 @@ void AccessibilityObject::notifyIfIgnoredValueChanged()
     }
 }
 
-bool AccessibilityObject::ariaPressedIsPresent() const
+bool AccessibilityObject::pressedIsPresent() const
 {
-    return !getAttribute(aria_pressedAttr).isEmpty();
+    return !stringValueForProperty(AXPropertyName::Pressed).isEmpty();
 }
 
 TextIteratorBehavior AccessibilityObject::textIteratorBehaviorForTextRange() const
@@ -3149,9 +3149,9 @@ AccessibilityRole AccessibilityObject::buttonRoleType() const
 {
     // If aria-pressed is present, then it should be exposed as a toggle button.
     // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed
-    if (ariaPressedIsPresent())
+    if (pressedIsPresent())
         return AccessibilityRole::ToggleButton;
-    if (ariaHasPopup())
+    if (hasPopup())
         return AccessibilityRole::PopUpButton;
     // We don't contemplate AccessibilityRole::RadioButton, as it depends on the input
     // type.
index 62cd588..5f7d447 100644 (file)
@@ -476,7 +476,7 @@ struct AccessibilitySelectTextCriteria {
 enum class AccessibilityMathScriptObjectType { Subscript, Superscript };
 enum class AccessibilityMathMultiscriptObjectType { PreSubscript, PreSuperscript, PostSubscript, PostSuperscript };
 
-enum class AccessibilityARIACurrentState { False, True, Page, Step, Location, Date, Time };
+enum class AccessibilityCurrentState { False, True, Page, Step, Location, Date, Time };
     
 bool nodeHasPresentationRole(Node*);
     
@@ -683,13 +683,13 @@ public:
     void ariaOwnsElements(AccessibilityChildrenVector&) const;
     void ariaOwnsReferencingElements(AccessibilityChildrenVector&) const;
 
-    virtual bool ariaHasPopup() const { return false; }
-    String ariaPopupValue() const;
-    bool supportsARIAHasPopup() const;
-    bool ariaPressedIsPresent() const;
+    virtual bool hasPopup() const { return false; }
+    String hasPopupValue() const;
+    bool supportsHasPopup() const;
+    bool pressedIsPresent() const;
     bool ariaIsMultiline() const;
     String invalidStatus() const;
-    bool supportsARIAPressed() const;
+    bool supportsPressed() const;
     bool supportsExpanded() const;
     bool supportsChecked() const;
     AccessibilitySortDirection sortDirection() const;
@@ -698,10 +698,10 @@ public:
     const AtomicString& identifierAttribute() const;
     void classList(Vector<String>&) const;
     virtual String roleDescription() const;
-    AccessibilityARIACurrentState ariaCurrentState() const;
-    String ariaCurrentValue() const;
-    bool supportsARIACurrent() const;
-    const AtomicString& ariaKeyShortcutsValue() const;
+    AccessibilityCurrentState currentState() const;
+    String currentValue() const;
+    bool supportsCurrent() const;
+    const String keyShortcutsValue() const;
     
     // This function checks if the object should be ignored when there's a modal dialog displayed.
     bool ignoredFromARIAModalPresence() const;
@@ -782,7 +782,7 @@ public:
     virtual int textLength() const { return 0; }
     virtual String ariaLabeledByAttribute() const { return String(); }
     virtual String ariaDescribedByAttribute() const { return String(); }
-    const AtomicString& placeholderValue() const;
+    const String placeholderValue() const;
     bool accessibleNameDerivesFromContent() const;
     
     // Abbreviations
@@ -978,12 +978,12 @@ public:
     void ariaTreeItemContent(AccessibilityChildrenVector&);
     
     // ARIA live-region features.
-    bool supportsARIALiveRegion(bool excludeIfOff = true) const;
-    bool isInsideARIALiveRegion(bool excludeIfOff = true) const;
-    AccessibilityObject* ariaLiveRegionAncestor(bool excludeIfOff = true) const;
-    virtual const String ariaLiveRegionStatus() const { return String(); }
-    virtual const AtomicString& ariaLiveRegionRelevant() const { return nullAtom(); }
-    virtual bool ariaLiveRegionAtomic() const { return false; }
+    bool supportsLiveRegion(bool excludeIfOff = true) const;
+    bool isInsideLiveRegion(bool excludeIfOff = true) const;
+    AccessibilityObject* liveRegionAncestor(bool excludeIfOff = true) const;
+    virtual const String liveRegionStatus() const { return String(); }
+    virtual const String liveRegionRelevant() const { return nullAtom(); }
+    virtual bool liveRegionAtomic() const { return false; }
     virtual bool isBusy() const { return false; }
     static const String defaultLiveRegionStatusForRole(AccessibilityRole);
     static bool liveRegionStatusIsEnabled(const AtomicString&);
@@ -993,8 +993,8 @@ public:
     bool supportsARIAReadOnly() const;
     virtual String ariaReadOnlyValue() const;
 
-    bool supportsARIAAutoComplete() const;
-    String ariaAutoCompleteValue() const;
+    bool supportsAutoComplete() const;
+    String autoCompleteValue() const;
     
     bool supportsARIAAttributes() const;
     
index 42192e6..bcc62a9 100644 (file)
@@ -1006,9 +1006,9 @@ bool AccessibilityRenderObject::hasTextAlternative() const
     return ariaAccessibilityDescription().length();
 }
     
-bool AccessibilityRenderObject::ariaHasPopup() const
+bool AccessibilityRenderObject::hasPopup() const
 {
-    return !equalLettersIgnoringASCIICase(ariaPopupValue(), "false");
+    return !equalLettersIgnoringASCIICase(hasPopupValue(), "false");
 }
 
 bool AccessibilityRenderObject::supportsARIADropping() const 
@@ -2641,7 +2641,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
         return AccessibilityRole::StaticText;
     if (cssBox && cssBox->isImage()) {
         if (is<HTMLInputElement>(node))
-            return ariaHasPopup() ? AccessibilityRole::PopUpButton : AccessibilityRole::Button;
+            return hasPopup() ? AccessibilityRole::PopUpButton : AccessibilityRole::Button;
         if (isSVGImage())
             return AccessibilityRole::SVGRoot;
         return AccessibilityRole::Image;
@@ -2841,7 +2841,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
 
 AccessibilityOrientation AccessibilityRenderObject::orientation() const
 {
-    const AtomicString& ariaOrientation = getAttribute(aria_orientationAttr);
+    const AtomicString& ariaOrientation = stringValueForProperty(AXPropertyName::Orientation);
     if (equalLettersIgnoringASCIICase(ariaOrientation, "horizontal"))
         return AccessibilityOrientation::Horizontal;
     if (equalLettersIgnoringASCIICase(ariaOrientation, "vertical"))
@@ -2964,7 +2964,7 @@ void AccessibilityRenderObject::textChanged()
         if (!parent)
             continue;
         
-        if (parent->supportsARIALiveRegion())
+        if (parent->supportsLiveRegion())
             cache->postLiveRegionChangeNotification(parent);
 
         if (parent->isNonNativeTextControl())
@@ -3253,9 +3253,9 @@ bool AccessibilityRenderObject::canHaveChildren() const
     return AccessibilityNodeObject::canHaveChildren();
 }
 
-const String AccessibilityRenderObject::ariaLiveRegionStatus() const
+const String AccessibilityRenderObject::liveRegionStatus() const
 {
-    const AtomicString& liveRegionStatus = getAttribute(aria_liveAttr);
+    const AtomicString& liveRegionStatus = stringValueForProperty(AXPropertyName::Live);
     // These roles have implicit live region status.
     if (liveRegionStatus.isEmpty())
         return defaultLiveRegionStatusForRole(roleValue());
@@ -3263,19 +3263,18 @@ const String AccessibilityRenderObject::ariaLiveRegionStatus() const
     return liveRegionStatus;
 }
 
-const AtomicString& AccessibilityRenderObject::ariaLiveRegionRelevant() const
+const String AccessibilityRenderObject::liveRegionRelevant() const
 {
-    static NeverDestroyed<const AtomicString> defaultLiveRegionRelevant("additions text", AtomicString::ConstructFromLiteral);
-    const AtomicString& relevant = getAttribute(aria_relevantAttr);
+    const AtomicString& relevant = stringValueForProperty(AXPropertyName::Relevant);
 
     // Default aria-relevant = "additions text".
     if (relevant.isEmpty())
-        return defaultLiveRegionRelevant;
+        return "additions text";
     
     return relevant;
 }
 
-bool AccessibilityRenderObject::ariaLiveRegionAtomic() const
+bool AccessibilityRenderObject::liveRegionAtomic() const
 {
     const AtomicString& atomic = getAttribute(aria_atomicAttr);
     if (equalLettersIgnoringASCIICase(atomic, "true"))
index 2f47717..1c6c54c 100644 (file)
@@ -171,7 +171,7 @@ public:
     IntRect boundsForRects(LayoutRect&, LayoutRect&, RefPtr<Range>) const;
     void setSelectedVisiblePositionRange(const VisiblePositionRange&) const override;
     bool isVisiblePositionRangeInDifferentDocument(const VisiblePositionRange&) const;
-    bool ariaHasPopup() const override;
+    bool hasPopup() const override;
 
     bool supportsARIADropping() const override;
     bool supportsARIADragging() const override;
@@ -276,9 +276,9 @@ private:
     
     ESpeak speakProperty() const override;
     
-    const String ariaLiveRegionStatus() const override;
-    const AtomicString& ariaLiveRegionRelevant() const override;
-    bool ariaLiveRegionAtomic() const override;
+    const String liveRegionStatus() const override;
+    const String liveRegionRelevant() const override;
+    bool liveRegionAtomic() const override;
     bool isBusy() const override;
 
     bool inheritsPresentationalRole() const override;
index 0504439..71ccb9e 100644 (file)
@@ -45,8 +45,22 @@ static ARIAAttributeMap& ariaAttributeMap()
             AXPropertyName name;
             QualifiedName ariaAttribute;
         } attributes[] = {
+            { AXPropertyName::Autocomplete, aria_autocompleteAttr },
+            { AXPropertyName::Checked, aria_checkedAttr },
+            { AXPropertyName::Current, aria_currentAttr },
+            { AXPropertyName::HasPopUp, aria_haspopupAttr },
+            { AXPropertyName::Invalid, aria_invalidAttr },
+            { AXPropertyName::KeyShortcuts, aria_keyshortcutsAttr },
             { AXPropertyName::Label, aria_labelAttr },
-            { AXPropertyName::Role, roleAttr }
+            { AXPropertyName::Live, aria_liveAttr },
+            { AXPropertyName::Orientation, aria_orientationAttr },
+            { AXPropertyName::Placeholder, aria_placeholderAttr },
+            { AXPropertyName::Pressed, aria_pressedAttr },
+            { AXPropertyName::Relevant, aria_relevantAttr },
+            { AXPropertyName::Role, roleAttr },
+            { AXPropertyName::RoleDescription, aria_roledescriptionAttr },
+            { AXPropertyName::Sort, aria_sortAttr },
+            { AXPropertyName::ValueText, aria_valuetextAttr }
         };
         ARIAAttributeMap map;
         for (auto& attribute : attributes)
@@ -59,8 +73,21 @@ static ARIAAttributeMap& ariaAttributeMap()
 static bool isPropertyValueString(AXPropertyName propertyName)
 {
     switch (propertyName) {
+    case AXPropertyName::Autocomplete:
+    case AXPropertyName::Checked:
+    case AXPropertyName::Current:
+    case AXPropertyName::HasPopUp:
+    case AXPropertyName::Invalid:
     case AXPropertyName::Label:
+    case AXPropertyName::Live:
+    case AXPropertyName::Orientation:
+    case AXPropertyName::Placeholder:
+    case AXPropertyName::Pressed:
+    case AXPropertyName::Relevant:
     case AXPropertyName::Role:
+    case AXPropertyName::RoleDescription:
+    case AXPropertyName::Sort:
+    case AXPropertyName::ValueText:
         return true;
     default:
         return false;
@@ -119,16 +146,87 @@ void AccessibleNode::setStringProperty(const String& value, AXPropertyName prope
     m_propertyMap.set(propertyName, value);
 }
 
-String AccessibleNode::role() const
+void AccessibleNode::notifyAttributeChanged(const WebCore::QualifiedName& name)
 {
-    return stringValueForProperty(m_ownerElement, AXPropertyName::Role);
+    if (AXObjectCache* cache = m_ownerElement.document().axObjectCache())
+        cache->handleAttributeChanged(name, &m_ownerElement);
 }
 
-void AccessibleNode::setRole(const String& role)
+String AccessibleNode::autocomplete() const
 {
-    setStringProperty(role, AXPropertyName::Role);
-    if (AXObjectCache* cache = m_ownerElement.document().axObjectCache())
-        cache->handleAttributeChanged(roleAttr, &m_ownerElement);
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Autocomplete);
+}
+
+void AccessibleNode::setAutocomplete(const String& autocomplete)
+{
+    setStringProperty(autocomplete, AXPropertyName::Autocomplete);
+    notifyAttributeChanged(aria_autocompleteAttr);
+}
+
+String AccessibleNode::checked() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Checked);
+}
+
+void AccessibleNode::setChecked(const String& checked)
+{
+    setStringProperty(checked, AXPropertyName::Checked);
+    notifyAttributeChanged(aria_checkedAttr);
+}
+
+String AccessibleNode::current() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Current);
+}
+
+void AccessibleNode::setCurrent(const String& current)
+{
+    setStringProperty(current, AXPropertyName::Current);
+    notifyAttributeChanged(aria_currentAttr);
+}
+
+String AccessibleNode::hasPopUp() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::HasPopUp);
+}
+
+void AccessibleNode::setHasPopUp(const String& hasPopUp)
+{
+    setStringProperty(hasPopUp, AXPropertyName::HasPopUp);
+    notifyAttributeChanged(aria_haspopupAttr);
+}
+
+String AccessibleNode::invalid() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Invalid);
+}
+
+void AccessibleNode::setInvalid(const String& invalid)
+{
+    setStringProperty(invalid, AXPropertyName::Invalid);
+    notifyAttributeChanged(aria_invalidAttr);
+}
+
+String AccessibleNode::keyShortcuts() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::KeyShortcuts);
+}
+
+void AccessibleNode::setKeyShortcuts(const String& keyShortcuts)
+{
+    setStringProperty(keyShortcuts, AXPropertyName::KeyShortcuts);
+    notifyAttributeChanged(aria_keyshortcutsAttr);
+}
+
+String AccessibleNode::live() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Live);
+}
+
+void AccessibleNode::setLive(const String& live)
+{
+    setStringProperty(live, AXPropertyName::Live);
+    notifyAttributeChanged(aria_liveAttr);
 }
 
 String AccessibleNode::label() const
@@ -139,8 +237,95 @@ String AccessibleNode::label() const
 void AccessibleNode::setLabel(const String& label)
 {
     setStringProperty(label, AXPropertyName::Label);
-    if (AXObjectCache* cache = m_ownerElement.document().axObjectCache())
-        cache->handleAttributeChanged(aria_labelAttr, &m_ownerElement);
+    notifyAttributeChanged(aria_labelAttr);
+}
+
+String AccessibleNode::orientation() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Orientation);
+}
+
+void AccessibleNode::setOrientation(const String& orientation)
+{
+    setStringProperty(orientation, AXPropertyName::Orientation);
+    notifyAttributeChanged(aria_orientationAttr);
+}
+
+String AccessibleNode::placeholder() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Placeholder);
+}
+
+void AccessibleNode::setPlaceholder(const String& placeholder)
+{
+    setStringProperty(placeholder, AXPropertyName::Placeholder);
+    notifyAttributeChanged(aria_placeholderAttr);
+}
+
+String AccessibleNode::pressed() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Pressed);
+}
+
+void AccessibleNode::setPressed(const String& pressed)
+{
+    setStringProperty(pressed, AXPropertyName::Pressed);
+    notifyAttributeChanged(aria_pressedAttr);
+}
+
+String AccessibleNode::relevant() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Relevant);
+}
+
+void AccessibleNode::setRelevant(const String& relevant)
+{
+    setStringProperty(relevant, AXPropertyName::Relevant);
+    notifyAttributeChanged(aria_relevantAttr);
+}
+
+String AccessibleNode::role() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Role);
+}
+
+void AccessibleNode::setRole(const String& role)
+{
+    setStringProperty(role, AXPropertyName::Role);
+    notifyAttributeChanged(roleAttr);
+}
+
+String AccessibleNode::roleDescription() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::RoleDescription);
+}
+
+void AccessibleNode::setRoleDescription(const String& roleDescription)
+{
+    setStringProperty(roleDescription, AXPropertyName::RoleDescription);
+    notifyAttributeChanged(aria_roledescriptionAttr);
+}
+
+String AccessibleNode::sort() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::Sort);
+}
+
+void AccessibleNode::setSort(const String& sort)
+{
+    setStringProperty(sort, AXPropertyName::Sort);
+    notifyAttributeChanged(aria_sortAttr);
+}
+
+String AccessibleNode::valueText() const
+{
+    return stringValueForProperty(m_ownerElement, AXPropertyName::ValueText);
+}
+
+void AccessibleNode::setValueText(const String& valueText)
+{
+    setStringProperty(valueText, AXPropertyName::ValueText);
+    notifyAttributeChanged(aria_valuetextAttr);
 }
 
 } // namespace WebCore
index a0450f3..e5d9bc0 100644 (file)
@@ -40,8 +40,22 @@ typedef Variant<String, bool, int> PropertyValueVariant;
 
 enum class AXPropertyName {
     None,
+    Autocomplete,
+    Checked,
+    Current,
+    HasPopUp,
+    Invalid,
+    KeyShortcuts,
+    Label,
+    Live,
+    Orientation,
+    Placeholder,
+    Pressed,
+    Relevant,
     Role,
-    Label
+    RoleDescription,
+    Sort,
+    ValueText
 };
 
 struct AXPropertyHashTraits : WTF::GenericHashTraits<AXPropertyName> {
@@ -49,11 +63,11 @@ struct AXPropertyHashTraits : WTF::GenericHashTraits<AXPropertyName> {
     static AXPropertyName emptyValue() { return AXPropertyName::None; };
     static void constructDeletedValue(AXPropertyName& slot)
     {
-        slot = AXPropertyName::None;
+        slot = static_cast<AXPropertyName>(static_cast<int>(AXPropertyName::None) - 1);
     }
     static bool isDeletedValue(AXPropertyName value)
     {
-        return value == AXPropertyName::None;
+        return static_cast<int>(value) == static_cast<int>(AXPropertyName::None) - 1;
     }
 };
 
@@ -71,16 +85,60 @@ public:
     static const String effectiveStringValueForElement(Element&, AXPropertyName);
     static bool hasProperty(Element&, AXPropertyName);
 
-    String role() const;
-    void setRole(const String&);
+    String autocomplete() const;
+    void setAutocomplete(const String&);
+
+    String checked() const;
+    void setChecked(const String&);
+
+    String current() const;
+    void setCurrent(const String&);
+
+    String hasPopUp() const;
+    void setHasPopUp(const String&);
+
+    String invalid() const;
+    void setInvalid(const String&);
+
+    String keyShortcuts() const;
+    void setKeyShortcuts(const String&);
+
+    String live() const;
+    void setLive(const String&);
 
     String label() const;
     void setLabel(const String&);
 
+    String orientation() const;
+    void setOrientation(const String&);
+
+    String placeholder() const;
+    void setPlaceholder(const String&);
+
+    String pressed() const;
+    void setPressed(const String&);
+
+    String relevant() const;
+    void setRelevant(const String&);
+
+    String role() const;
+    void setRole(const String&);
+
+    String roleDescription() const;
+    void setRoleDescription(const String&);
+
+    String sort() const;
+    void setSort(const String&);
+
+    String valueText() const;
+    void setValueText(const String&);
+
 private:
     static const PropertyValueVariant valueForProperty(Element&, AXPropertyName);
     static const String stringValueForProperty(Element&, AXPropertyName);
     void setStringProperty(const String&, AXPropertyName);
+    
+    void notifyAttributeChanged(const WebCore::QualifiedName&);
 
     Element& m_ownerElement;
 
index a6da728..8ed3a71 100644 (file)
     SkipVTableValidation,
     EnabledAtRuntime=AccessibilityObjectModel,
 ] interface AccessibleNode {
-    attribute DOMString? role;
+    attribute DOMString? autocomplete;
+    attribute DOMString? checked;
+    attribute DOMString? current;
+    attribute DOMString? hasPopUp;
+    attribute DOMString? invalid;
+    attribute DOMString? keyShortcuts;
     attribute DOMString? label;
+    attribute DOMString? live;
+    attribute DOMString? orientation;
+    attribute DOMString? placeholder;
+    attribute DOMString? pressed;
+    attribute DOMString? relevant;
+    attribute DOMString? role;
+    attribute DOMString? roleDescription;
+    attribute DOMString? sort;
+    attribute DOMString? valueText;
 };
index 1679f61..6ff644c 100644 (file)
@@ -244,7 +244,7 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* coreObject, AX
         break;
 
     case AXCurrentChanged:
-        atk_object_notify_state_change(axObject, ATK_STATE_ACTIVE, coreObject->ariaCurrentState() != AccessibilityARIACurrentState::False);
+        atk_object_notify_state_change(axObject, ATK_STATE_ACTIVE, coreObject->currentState() != AccessibilityCurrentState::False);
         break;
 
     case AXRowExpanded:
index 2e27650..0a8a030 100644 (file)
@@ -499,14 +499,14 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
     if (!placeholder.isEmpty())
         attributeSet = addToAtkAttributeSet(attributeSet, "placeholder-text", placeholder.utf8().data());
 
-    if (coreObject->supportsARIAAutoComplete())
-        attributeSet = addToAtkAttributeSet(attributeSet, "autocomplete", coreObject->ariaAutoCompleteValue().utf8().data());
+    if (coreObject->supportsAutoComplete())
+        attributeSet = addToAtkAttributeSet(attributeSet, "autocomplete", coreObject->autoCompleteValue().utf8().data());
 
-    if (coreObject->supportsARIAHasPopup())
-        attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->ariaPopupValue().utf8().data());
+    if (coreObject->supportsHasPopup())
+        attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->hasPopupValue().utf8().data());
 
-    if (coreObject->supportsARIACurrent())
-        attributeSet = addToAtkAttributeSet(attributeSet, "current", coreObject->ariaCurrentValue().utf8().data());
+    if (coreObject->supportsCurrent())
+        attributeSet = addToAtkAttributeSet(attributeSet, "current", coreObject->currentValue().utf8().data());
 
     // The Core AAM states that an explicitly-set value should be exposed, including "none".
     if (coreObject->hasAttribute(HTMLNames::aria_sortAttr)) {
@@ -565,10 +565,10 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
         attributeSet = addToAtkAttributeSet(attributeSet, "roledescription", roleDescription.utf8().data());
 
     // We need to expose the live region attributes even if the live region is currently disabled/off.
-    if (auto liveContainer = coreObject->ariaLiveRegionAncestor(false)) {
-        String liveStatus = liveContainer->ariaLiveRegionStatus();
-        String relevant = liveContainer->ariaLiveRegionRelevant();
-        bool isAtomic = liveContainer->ariaLiveRegionAtomic();
+    if (auto liveContainer = coreObject->liveRegionAncestor(false)) {
+        String liveStatus = liveContainer->liveRegionStatus();
+        String relevant = liveContainer->liveRegionRelevant();
+        bool isAtomic = liveContainer->liveRegionAtomic();
         String liveRole = roleString.isEmpty() ? computedRoleString : roleString;
 
         // According to the Core AAM, we need to expose the above properties with "container-" prefixed
@@ -587,7 +587,7 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
             attributeSet = addToAtkAttributeSet(attributeSet, "relevant", relevant.utf8().data());
             if (isAtomic)
                 attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true");
-        } else if (!isAtomic && coreObject->ariaLiveRegionAtomic())
+        } else if (!isAtomic && coreObject->liveRegionAtomic())
             attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true");
     }
 
@@ -602,7 +602,7 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
         attributeSet = addToAtkAttributeSet(attributeSet, "grabbed", "false");
 
     // The Core AAM states the author-provided value should be exposed as-is.
-    const AtomicString& keyShortcuts = coreObject->ariaKeyShortcutsValue();
+    const AtomicString& keyShortcuts = coreObject->keyShortcutsValue();
     if (!keyShortcuts.isEmpty())
         attributeSet = addToAtkAttributeSet(attributeSet, "keyshortcuts", keyShortcuts.string().utf8().data());
 
@@ -687,7 +687,7 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case AccessibilityRole::Window:
         return ATK_ROLE_WINDOW;
     case AccessibilityRole::PopUpButton:
-        return coreObject->ariaHasPopup() ? ATK_ROLE_PUSH_BUTTON : ATK_ROLE_COMBO_BOX;
+        return coreObject->hasPopup() ? ATK_ROLE_PUSH_BUTTON : ATK_ROLE_COMBO_BOX;
     case AccessibilityRole::ComboBox:
         return ATK_ROLE_COMBO_BOX;
     case AccessibilityRole::SplitGroup:
@@ -930,7 +930,7 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta
 
     // Please keep the state list in alphabetical order
     if ((isListBoxOption && coreObject->isSelectedOptionActive())
-        || coreObject->ariaCurrentState() != AccessibilityARIACurrentState::False)
+        || coreObject->currentState() != AccessibilityCurrentState::False)
         atk_state_set_add_state(stateSet, ATK_STATE_ACTIVE);
 
     if (coreObject->isBusy())
@@ -977,7 +977,7 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta
     else if (coreObject->orientation() == AccessibilityOrientation::Vertical)
         atk_state_set_add_state(stateSet, ATK_STATE_VERTICAL);
 
-    if (coreObject->ariaHasPopup())
+    if (coreObject->hasPopup())
         atk_state_set_add_state(stateSet, ATK_STATE_HAS_POPUP);
 
     if (coreObject->isIndeterminate())
@@ -1046,7 +1046,7 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta
 
     // TODO: ATK_STATE_SENSITIVE
 
-    if (coreObject->supportsARIAAutoComplete() && coreObject->ariaAutoCompleteValue() != "none")
+    if (coreObject->supportsAutoComplete() && coreObject->autoCompleteValue() != "none")
         atk_state_set_add_state(stateSet, ATK_STATE_SUPPORTS_AUTOCOMPLETION);
 
     if (coreObject->isVisited())
index 41e08be..3835328 100644 (file)
@@ -497,7 +497,7 @@ static AccessibilityObjectWrapper* AccessibilityUnignoredAncestor(AccessibilityO
     if (![self _prepareAccessibilityCall])
         return NO;
     
-    return m_object->ariaHasPopup();
+    return m_object->hasPopup();
 }
 
 - (NSString *)accessibilityLanguage
@@ -2880,7 +2880,7 @@ static void AXAttributedStringAppendText(NSMutableAttributedString* attrString,
     if (![self _prepareAccessibilityCall])
         return nil;
 
-    return m_object->ariaLiveRegionStatus();
+    return m_object->liveRegionStatus();
 }
 
 - (NSString *)accessibilityARIARelevantStatus
@@ -2888,7 +2888,7 @@ static void AXAttributedStringAppendText(NSMutableAttributedString* attrString,
     if (![self _prepareAccessibilityCall])
         return nil;
     
-    return m_object->ariaLiveRegionRelevant();
+    return m_object->liveRegionRelevant();
 }
 
 - (BOOL)accessibilityARIALiveRegionIsAtomic
@@ -2896,7 +2896,7 @@ static void AXAttributedStringAppendText(NSMutableAttributedString* attrString,
     if (![self _prepareAccessibilityCall])
         return NO;
     
-    return m_object->ariaLiveRegionAtomic();
+    return m_object->liveRegionAtomic();
 }
 
 - (BOOL)accessibilitySupportsARIAPressed
@@ -2904,7 +2904,7 @@ static void AXAttributedStringAppendText(NSMutableAttributedString* attrString,
     if (![self _prepareAccessibilityCall])
         return NO;
     
-    return m_object->supportsARIAPressed();
+    return m_object->supportsPressed();
 }
 
 - (BOOL)accessibilityIsPressed
@@ -2968,20 +2968,20 @@ static void AXAttributedStringAppendText(NSMutableAttributedString* attrString,
     if (![self _prepareAccessibilityCall])
         return nil;
     
-    switch (m_object->ariaCurrentState()) {
-    case AccessibilityARIACurrentState::False:
+    switch (m_object->currentState()) {
+    case AccessibilityCurrentState::False:
         return @"false";
-    case AccessibilityARIACurrentState::Page:
+    case AccessibilityCurrentState::Page:
         return @"page";
-    case AccessibilityARIACurrentState::Step:
+    case AccessibilityCurrentState::Step:
         return @"step";
-    case AccessibilityARIACurrentState::Location:
+    case AccessibilityCurrentState::Location:
         return @"location";
-    case AccessibilityARIACurrentState::Time:
+    case AccessibilityCurrentState::Time:
         return @"time";
-    case AccessibilityARIACurrentState::Date:
+    case AccessibilityCurrentState::Date:
         return @"date";
-    case AccessibilityARIACurrentState::True:
+    case AccessibilityCurrentState::True:
         return @"true";
     }
 }
index 58d52a8..d875991 100644 (file)
@@ -1187,7 +1187,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache* cache, const Visibl
     if (is<AccessibilityTable>(*m_object) && downcast<AccessibilityTable>(*m_object).isExposableThroughAccessibility() && downcast<AccessibilityTable>(*m_object).supportsSelectedRows())
         [additional addObject:NSAccessibilitySelectedRowsAttribute];
     
-    if (m_object->supportsARIALiveRegion()) {
+    if (m_object->supportsLiveRegion()) {
         [additional addObject:NSAccessibilityARIALiveAttribute];
         [additional addObject:NSAccessibilityARIARelevantAttribute];
     }
@@ -1202,7 +1202,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache* cache, const Visibl
         [additional addObject:NSAccessibilitySortDirectionAttribute];
     
     // If an object is a child of a live region, then add these
-    if (m_object->isInsideARIALiveRegion())
+    if (m_object->isInsideLiveRegion())
         [additional addObject:NSAccessibilityARIAAtomicAttribute];
     // All objects should expose the ARIA busy attribute (ARIA 1.1 with ISSUE-538).
     [additional addObject:NSAccessibilityElementBusyAttribute];
@@ -1219,7 +1219,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache* cache, const Visibl
         [additional addObject:NSAccessibilityRequiredAttribute];
     }
     
-    if (m_object->ariaHasPopup())
+    if (m_object->hasPopup())
         [additional addObject:NSAccessibilityHasPopupAttribute];
     
     if (m_object->isMathRoot()) {
@@ -1661,7 +1661,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache* cache, const Visibl
         objectAttributes = [objectAttributes arrayByAddingObjectsFromArray:additionalAttributes];
     
     // Only expose AXARIACurrent attribute when the element is set to be current item.
-    if (m_object->ariaCurrentState() != AccessibilityARIACurrentState::False)
+    if (m_object->currentState() != AccessibilityCurrentState::False)
         objectAttributes = [objectAttributes arrayByAddingObjectsFromArray:@[ NSAccessibilityARIACurrentAttribute ]];
     
     return objectAttributes;
@@ -2979,7 +2979,7 @@ static NSString* roleValueToNSString(AccessibilityRole value)
         return [NSNumber numberWithBool:m_object->isSelected()];
     
     if ([attributeName isEqualToString: NSAccessibilityARIACurrentAttribute])
-        return m_object->ariaCurrentValue();
+        return m_object->currentValue();
     
     if ([attributeName isEqualToString: NSAccessibilityServesAsTitleForUIElementsAttribute] && m_object->isMenuButton()) {
         AccessibilityObject* uiElement = downcast<AccessibilityRenderObject>(*m_object).menuForMenuButton();
@@ -3091,7 +3091,7 @@ static NSString* roleValueToNSString(AccessibilityRole value)
         return @(m_object->isValueAutofilled());
 
     if ([attributeName isEqualToString:NSAccessibilityHasPopupAttribute])
-        return [NSNumber numberWithBool:m_object->ariaHasPopup()];
+        return [NSNumber numberWithBool:m_object->hasPopup()];
 
     if ([attributeName isEqualToString:NSAccessibilityDatetimeValueAttribute])
         return m_object->datetimeAttributeValue();
@@ -3101,11 +3101,11 @@ static NSString* roleValueToNSString(AccessibilityRole value)
     
     // ARIA Live region attributes.
     if ([attributeName isEqualToString:NSAccessibilityARIALiveAttribute])
-        return m_object->ariaLiveRegionStatus();
+        return m_object->liveRegionStatus();
     if ([attributeName isEqualToString:NSAccessibilityARIARelevantAttribute])
-        return m_object->ariaLiveRegionRelevant();
+        return m_object->liveRegionRelevant();
     if ([attributeName isEqualToString:NSAccessibilityARIAAtomicAttribute])
-        return [NSNumber numberWithBool:m_object->ariaLiveRegionAtomic()];
+        return [NSNumber numberWithBool:m_object->liveRegionAtomic()];
     if ([attributeName isEqualToString:NSAccessibilityElementBusyAttribute])
         return [NSNumber numberWithBool:m_object->isBusy()];
     
@@ -3184,6 +3184,18 @@ static NSString* roleValueToNSString(AccessibilityRole value)
     if ([attributeName isEqualToString:@"AXDRTElementIdAttribute"])
         return m_object->getAttribute(idAttr);
     
+    if ([attributeName isEqualToString:@"AXAutocompleteValue"])
+        return m_object->autoCompleteValue();
+    
+    if ([attributeName isEqualToString:@"AXHasPopUpValue"])
+        return m_object->hasPopupValue();
+    
+    if ([attributeName isEqualToString:@"AXKeyShortcutsValue"])
+        return m_object->keyShortcutsValue();
+    
+    if ([attributeName isEqualToString:@"AXARIAPressedIsPresent"])
+        return [NSNumber numberWithBool:m_object->pressedIsPresent()];
+    
     if (m_object->isWebArea() && [attributeName isEqualToString:NSAccessibilityPreventKeyboardDOMEventDispatchAttribute])
         return [NSNumber numberWithBool:m_object->preventKeyboardDOMEventDispatch()];
     
index 769bc6d..c87a6b6 100644 (file)
@@ -1761,26 +1761,26 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui
                     controlledNodeIds->addItem(pushNodePathToFrontend(controlledElement));
             }
             
-            switch (axObject->ariaCurrentState()) {
-            case AccessibilityARIACurrentState::False:
+            switch (axObject->currentState()) {
+            case AccessibilityCurrentState::False:
                 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::False;
                 break;
-            case AccessibilityARIACurrentState::Page:
+            case AccessibilityCurrentState::Page:
                 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Page;
                 break;
-            case AccessibilityARIACurrentState::Step:
+            case AccessibilityCurrentState::Step:
                 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Step;
                 break;
-            case AccessibilityARIACurrentState::Location:
+            case AccessibilityCurrentState::Location:
                 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Location;
                 break;
-            case AccessibilityARIACurrentState::Date:
+            case AccessibilityCurrentState::Date:
                 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Date;
                 break;
-            case AccessibilityARIACurrentState::Time:
+            case AccessibilityCurrentState::Time:
                 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Time;
                 break;
-            case AccessibilityARIACurrentState::True:
+            case AccessibilityCurrentState::True:
                 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::True;
                 break;
             }
@@ -1824,11 +1824,11 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui
             
             label = axObject->computedLabel();
 
-            if (axObject->supportsARIALiveRegion()) {
+            if (axObject->supportsLiveRegion()) {
                 supportsLiveRegion = true;
-                liveRegionAtomic = axObject->ariaLiveRegionAtomic();
+                liveRegionAtomic = axObject->liveRegionAtomic();
 
-                String ariaRelevantAttrValue = axObject->ariaLiveRegionRelevant();
+                String ariaRelevantAttrValue = axObject->liveRegionRelevant();
                 if (!ariaRelevantAttrValue.isEmpty()) {
                     // FIXME: Pass enum values rather than strings once unblocked. http://webkit.org/b/133711
                     String ariaRelevantAdditions = Inspector::Protocol::InspectorHelpers::getEnumConstantValue(Inspector::Protocol::DOM::LiveRegionRelevant::Additions);
@@ -1852,7 +1852,7 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui
                     }
                 }
 
-                String ariaLive = axObject->ariaLiveRegionStatus();
+                String ariaLive = axObject->liveRegionStatus();
                 if (ariaLive == "assertive")
                     liveRegionStatus = Inspector::Protocol::DOM::AccessibilityProperties::LiveRegionStatus::Assertive;
                 else if (ariaLive == "polite")
@@ -1875,7 +1875,7 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui
             if (AccessibilityObject* parentObject = axObject->parentObjectUnignored())
                 parentNode = parentObject->node();
 
-            supportsPressed = axObject->ariaPressedIsPresent();
+            supportsPressed = axObject->pressedIsPresent();
             if (supportsPressed)
                 pressed = axObject->isPressed();
             
@@ -1903,7 +1903,7 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui
             hierarchicalLevel = axObject->hierarchicalLevel();
             
             level = hierarchicalLevel ? hierarchicalLevel : headingLevel;
-            isPopupButton = axObject->isPopUpButton() || axObject->ariaHasPopup();
+            isPopupButton = axObject->isPopUpButton() || axObject->hasPopup();
         }
     }