| Index: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| index 7e3a068ce75315036f1db885e32053cd5c3767df..10d953f2c6c7d44f467b3e0425018a7d6dcae2d4 100644
|
| --- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| +++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| @@ -1218,24 +1218,18 @@ bool AXNodeObject::IsModal() const {
|
| return false;
|
| }
|
|
|
| -bool AXNodeObject::IsPressed() const {
|
| - if (!IsButton())
|
| - return false;
|
| -
|
| - Node* node = this->GetNode();
|
| - if (!node)
|
| - return false;
|
| -
|
| +AccessibilityButtonState AXNodeObject::PressedState() const {
|
| // ARIA button with aria-pressed not undefined, then check for aria-pressed
|
| // attribute rather than getNode()->active()
|
| - if (AriaRoleAttribute() == kToggleButtonRole) {
|
| - if (EqualIgnoringASCIICase(GetAttribute(aria_pressedAttr), "true") ||
|
| - EqualIgnoringASCIICase(GetAttribute(aria_pressedAttr), "mixed"))
|
| - return true;
|
| - return false;
|
| + if (this->GetNode() && RoleValue() == kToggleButtonRole) {
|
| + auto pressed = GetAttribute(aria_pressedAttr);
|
| + if (EqualIgnoringASCIICase(pressed, "true"))
|
| + return kButtonStateOn;
|
| + if (EqualIgnoringASCIICase(pressed, "mixed"))
|
| + return kButtonStateMixed;
|
| }
|
|
|
| - return node->IsActive();
|
| + return kButtonStateOff;
|
| }
|
|
|
| bool AXNodeObject::IsReadOnly() const {
|
|
|