Changeset 224953 in webkit
- Timestamp:
- Nov 16, 2017 6:24:53 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r224946 r224953 1 2017-11-16 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: Implement string type properties 4 https://bugs.webkit.org/show_bug.cgi?id=179495 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/accessibility-object-model.html: 9 * accessibility/mac/AOM-string-properties-expected.txt: Added. 10 * accessibility/mac/AOM-string-properties.html: Added. 11 1 12 2017-11-16 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/LayoutTests/accessibility/accessibility-object-model.html
r224893 r224953 112 112 button2.parentElement.removeChild(button2); 113 113 })(); 114 gc();115 114 shouldBe("aomRemovedButton.role", "'checkbox'"); 116 115 } -
trunk/Source/WebCore/ChangeLog
r224952 r224953 1 2017-11-16 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: Implement string type properties 4 https://bugs.webkit.org/show_bug.cgi?id=179495 5 6 Reviewed by Chris Fleizach. 7 8 Implemented the rest of the string type properties for Accessibility 9 Object Model. 10 11 Test: accessibility/mac/AOM-string-properties.html 12 13 * accessibility/AXObjectCache.cpp: 14 (WebCore::AXObjectCache::handleLiveRegionCreated): 15 * accessibility/AccessibilityNodeObject.cpp: 16 (WebCore::AccessibilityNodeObject::childrenChanged): 17 (WebCore::AccessibilityNodeObject::isPressed const): 18 (WebCore::AccessibilityNodeObject::isChecked const): 19 (WebCore::AccessibilityNodeObject::valueDescription const): 20 * accessibility/AccessibilityObject.cpp: 21 (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex): 22 (WebCore::AccessibilityObject::supportsAutoComplete const): 23 (WebCore::AccessibilityObject::autoCompleteValue const): 24 (WebCore::AccessibilityObject::invalidStatus const): 25 (WebCore::AccessibilityObject::supportsCurrent const): 26 (WebCore::AccessibilityObject::currentState const): 27 (WebCore::AccessibilityObject::currentValue const): 28 (WebCore::AccessibilityObject::roleDescription const): 29 (WebCore::AccessibilityObject::keyShortcutsValue const): 30 (WebCore::AccessibilityObject::placeholderValue const): 31 (WebCore::AccessibilityObject::isInsideLiveRegion const): 32 (WebCore::AccessibilityObject::liveRegionAncestor const): 33 (WebCore::AccessibilityObject::supportsARIAAttributes const): 34 (WebCore::AccessibilityObject::supportsLiveRegion const): 35 (WebCore::AccessibilityObject::sortDirection const): 36 (WebCore::AccessibilityObject::supportsHasPopup const): 37 (WebCore::AccessibilityObject::hasPopupValue const): 38 (WebCore::AccessibilityObject::supportsPressed const): 39 (WebCore::AccessibilityObject::checkboxOrRadioValue const): 40 (WebCore::AccessibilityObject::pressedIsPresent const): 41 (WebCore::AccessibilityObject::buttonRoleType const): 42 (WebCore::AccessibilityObject::supportsARIAAutoComplete const): Deleted. 43 (WebCore::AccessibilityObject::ariaAutoCompleteValue const): Deleted. 44 (WebCore::AccessibilityObject::supportsARIACurrent const): Deleted. 45 (WebCore::AccessibilityObject::ariaCurrentState const): Deleted. 46 (WebCore::AccessibilityObject::ariaCurrentValue const): Deleted. 47 (WebCore::AccessibilityObject::ariaKeyShortcutsValue const): Deleted. 48 (WebCore::AccessibilityObject::isInsideARIALiveRegion const): Deleted. 49 (WebCore::AccessibilityObject::ariaLiveRegionAncestor const): Deleted. 50 (WebCore::AccessibilityObject::supportsARIALiveRegion const): Deleted. 51 (WebCore::AccessibilityObject::supportsARIAHasPopup const): Deleted. 52 (WebCore::AccessibilityObject::ariaPopupValue const): Deleted. 53 (WebCore::AccessibilityObject::supportsARIAPressed const): Deleted. 54 (WebCore::AccessibilityObject::ariaPressedIsPresent const): Deleted. 55 * accessibility/AccessibilityObject.h: 56 (WebCore::AccessibilityObject::hasPopup const): 57 (WebCore::AccessibilityObject::liveRegionStatus const): 58 (WebCore::AccessibilityObject::liveRegionRelevant const): 59 (WebCore::AccessibilityObject::liveRegionAtomic const): 60 (WebCore::AccessibilityObject::ariaHasPopup const): Deleted. 61 (WebCore::AccessibilityObject::ariaLiveRegionStatus const): Deleted. 62 (WebCore::AccessibilityObject::ariaLiveRegionRelevant const): Deleted. 63 (WebCore::AccessibilityObject::ariaLiveRegionAtomic const): Deleted. 64 * accessibility/AccessibilityRenderObject.cpp: 65 (WebCore::AccessibilityRenderObject::hasPopup const): 66 (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 67 (WebCore::AccessibilityRenderObject::orientation const): 68 (WebCore::AccessibilityRenderObject::textChanged): 69 (WebCore::AccessibilityRenderObject::liveRegionStatus const): 70 (WebCore::AccessibilityRenderObject::liveRegionRelevant const): 71 (WebCore::AccessibilityRenderObject::liveRegionAtomic const): 72 (WebCore::AccessibilityRenderObject::ariaHasPopup const): Deleted. 73 (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus const): Deleted. 74 (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant const): Deleted. 75 (WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic const): Deleted. 76 * accessibility/AccessibilityRenderObject.h: 77 * accessibility/AccessibleNode.cpp: 78 (WebCore::ariaAttributeMap): 79 (WebCore::isPropertyValueString): 80 (WebCore::AccessibleNode::notifyAttributeChanged): 81 (WebCore::AccessibleNode::autocomplete const): 82 (WebCore::AccessibleNode::setAutocomplete): 83 (WebCore::AccessibleNode::checked const): 84 (WebCore::AccessibleNode::setChecked): 85 (WebCore::AccessibleNode::current const): 86 (WebCore::AccessibleNode::setCurrent): 87 (WebCore::AccessibleNode::hasPopUp const): 88 (WebCore::AccessibleNode::setHasPopUp): 89 (WebCore::AccessibleNode::invalid const): 90 (WebCore::AccessibleNode::setInvalid): 91 (WebCore::AccessibleNode::keyShortcuts const): 92 (WebCore::AccessibleNode::setKeyShortcuts): 93 (WebCore::AccessibleNode::live const): 94 (WebCore::AccessibleNode::setLive): 95 (WebCore::AccessibleNode::setLabel): 96 (WebCore::AccessibleNode::orientation const): 97 (WebCore::AccessibleNode::setOrientation): 98 (WebCore::AccessibleNode::placeholder const): 99 (WebCore::AccessibleNode::setPlaceholder): 100 (WebCore::AccessibleNode::pressed const): 101 (WebCore::AccessibleNode::setPressed): 102 (WebCore::AccessibleNode::relevant const): 103 (WebCore::AccessibleNode::setRelevant): 104 (WebCore::AccessibleNode::role const): 105 (WebCore::AccessibleNode::setRole): 106 (WebCore::AccessibleNode::roleDescription const): 107 (WebCore::AccessibleNode::setRoleDescription): 108 (WebCore::AccessibleNode::sort const): 109 (WebCore::AccessibleNode::setSort): 110 (WebCore::AccessibleNode::valueText const): 111 (WebCore::AccessibleNode::setValueText): 112 * accessibility/AccessibleNode.h: 113 (WebCore::AXPropertyHashTraits::constructDeletedValue): 114 (WebCore::AXPropertyHashTraits::isDeletedValue): 115 * accessibility/AccessibleNode.idl: 116 * accessibility/atk/AXObjectCacheAtk.cpp: 117 (WebCore::AXObjectCache::postPlatformNotification): 118 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: 119 (webkitAccessibleGetAttributes): 120 (atkRole): 121 (setAtkStateSetFromCoreObject): 122 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 123 (-[WebAccessibilityObjectWrapper accessibilityHasPopup]): 124 (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]): 125 (-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]): 126 (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]): 127 (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]): 128 (-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]): 129 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 130 (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]): 131 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): 132 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 133 * inspector/agents/InspectorDOMAgent.cpp: 134 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): 135 1 136 2017-11-16 Alex Christensen <achristensen@webkit.org> 2 137 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r224871 r224953 848 848 849 849 Element* element = downcast<Element>(node); 850 String liveRegionStatus = element->attributeWithoutSynchronization(aria_liveAttr);850 String liveRegionStatus = AccessibleNode::effectiveStringValueForElement(*element, AXPropertyName::Live); 851 851 if (liveRegionStatus.isEmpty()) { 852 852 const AtomicString& ariaRole = AccessibleNode::effectiveStringValueForElement(*element, AXPropertyName::Role); -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r224871 r224953 146 146 // notifications. To fix this, we used a timer to make sure we only post one notification for the children changes within a pre-defined 147 147 // time interval. 148 if (parent->supports ARIALiveRegion())148 if (parent->supportsLiveRegion()) 149 149 cache->postLiveRegionChangeNotification(parent); 150 150 … … 659 659 // If this is an toggle button, check the aria-pressed attribute rather than node()->active() 660 660 if (isToggleButton()) 661 return equalLettersIgnoringASCIICase( getAttribute(aria_pressedAttr), "true");661 return equalLettersIgnoringASCIICase(stringValueForProperty(AXPropertyName::Pressed), "true"); 662 662 663 663 if (!is<Element>(*node)) … … 691 691 } 692 692 693 if (validRole && equalLettersIgnoringASCIICase( getAttribute(aria_checkedAttr), "true"))693 if (validRole && equalLettersIgnoringASCIICase(stringValueForProperty(AXPropertyName::Checked), "true")) 694 694 return true; 695 695 … … 803 803 return String(); 804 804 805 return getAttribute(aria_valuetextAttr).string();805 return stringValueForProperty(AXPropertyName::ValueText); 806 806 } 807 807 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r224899 r224953 211 211 212 212 case AccessibilitySearchKey::LiveRegion: 213 return axObject->supports ARIALiveRegion();213 return axObject->supportsLiveRegion(); 214 214 215 215 case AccessibilitySearchKey::MisspelledWord: … … 1666 1666 } 1667 1667 1668 bool AccessibilityObject::supportsA RIAAutoComplete() const1669 { 1670 return (isComboBox() || isARIATextControl()) && has Attribute(aria_autocompleteAttr);1671 } 1672 1673 String AccessibilityObject::a riaAutoCompleteValue() const1674 { 1675 const AtomicString& autoComplete = getAttribute(aria_autocompleteAttr);1668 bool AccessibilityObject::supportsAutoComplete() const 1669 { 1670 return (isComboBox() || isARIATextControl()) && hasProperty(AXPropertyName::Autocomplete); 1671 } 1672 1673 String AccessibilityObject::autoCompleteValue() const 1674 { 1675 const AtomicString& autoComplete = stringValueForProperty(AXPropertyName::Autocomplete); 1676 1676 if (equalLettersIgnoringASCIICase(autoComplete, "inline") 1677 1677 || equalLettersIgnoringASCIICase(autoComplete, "list") … … 2001 2001 2002 2002 // aria-invalid can return false (default), grammar, spelling, or true. 2003 String ariaInvalid = stripLeadingAndTrailingHTMLSpaces( getAttribute(aria_invalidAttr));2003 String ariaInvalid = stripLeadingAndTrailingHTMLSpaces(stringValueForProperty(AXPropertyName::Invalid)); 2004 2004 2005 2005 if (ariaInvalid.isEmpty()) { … … 2027 2027 } 2028 2028 2029 bool AccessibilityObject::supports ARIACurrent() const2030 { 2031 return has Attribute(aria_currentAttr);2029 bool AccessibilityObject::supportsCurrent() const 2030 { 2031 return hasProperty(AXPropertyName::Current); 2032 2032 } 2033 2033 2034 Accessibility ARIACurrentState AccessibilityObject::ariaCurrentState() const2034 AccessibilityCurrentState AccessibilityObject::currentState() const 2035 2035 { 2036 2036 // aria-current can return false (default), true, page, step, location, date or time. 2037 String currentStateValue = stripLeadingAndTrailingHTMLSpaces( getAttribute(aria_currentAttr));2037 String currentStateValue = stripLeadingAndTrailingHTMLSpaces(stringValueForProperty(AXPropertyName::Current)); 2038 2038 2039 2039 // If "false", empty, or missing, return false state. 2040 2040 if (currentStateValue.isEmpty() || currentStateValue == "false") 2041 return Accessibility ARIACurrentState::False;2041 return AccessibilityCurrentState::False; 2042 2042 2043 2043 if (currentStateValue == "page") 2044 return Accessibility ARIACurrentState::Page;2044 return AccessibilityCurrentState::Page; 2045 2045 if (currentStateValue == "step") 2046 return Accessibility ARIACurrentState::Step;2046 return AccessibilityCurrentState::Step; 2047 2047 if (currentStateValue == "location") 2048 return Accessibility ARIACurrentState::Location;2048 return AccessibilityCurrentState::Location; 2049 2049 if (currentStateValue == "date") 2050 return Accessibility ARIACurrentState::Date;2050 return AccessibilityCurrentState::Date; 2051 2051 if (currentStateValue == "time") 2052 return Accessibility ARIACurrentState::Time;2052 return AccessibilityCurrentState::Time; 2053 2053 2054 2054 // Any value not included in the list of allowed values should be treated as "true". 2055 return Accessibility ARIACurrentState::True;2056 } 2057 2058 String AccessibilityObject:: ariaCurrentValue() const2059 { 2060 switch ( ariaCurrentState()) {2061 case Accessibility ARIACurrentState::False:2055 return AccessibilityCurrentState::True; 2056 } 2057 2058 String AccessibilityObject::currentValue() const 2059 { 2060 switch (currentState()) { 2061 case AccessibilityCurrentState::False: 2062 2062 return "false"; 2063 case Accessibility ARIACurrentState::Page:2063 case AccessibilityCurrentState::Page: 2064 2064 return "page"; 2065 case Accessibility ARIACurrentState::Step:2065 case AccessibilityCurrentState::Step: 2066 2066 return "step"; 2067 case Accessibility ARIACurrentState::Location:2067 case AccessibilityCurrentState::Location: 2068 2068 return "location"; 2069 case Accessibility ARIACurrentState::Time:2069 case AccessibilityCurrentState::Time: 2070 2070 return "time"; 2071 case Accessibility ARIACurrentState::Date:2071 case AccessibilityCurrentState::Date: 2072 2072 return "date"; 2073 2073 default: 2074 case Accessibility ARIACurrentState::True:2074 case AccessibilityCurrentState::True: 2075 2075 return "true"; 2076 2076 } … … 2399 2399 String AccessibilityObject::roleDescription() const 2400 2400 { 2401 return stripLeadingAndTrailingHTMLSpaces( getAttribute(aria_roledescriptionAttr));2401 return stripLeadingAndTrailingHTMLSpaces(stringValueForProperty(AXPropertyName::RoleDescription)); 2402 2402 } 2403 2403 … … 2447 2447 } 2448 2448 2449 const AtomicString& AccessibilityObject::ariaKeyShortcutsValue() const2450 { 2451 return getAttribute(aria_keyshortcutsAttr);2449 const String AccessibilityObject::keyShortcutsValue() const 2450 { 2451 return stringValueForProperty(AXPropertyName::KeyShortcuts); 2452 2452 } 2453 2453 … … 2492 2492 } 2493 2493 2494 const AtomicString&AccessibilityObject::placeholderValue() const2494 const String AccessibilityObject::placeholderValue() const 2495 2495 { 2496 2496 const AtomicString& placeholder = getAttribute(placeholderAttr); … … 2498 2498 return placeholder; 2499 2499 2500 const AtomicString& ariaPlaceholder = getAttribute(aria_placeholderAttr);2500 const AtomicString& ariaPlaceholder = stringValueForProperty(AXPropertyName::Placeholder); 2501 2501 if (!ariaPlaceholder.isEmpty()) 2502 2502 return ariaPlaceholder; … … 2505 2505 } 2506 2506 2507 bool AccessibilityObject::isInside ARIALiveRegion(bool excludeIfOff) const2508 { 2509 return ariaLiveRegionAncestor(excludeIfOff);2510 } 2511 2512 AccessibilityObject* AccessibilityObject:: ariaLiveRegionAncestor(bool excludeIfOff) const2507 bool AccessibilityObject::isInsideLiveRegion(bool excludeIfOff) const 2508 { 2509 return liveRegionAncestor(excludeIfOff); 2510 } 2511 2512 AccessibilityObject* AccessibilityObject::liveRegionAncestor(bool excludeIfOff) const 2513 2513 { 2514 2514 return const_cast<AccessibilityObject*>(AccessibilityObject::matchedParent(*this, true, [excludeIfOff] (const AccessibilityObject& object) { 2515 return object.supports ARIALiveRegion(excludeIfOff);2515 return object.supportsLiveRegion(excludeIfOff); 2516 2516 })); 2517 2517 } … … 2520 2520 { 2521 2521 // This returns whether the element supports any global ARIA attributes. 2522 return supports ARIALiveRegion()2522 return supportsLiveRegion() 2523 2523 || supportsARIADragging() 2524 2524 || supportsARIADropping() … … 2527 2527 || hasAttribute(aria_busyAttr) 2528 2528 || hasAttribute(aria_controlsAttr) 2529 || has Attribute(aria_currentAttr)2529 || hasProperty(AXPropertyName::Current) 2530 2530 || hasAttribute(aria_describedbyAttr) 2531 2531 || hasAttribute(aria_detailsAttr) … … 2533 2533 || hasAttribute(aria_errormessageAttr) 2534 2534 || hasAttribute(aria_flowtoAttr) 2535 || has Attribute(aria_haspopupAttr)2536 || has Attribute(aria_invalidAttr)2535 || hasProperty(AXPropertyName::HasPopUp) 2536 || hasProperty(AXPropertyName::Invalid) 2537 2537 || hasProperty(AXPropertyName::Label) 2538 2538 || hasAttribute(aria_labelledbyAttr) 2539 || has Attribute(aria_relevantAttr);2539 || hasProperty(AXPropertyName::Relevant); 2540 2540 } 2541 2541 … … 2545 2545 } 2546 2546 2547 bool AccessibilityObject::supports ARIALiveRegion(bool excludeIfOff) const2548 { 2549 const AtomicString& liveRegionStatus = ariaLiveRegionStatus();2550 return excludeIfOff ? liveRegionStatusIsEnabled(liveRegionStatus ) : !liveRegionStatus.isEmpty();2547 bool AccessibilityObject::supportsLiveRegion(bool excludeIfOff) const 2548 { 2549 const AtomicString& liveRegionStatusValue = liveRegionStatus(); 2550 return excludeIfOff ? liveRegionStatusIsEnabled(liveRegionStatusValue) : !liveRegionStatusValue.isEmpty(); 2551 2551 } 2552 2552 … … 2599 2599 return AccessibilitySortDirection::Invalid; 2600 2600 2601 const AtomicString& sortAttribute = getAttribute(aria_sortAttr);2601 const AtomicString& sortAttribute = stringValueForProperty(AXPropertyName::Sort); 2602 2602 if (equalLettersIgnoringASCIICase(sortAttribute, "ascending")) 2603 2603 return AccessibilitySortDirection::Ascending; … … 2620 2620 } 2621 2621 2622 bool AccessibilityObject::supports ARIAHasPopup() const2623 { 2624 return has Attribute(aria_haspopupAttr) || isComboBox();2625 } 2626 2627 String AccessibilityObject:: ariaPopupValue() const2628 { 2629 const AtomicString& hasPopup = getAttribute(aria_haspopupAttr);2622 bool AccessibilityObject::supportsHasPopup() const 2623 { 2624 return hasProperty(AXPropertyName::HasPopUp) || isComboBox(); 2625 } 2626 2627 String AccessibilityObject::hasPopupValue() const 2628 { 2629 const AtomicString& hasPopup = stringValueForProperty(AXPropertyName::HasPopUp); 2630 2630 if (equalLettersIgnoringASCIICase(hasPopup, "true") 2631 2631 || equalLettersIgnoringASCIICase(hasPopup, "dialog") … … 2684 2684 } 2685 2685 2686 bool AccessibilityObject::supports ARIAPressed() const2687 { 2688 const AtomicString& expanded = getAttribute(aria_pressedAttr);2686 bool AccessibilityObject::supportsPressed() const 2687 { 2688 const AtomicString& expanded = stringValueForProperty(AXPropertyName::Pressed); 2689 2689 return equalLettersIgnoringASCIICase(expanded, "true") || equalLettersIgnoringASCIICase(expanded, "false"); 2690 2690 } … … 2746 2746 2747 2747 if (isToggleButton()) { 2748 const AtomicString& ariaPressed = getAttribute(aria_pressedAttr);2748 const AtomicString& ariaPressed = stringValueForProperty(AXPropertyName::Pressed); 2749 2749 if (equalLettersIgnoringASCIICase(ariaPressed, "true")) 2750 2750 return AccessibilityButtonState::On; … … 2754 2754 } 2755 2755 2756 const AtomicString& result = getAttribute(aria_checkedAttr);2756 const AtomicString& result = stringValueForProperty(AXPropertyName::Checked); 2757 2757 if (equalLettersIgnoringASCIICase(result, "true")) 2758 2758 return AccessibilityButtonState::On; … … 3128 3128 } 3129 3129 3130 bool AccessibilityObject:: ariaPressedIsPresent() const3131 { 3132 return ! getAttribute(aria_pressedAttr).isEmpty();3130 bool AccessibilityObject::pressedIsPresent() const 3131 { 3132 return !stringValueForProperty(AXPropertyName::Pressed).isEmpty(); 3133 3133 } 3134 3134 … … 3150 3150 // If aria-pressed is present, then it should be exposed as a toggle button. 3151 3151 // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed 3152 if ( ariaPressedIsPresent())3152 if (pressedIsPresent()) 3153 3153 return AccessibilityRole::ToggleButton; 3154 if ( ariaHasPopup())3154 if (hasPopup()) 3155 3155 return AccessibilityRole::PopUpButton; 3156 3156 // We don't contemplate AccessibilityRole::RadioButton, as it depends on the input -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r224871 r224953 477 477 enum class AccessibilityMathMultiscriptObjectType { PreSubscript, PreSuperscript, PostSubscript, PostSuperscript }; 478 478 479 enum class Accessibility ARIACurrentState { False, True, Page, Step, Location, Date, Time };479 enum class AccessibilityCurrentState { False, True, Page, Step, Location, Date, Time }; 480 480 481 481 bool nodeHasPresentationRole(Node*); … … 684 684 void ariaOwnsReferencingElements(AccessibilityChildrenVector&) const; 685 685 686 virtual bool ariaHasPopup() const { return false; }687 String ariaPopupValue() const;688 bool supports ARIAHasPopup() const;689 bool ariaPressedIsPresent() const;686 virtual bool hasPopup() const { return false; } 687 String hasPopupValue() const; 688 bool supportsHasPopup() const; 689 bool pressedIsPresent() const; 690 690 bool ariaIsMultiline() const; 691 691 String invalidStatus() const; 692 bool supports ARIAPressed() const;692 bool supportsPressed() const; 693 693 bool supportsExpanded() const; 694 694 bool supportsChecked() const; … … 699 699 void classList(Vector<String>&) const; 700 700 virtual String roleDescription() const; 701 Accessibility ARIACurrentState ariaCurrentState() const;702 String ariaCurrentValue() const;703 bool supports ARIACurrent() const;704 const AtomicString& ariaKeyShortcutsValue() const;701 AccessibilityCurrentState currentState() const; 702 String currentValue() const; 703 bool supportsCurrent() const; 704 const String keyShortcutsValue() const; 705 705 706 706 // This function checks if the object should be ignored when there's a modal dialog displayed. … … 783 783 virtual String ariaLabeledByAttribute() const { return String(); } 784 784 virtual String ariaDescribedByAttribute() const { return String(); } 785 const AtomicString&placeholderValue() const;785 const String placeholderValue() const; 786 786 bool accessibleNameDerivesFromContent() const; 787 787 … … 979 979 980 980 // ARIA live-region features. 981 bool supports ARIALiveRegion(bool excludeIfOff = true) const;982 bool isInside ARIALiveRegion(bool excludeIfOff = true) const;983 AccessibilityObject* ariaLiveRegionAncestor(bool excludeIfOff = true) const;984 virtual const String ariaLiveRegionStatus() const { return String(); }985 virtual const AtomicString& ariaLiveRegionRelevant() const { return nullAtom(); }986 virtual bool ariaLiveRegionAtomic() const { return false; }981 bool supportsLiveRegion(bool excludeIfOff = true) const; 982 bool isInsideLiveRegion(bool excludeIfOff = true) const; 983 AccessibilityObject* liveRegionAncestor(bool excludeIfOff = true) const; 984 virtual const String liveRegionStatus() const { return String(); } 985 virtual const String liveRegionRelevant() const { return nullAtom(); } 986 virtual bool liveRegionAtomic() const { return false; } 987 987 virtual bool isBusy() const { return false; } 988 988 static const String defaultLiveRegionStatusForRole(AccessibilityRole); … … 994 994 virtual String ariaReadOnlyValue() const; 995 995 996 bool supportsA RIAAutoComplete() const;997 String a riaAutoCompleteValue() const;996 bool supportsAutoComplete() const; 997 String autoCompleteValue() const; 998 998 999 999 bool supportsARIAAttributes() const; -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r224871 r224953 1007 1007 } 1008 1008 1009 bool AccessibilityRenderObject:: ariaHasPopup() const1010 { 1011 return !equalLettersIgnoringASCIICase( ariaPopupValue(), "false");1009 bool AccessibilityRenderObject::hasPopup() const 1010 { 1011 return !equalLettersIgnoringASCIICase(hasPopupValue(), "false"); 1012 1012 } 1013 1013 … … 2642 2642 if (cssBox && cssBox->isImage()) { 2643 2643 if (is<HTMLInputElement>(node)) 2644 return ariaHasPopup() ? AccessibilityRole::PopUpButton : AccessibilityRole::Button;2644 return hasPopup() ? AccessibilityRole::PopUpButton : AccessibilityRole::Button; 2645 2645 if (isSVGImage()) 2646 2646 return AccessibilityRole::SVGRoot; … … 2842 2842 AccessibilityOrientation AccessibilityRenderObject::orientation() const 2843 2843 { 2844 const AtomicString& ariaOrientation = getAttribute(aria_orientationAttr);2844 const AtomicString& ariaOrientation = stringValueForProperty(AXPropertyName::Orientation); 2845 2845 if (equalLettersIgnoringASCIICase(ariaOrientation, "horizontal")) 2846 2846 return AccessibilityOrientation::Horizontal; … … 2965 2965 continue; 2966 2966 2967 if (parent->supports ARIALiveRegion())2967 if (parent->supportsLiveRegion()) 2968 2968 cache->postLiveRegionChangeNotification(parent); 2969 2969 … … 3254 3254 } 3255 3255 3256 const String AccessibilityRenderObject:: ariaLiveRegionStatus() const3257 { 3258 const AtomicString& liveRegionStatus = getAttribute(aria_liveAttr);3256 const String AccessibilityRenderObject::liveRegionStatus() const 3257 { 3258 const AtomicString& liveRegionStatus = stringValueForProperty(AXPropertyName::Live); 3259 3259 // These roles have implicit live region status. 3260 3260 if (liveRegionStatus.isEmpty()) … … 3264 3264 } 3265 3265 3266 const AtomicString& AccessibilityRenderObject::ariaLiveRegionRelevant() const 3267 { 3268 static NeverDestroyed<const AtomicString> defaultLiveRegionRelevant("additions text", AtomicString::ConstructFromLiteral); 3269 const AtomicString& relevant = getAttribute(aria_relevantAttr); 3266 const String AccessibilityRenderObject::liveRegionRelevant() const 3267 { 3268 const AtomicString& relevant = stringValueForProperty(AXPropertyName::Relevant); 3270 3269 3271 3270 // Default aria-relevant = "additions text". 3272 3271 if (relevant.isEmpty()) 3273 return defaultLiveRegionRelevant;3272 return "additions text"; 3274 3273 3275 3274 return relevant; 3276 3275 } 3277 3276 3278 bool AccessibilityRenderObject:: ariaLiveRegionAtomic() const3277 bool AccessibilityRenderObject::liveRegionAtomic() const 3279 3278 { 3280 3279 const AtomicString& atomic = getAttribute(aria_atomicAttr); -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h
r224650 r224953 172 172 void setSelectedVisiblePositionRange(const VisiblePositionRange&) const override; 173 173 bool isVisiblePositionRangeInDifferentDocument(const VisiblePositionRange&) const; 174 bool ariaHasPopup() const override;174 bool hasPopup() const override; 175 175 176 176 bool supportsARIADropping() const override; … … 277 277 ESpeak speakProperty() const override; 278 278 279 const String ariaLiveRegionStatus() const override;280 const AtomicString& ariaLiveRegionRelevant() const override;281 bool ariaLiveRegionAtomic() const override;279 const String liveRegionStatus() const override; 280 const String liveRegionRelevant() const override; 281 bool liveRegionAtomic() const override; 282 282 bool isBusy() const override; 283 283 -
trunk/Source/WebCore/accessibility/AccessibleNode.cpp
r224871 r224953 46 46 QualifiedName ariaAttribute; 47 47 } attributes[] = { 48 { AXPropertyName::Autocomplete, aria_autocompleteAttr }, 49 { AXPropertyName::Checked, aria_checkedAttr }, 50 { AXPropertyName::Current, aria_currentAttr }, 51 { AXPropertyName::HasPopUp, aria_haspopupAttr }, 52 { AXPropertyName::Invalid, aria_invalidAttr }, 53 { AXPropertyName::KeyShortcuts, aria_keyshortcutsAttr }, 48 54 { AXPropertyName::Label, aria_labelAttr }, 49 { AXPropertyName::Role, roleAttr } 55 { AXPropertyName::Live, aria_liveAttr }, 56 { AXPropertyName::Orientation, aria_orientationAttr }, 57 { AXPropertyName::Placeholder, aria_placeholderAttr }, 58 { AXPropertyName::Pressed, aria_pressedAttr }, 59 { AXPropertyName::Relevant, aria_relevantAttr }, 60 { AXPropertyName::Role, roleAttr }, 61 { AXPropertyName::RoleDescription, aria_roledescriptionAttr }, 62 { AXPropertyName::Sort, aria_sortAttr }, 63 { AXPropertyName::ValueText, aria_valuetextAttr } 50 64 }; 51 65 ARIAAttributeMap map; … … 60 74 { 61 75 switch (propertyName) { 76 case AXPropertyName::Autocomplete: 77 case AXPropertyName::Checked: 78 case AXPropertyName::Current: 79 case AXPropertyName::HasPopUp: 80 case AXPropertyName::Invalid: 62 81 case AXPropertyName::Label: 82 case AXPropertyName::Live: 83 case AXPropertyName::Orientation: 84 case AXPropertyName::Placeholder: 85 case AXPropertyName::Pressed: 86 case AXPropertyName::Relevant: 63 87 case AXPropertyName::Role: 88 case AXPropertyName::RoleDescription: 89 case AXPropertyName::Sort: 90 case AXPropertyName::ValueText: 64 91 return true; 65 92 default: … … 120 147 } 121 148 149 void AccessibleNode::notifyAttributeChanged(const WebCore::QualifiedName& name) 150 { 151 if (AXObjectCache* cache = m_ownerElement.document().axObjectCache()) 152 cache->handleAttributeChanged(name, &m_ownerElement); 153 } 154 155 String AccessibleNode::autocomplete() const 156 { 157 return stringValueForProperty(m_ownerElement, AXPropertyName::Autocomplete); 158 } 159 160 void AccessibleNode::setAutocomplete(const String& autocomplete) 161 { 162 setStringProperty(autocomplete, AXPropertyName::Autocomplete); 163 notifyAttributeChanged(aria_autocompleteAttr); 164 } 165 166 String AccessibleNode::checked() const 167 { 168 return stringValueForProperty(m_ownerElement, AXPropertyName::Checked); 169 } 170 171 void AccessibleNode::setChecked(const String& checked) 172 { 173 setStringProperty(checked, AXPropertyName::Checked); 174 notifyAttributeChanged(aria_checkedAttr); 175 } 176 177 String AccessibleNode::current() const 178 { 179 return stringValueForProperty(m_ownerElement, AXPropertyName::Current); 180 } 181 182 void AccessibleNode::setCurrent(const String& current) 183 { 184 setStringProperty(current, AXPropertyName::Current); 185 notifyAttributeChanged(aria_currentAttr); 186 } 187 188 String AccessibleNode::hasPopUp() const 189 { 190 return stringValueForProperty(m_ownerElement, AXPropertyName::HasPopUp); 191 } 192 193 void AccessibleNode::setHasPopUp(const String& hasPopUp) 194 { 195 setStringProperty(hasPopUp, AXPropertyName::HasPopUp); 196 notifyAttributeChanged(aria_haspopupAttr); 197 } 198 199 String AccessibleNode::invalid() const 200 { 201 return stringValueForProperty(m_ownerElement, AXPropertyName::Invalid); 202 } 203 204 void AccessibleNode::setInvalid(const String& invalid) 205 { 206 setStringProperty(invalid, AXPropertyName::Invalid); 207 notifyAttributeChanged(aria_invalidAttr); 208 } 209 210 String AccessibleNode::keyShortcuts() const 211 { 212 return stringValueForProperty(m_ownerElement, AXPropertyName::KeyShortcuts); 213 } 214 215 void AccessibleNode::setKeyShortcuts(const String& keyShortcuts) 216 { 217 setStringProperty(keyShortcuts, AXPropertyName::KeyShortcuts); 218 notifyAttributeChanged(aria_keyshortcutsAttr); 219 } 220 221 String AccessibleNode::live() const 222 { 223 return stringValueForProperty(m_ownerElement, AXPropertyName::Live); 224 } 225 226 void AccessibleNode::setLive(const String& live) 227 { 228 setStringProperty(live, AXPropertyName::Live); 229 notifyAttributeChanged(aria_liveAttr); 230 } 231 232 String AccessibleNode::label() const 233 { 234 return stringValueForProperty(m_ownerElement, AXPropertyName::Label); 235 } 236 237 void AccessibleNode::setLabel(const String& label) 238 { 239 setStringProperty(label, AXPropertyName::Label); 240 notifyAttributeChanged(aria_labelAttr); 241 } 242 243 String AccessibleNode::orientation() const 244 { 245 return stringValueForProperty(m_ownerElement, AXPropertyName::Orientation); 246 } 247 248 void AccessibleNode::setOrientation(const String& orientation) 249 { 250 setStringProperty(orientation, AXPropertyName::Orientation); 251 notifyAttributeChanged(aria_orientationAttr); 252 } 253 254 String AccessibleNode::placeholder() const 255 { 256 return stringValueForProperty(m_ownerElement, AXPropertyName::Placeholder); 257 } 258 259 void AccessibleNode::setPlaceholder(const String& placeholder) 260 { 261 setStringProperty(placeholder, AXPropertyName::Placeholder); 262 notifyAttributeChanged(aria_placeholderAttr); 263 } 264 265 String AccessibleNode::pressed() const 266 { 267 return stringValueForProperty(m_ownerElement, AXPropertyName::Pressed); 268 } 269 270 void AccessibleNode::setPressed(const String& pressed) 271 { 272 setStringProperty(pressed, AXPropertyName::Pressed); 273 notifyAttributeChanged(aria_pressedAttr); 274 } 275 276 String AccessibleNode::relevant() const 277 { 278 return stringValueForProperty(m_ownerElement, AXPropertyName::Relevant); 279 } 280 281 void AccessibleNode::setRelevant(const String& relevant) 282 { 283 setStringProperty(relevant, AXPropertyName::Relevant); 284 notifyAttributeChanged(aria_relevantAttr); 285 } 286 122 287 String AccessibleNode::role() const 123 288 { … … 128 293 { 129 294 setStringProperty(role, AXPropertyName::Role); 130 if (AXObjectCache* cache = m_ownerElement.document().axObjectCache()) 131 cache->handleAttributeChanged(roleAttr, &m_ownerElement); 132 } 133 134 String AccessibleNode::label() const 135 { 136 return stringValueForProperty(m_ownerElement, AXPropertyName::Label); 137 } 138 139 void AccessibleNode::setLabel(const String& label) 140 { 141 setStringProperty(label, AXPropertyName::Label); 142 if (AXObjectCache* cache = m_ownerElement.document().axObjectCache()) 143 cache->handleAttributeChanged(aria_labelAttr, &m_ownerElement); 295 notifyAttributeChanged(roleAttr); 296 } 297 298 String AccessibleNode::roleDescription() const 299 { 300 return stringValueForProperty(m_ownerElement, AXPropertyName::RoleDescription); 301 } 302 303 void AccessibleNode::setRoleDescription(const String& roleDescription) 304 { 305 setStringProperty(roleDescription, AXPropertyName::RoleDescription); 306 notifyAttributeChanged(aria_roledescriptionAttr); 307 } 308 309 String AccessibleNode::sort() const 310 { 311 return stringValueForProperty(m_ownerElement, AXPropertyName::Sort); 312 } 313 314 void AccessibleNode::setSort(const String& sort) 315 { 316 setStringProperty(sort, AXPropertyName::Sort); 317 notifyAttributeChanged(aria_sortAttr); 318 } 319 320 String AccessibleNode::valueText() const 321 { 322 return stringValueForProperty(m_ownerElement, AXPropertyName::ValueText); 323 } 324 325 void AccessibleNode::setValueText(const String& valueText) 326 { 327 setStringProperty(valueText, AXPropertyName::ValueText); 328 notifyAttributeChanged(aria_valuetextAttr); 144 329 } 145 330 -
trunk/Source/WebCore/accessibility/AccessibleNode.h
r224871 r224953 41 41 enum class AXPropertyName { 42 42 None, 43 Autocomplete, 44 Checked, 45 Current, 46 HasPopUp, 47 Invalid, 48 KeyShortcuts, 49 Label, 50 Live, 51 Orientation, 52 Placeholder, 53 Pressed, 54 Relevant, 43 55 Role, 44 Label 56 RoleDescription, 57 Sort, 58 ValueText 45 59 }; 46 60 … … 50 64 static void constructDeletedValue(AXPropertyName& slot) 51 65 { 52 slot = AXPropertyName::None;66 slot = static_cast<AXPropertyName>(static_cast<int>(AXPropertyName::None) - 1); 53 67 } 54 68 static bool isDeletedValue(AXPropertyName value) 55 69 { 56 return value == AXPropertyName::None;70 return static_cast<int>(value) == static_cast<int>(AXPropertyName::None) - 1; 57 71 } 58 72 }; … … 72 86 static bool hasProperty(Element&, AXPropertyName); 73 87 88 String autocomplete() const; 89 void setAutocomplete(const String&); 90 91 String checked() const; 92 void setChecked(const String&); 93 94 String current() const; 95 void setCurrent(const String&); 96 97 String hasPopUp() const; 98 void setHasPopUp(const String&); 99 100 String invalid() const; 101 void setInvalid(const String&); 102 103 String keyShortcuts() const; 104 void setKeyShortcuts(const String&); 105 106 String live() const; 107 void setLive(const String&); 108 109 String label() const; 110 void setLabel(const String&); 111 112 String orientation() const; 113 void setOrientation(const String&); 114 115 String placeholder() const; 116 void setPlaceholder(const String&); 117 118 String pressed() const; 119 void setPressed(const String&); 120 121 String relevant() const; 122 void setRelevant(const String&); 123 74 124 String role() const; 75 125 void setRole(const String&); 76 126 77 String label() const; 78 void setLabel(const String&); 127 String roleDescription() const; 128 void setRoleDescription(const String&); 129 130 String sort() const; 131 void setSort(const String&); 132 133 String valueText() const; 134 void setValueText(const String&); 79 135 80 136 private: … … 82 138 static const String stringValueForProperty(Element&, AXPropertyName); 83 139 void setStringProperty(const String&, AXPropertyName); 140 141 void notifyAttributeChanged(const WebCore::QualifiedName&); 84 142 85 143 Element& m_ownerElement; -
trunk/Source/WebCore/accessibility/AccessibleNode.idl
r224871 r224953 28 28 EnabledAtRuntime=AccessibilityObjectModel, 29 29 ] interface AccessibleNode { 30 attribute DOMString? autocomplete; 31 attribute DOMString? checked; 32 attribute DOMString? current; 33 attribute DOMString? hasPopUp; 34 attribute DOMString? invalid; 35 attribute DOMString? keyShortcuts; 36 attribute DOMString? label; 37 attribute DOMString? live; 38 attribute DOMString? orientation; 39 attribute DOMString? placeholder; 40 attribute DOMString? pressed; 41 attribute DOMString? relevant; 30 42 attribute DOMString? role; 31 attribute DOMString? label; 43 attribute DOMString? roleDescription; 44 attribute DOMString? sort; 45 attribute DOMString? valueText; 32 46 }; -
trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
r224074 r224953 245 245 246 246 case AXCurrentChanged: 247 atk_object_notify_state_change(axObject, ATK_STATE_ACTIVE, coreObject-> ariaCurrentState() != AccessibilityARIACurrentState::False);247 atk_object_notify_state_change(axObject, ATK_STATE_ACTIVE, coreObject->currentState() != AccessibilityCurrentState::False); 248 248 break; 249 249 -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r224074 r224953 500 500 attributeSet = addToAtkAttributeSet(attributeSet, "placeholder-text", placeholder.utf8().data()); 501 501 502 if (coreObject->supportsA RIAAutoComplete())503 attributeSet = addToAtkAttributeSet(attributeSet, "autocomplete", coreObject->a riaAutoCompleteValue().utf8().data());504 505 if (coreObject->supports ARIAHasPopup())506 attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject-> ariaPopupValue().utf8().data());507 508 if (coreObject->supports ARIACurrent())509 attributeSet = addToAtkAttributeSet(attributeSet, "current", coreObject-> ariaCurrentValue().utf8().data());502 if (coreObject->supportsAutoComplete()) 503 attributeSet = addToAtkAttributeSet(attributeSet, "autocomplete", coreObject->autoCompleteValue().utf8().data()); 504 505 if (coreObject->supportsHasPopup()) 506 attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->hasPopupValue().utf8().data()); 507 508 if (coreObject->supportsCurrent()) 509 attributeSet = addToAtkAttributeSet(attributeSet, "current", coreObject->currentValue().utf8().data()); 510 510 511 511 // The Core AAM states that an explicitly-set value should be exposed, including "none". … … 566 566 567 567 // We need to expose the live region attributes even if the live region is currently disabled/off. 568 if (auto liveContainer = coreObject-> ariaLiveRegionAncestor(false)) {569 String liveStatus = liveContainer-> ariaLiveRegionStatus();570 String relevant = liveContainer-> ariaLiveRegionRelevant();571 bool isAtomic = liveContainer-> ariaLiveRegionAtomic();568 if (auto liveContainer = coreObject->liveRegionAncestor(false)) { 569 String liveStatus = liveContainer->liveRegionStatus(); 570 String relevant = liveContainer->liveRegionRelevant(); 571 bool isAtomic = liveContainer->liveRegionAtomic(); 572 572 String liveRole = roleString.isEmpty() ? computedRoleString : roleString; 573 573 … … 588 588 if (isAtomic) 589 589 attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true"); 590 } else if (!isAtomic && coreObject-> ariaLiveRegionAtomic())590 } else if (!isAtomic && coreObject->liveRegionAtomic()) 591 591 attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true"); 592 592 } … … 603 603 604 604 // The Core AAM states the author-provided value should be exposed as-is. 605 const AtomicString& keyShortcuts = coreObject-> ariaKeyShortcutsValue();605 const AtomicString& keyShortcuts = coreObject->keyShortcutsValue(); 606 606 if (!keyShortcuts.isEmpty()) 607 607 attributeSet = addToAtkAttributeSet(attributeSet, "keyshortcuts", keyShortcuts.string().utf8().data()); … … 688 688 return ATK_ROLE_WINDOW; 689 689 case AccessibilityRole::PopUpButton: 690 return coreObject-> ariaHasPopup() ? ATK_ROLE_PUSH_BUTTON : ATK_ROLE_COMBO_BOX;690 return coreObject->hasPopup() ? ATK_ROLE_PUSH_BUTTON : ATK_ROLE_COMBO_BOX; 691 691 case AccessibilityRole::ComboBox: 692 692 return ATK_ROLE_COMBO_BOX; … … 931 931 // Please keep the state list in alphabetical order 932 932 if ((isListBoxOption && coreObject->isSelectedOptionActive()) 933 || coreObject-> ariaCurrentState() != AccessibilityARIACurrentState::False)933 || coreObject->currentState() != AccessibilityCurrentState::False) 934 934 atk_state_set_add_state(stateSet, ATK_STATE_ACTIVE); 935 935 … … 978 978 atk_state_set_add_state(stateSet, ATK_STATE_VERTICAL); 979 979 980 if (coreObject-> ariaHasPopup())980 if (coreObject->hasPopup()) 981 981 atk_state_set_add_state(stateSet, ATK_STATE_HAS_POPUP); 982 982 … … 1047 1047 // TODO: ATK_STATE_SENSITIVE 1048 1048 1049 if (coreObject->supportsA RIAAutoComplete() && coreObject->ariaAutoCompleteValue() != "none")1049 if (coreObject->supportsAutoComplete() && coreObject->autoCompleteValue() != "none") 1050 1050 atk_state_set_add_state(stateSet, ATK_STATE_SUPPORTS_AUTOCOMPLETION); 1051 1051 -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r224074 r224953 498 498 return NO; 499 499 500 return m_object-> ariaHasPopup();500 return m_object->hasPopup(); 501 501 } 502 502 … … 2881 2881 return nil; 2882 2882 2883 return m_object-> ariaLiveRegionStatus();2883 return m_object->liveRegionStatus(); 2884 2884 } 2885 2885 … … 2889 2889 return nil; 2890 2890 2891 return m_object-> ariaLiveRegionRelevant();2891 return m_object->liveRegionRelevant(); 2892 2892 } 2893 2893 … … 2897 2897 return NO; 2898 2898 2899 return m_object-> ariaLiveRegionAtomic();2899 return m_object->liveRegionAtomic(); 2900 2900 } 2901 2901 … … 2905 2905 return NO; 2906 2906 2907 return m_object->supports ARIAPressed();2907 return m_object->supportsPressed(); 2908 2908 } 2909 2909 … … 2969 2969 return nil; 2970 2970 2971 switch (m_object-> ariaCurrentState()) {2972 case Accessibility ARIACurrentState::False:2971 switch (m_object->currentState()) { 2972 case AccessibilityCurrentState::False: 2973 2973 return @"false"; 2974 case Accessibility ARIACurrentState::Page:2974 case AccessibilityCurrentState::Page: 2975 2975 return @"page"; 2976 case Accessibility ARIACurrentState::Step:2976 case AccessibilityCurrentState::Step: 2977 2977 return @"step"; 2978 case Accessibility ARIACurrentState::Location:2978 case AccessibilityCurrentState::Location: 2979 2979 return @"location"; 2980 case Accessibility ARIACurrentState::Time:2980 case AccessibilityCurrentState::Time: 2981 2981 return @"time"; 2982 case Accessibility ARIACurrentState::Date:2982 case AccessibilityCurrentState::Date: 2983 2983 return @"date"; 2984 case Accessibility ARIACurrentState::True:2984 case AccessibilityCurrentState::True: 2985 2985 return @"true"; 2986 2986 } -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r224074 r224953 1188 1188 [additional addObject:NSAccessibilitySelectedRowsAttribute]; 1189 1189 1190 if (m_object->supports ARIALiveRegion()) {1190 if (m_object->supportsLiveRegion()) { 1191 1191 [additional addObject:NSAccessibilityARIALiveAttribute]; 1192 1192 [additional addObject:NSAccessibilityARIARelevantAttribute]; … … 1203 1203 1204 1204 // If an object is a child of a live region, then add these 1205 if (m_object->isInside ARIALiveRegion())1205 if (m_object->isInsideLiveRegion()) 1206 1206 [additional addObject:NSAccessibilityARIAAtomicAttribute]; 1207 1207 // All objects should expose the ARIA busy attribute (ARIA 1.1 with ISSUE-538). … … 1220 1220 } 1221 1221 1222 if (m_object-> ariaHasPopup())1222 if (m_object->hasPopup()) 1223 1223 [additional addObject:NSAccessibilityHasPopupAttribute]; 1224 1224 … … 1662 1662 1663 1663 // Only expose AXARIACurrent attribute when the element is set to be current item. 1664 if (m_object-> ariaCurrentState() != AccessibilityARIACurrentState::False)1664 if (m_object->currentState() != AccessibilityCurrentState::False) 1665 1665 objectAttributes = [objectAttributes arrayByAddingObjectsFromArray:@[ NSAccessibilityARIACurrentAttribute ]]; 1666 1666 … … 2980 2980 2981 2981 if ([attributeName isEqualToString: NSAccessibilityARIACurrentAttribute]) 2982 return m_object-> ariaCurrentValue();2982 return m_object->currentValue(); 2983 2983 2984 2984 if ([attributeName isEqualToString: NSAccessibilityServesAsTitleForUIElementsAttribute] && m_object->isMenuButton()) { … … 3092 3092 3093 3093 if ([attributeName isEqualToString:NSAccessibilityHasPopupAttribute]) 3094 return [NSNumber numberWithBool:m_object-> ariaHasPopup()];3094 return [NSNumber numberWithBool:m_object->hasPopup()]; 3095 3095 3096 3096 if ([attributeName isEqualToString:NSAccessibilityDatetimeValueAttribute]) … … 3102 3102 // ARIA Live region attributes. 3103 3103 if ([attributeName isEqualToString:NSAccessibilityARIALiveAttribute]) 3104 return m_object-> ariaLiveRegionStatus();3104 return m_object->liveRegionStatus(); 3105 3105 if ([attributeName isEqualToString:NSAccessibilityARIARelevantAttribute]) 3106 return m_object-> ariaLiveRegionRelevant();3106 return m_object->liveRegionRelevant(); 3107 3107 if ([attributeName isEqualToString:NSAccessibilityARIAAtomicAttribute]) 3108 return [NSNumber numberWithBool:m_object-> ariaLiveRegionAtomic()];3108 return [NSNumber numberWithBool:m_object->liveRegionAtomic()]; 3109 3109 if ([attributeName isEqualToString:NSAccessibilityElementBusyAttribute]) 3110 3110 return [NSNumber numberWithBool:m_object->isBusy()]; … … 3184 3184 if ([attributeName isEqualToString:@"AXDRTElementIdAttribute"]) 3185 3185 return m_object->getAttribute(idAttr); 3186 3187 if ([attributeName isEqualToString:@"AXAutocompleteValue"]) 3188 return m_object->autoCompleteValue(); 3189 3190 if ([attributeName isEqualToString:@"AXHasPopUpValue"]) 3191 return m_object->hasPopupValue(); 3192 3193 if ([attributeName isEqualToString:@"AXKeyShortcutsValue"]) 3194 return m_object->keyShortcutsValue(); 3195 3196 if ([attributeName isEqualToString:@"AXARIAPressedIsPresent"]) 3197 return [NSNumber numberWithBool:m_object->pressedIsPresent()]; 3186 3198 3187 3199 if (m_object->isWebArea() && [attributeName isEqualToString:NSAccessibilityPreventKeyboardDOMEventDispatchAttribute]) -
trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
r224879 r224953 1762 1762 } 1763 1763 1764 switch (axObject-> ariaCurrentState()) {1765 case Accessibility ARIACurrentState::False:1764 switch (axObject->currentState()) { 1765 case AccessibilityCurrentState::False: 1766 1766 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::False; 1767 1767 break; 1768 case Accessibility ARIACurrentState::Page:1768 case AccessibilityCurrentState::Page: 1769 1769 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Page; 1770 1770 break; 1771 case Accessibility ARIACurrentState::Step:1771 case AccessibilityCurrentState::Step: 1772 1772 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Step; 1773 1773 break; 1774 case Accessibility ARIACurrentState::Location:1774 case AccessibilityCurrentState::Location: 1775 1775 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Location; 1776 1776 break; 1777 case Accessibility ARIACurrentState::Date:1777 case AccessibilityCurrentState::Date: 1778 1778 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Date; 1779 1779 break; 1780 case Accessibility ARIACurrentState::Time:1780 case AccessibilityCurrentState::Time: 1781 1781 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::Time; 1782 1782 break; 1783 case Accessibility ARIACurrentState::True:1783 case AccessibilityCurrentState::True: 1784 1784 currentState = Inspector::Protocol::DOM::AccessibilityProperties::Current::True; 1785 1785 break; … … 1825 1825 label = axObject->computedLabel(); 1826 1826 1827 if (axObject->supports ARIALiveRegion()) {1827 if (axObject->supportsLiveRegion()) { 1828 1828 supportsLiveRegion = true; 1829 liveRegionAtomic = axObject-> ariaLiveRegionAtomic();1830 1831 String ariaRelevantAttrValue = axObject-> ariaLiveRegionRelevant();1829 liveRegionAtomic = axObject->liveRegionAtomic(); 1830 1831 String ariaRelevantAttrValue = axObject->liveRegionRelevant(); 1832 1832 if (!ariaRelevantAttrValue.isEmpty()) { 1833 1833 // FIXME: Pass enum values rather than strings once unblocked. http://webkit.org/b/133711 … … 1853 1853 } 1854 1854 1855 String ariaLive = axObject-> ariaLiveRegionStatus();1855 String ariaLive = axObject->liveRegionStatus(); 1856 1856 if (ariaLive == "assertive") 1857 1857 liveRegionStatus = Inspector::Protocol::DOM::AccessibilityProperties::LiveRegionStatus::Assertive; … … 1876 1876 parentNode = parentObject->node(); 1877 1877 1878 supportsPressed = axObject-> ariaPressedIsPresent();1878 supportsPressed = axObject->pressedIsPresent(); 1879 1879 if (supportsPressed) 1880 1880 pressed = axObject->isPressed(); … … 1904 1904 1905 1905 level = hierarchicalLevel ? hierarchicalLevel : headingLevel; 1906 isPopupButton = axObject->isPopUpButton() || axObject-> ariaHasPopup();1906 isPopupButton = axObject->isPopUpButton() || axObject->hasPopup(); 1907 1907 } 1908 1908 }
Note: See TracChangeset
for help on using the changeset viewer.