Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 2694903010: AX checked state changes (Closed)
Patch Set: Test checkbox attribute in automation API, fix whitespace, remove change to third party code Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e78144777075ab7f939e9f2715413e7a0a349b5f..9a1030ba3d3028ee9fc14f2b65f6b4a2baba1a31 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -1090,34 +1090,6 @@ bool AXNodeObject::isNativeSlider() const {
return toHTMLInputElement(node)->type() == InputTypeNames::range;
}
-bool AXNodeObject::isChecked() const {
- Node* node = this->getNode();
- if (!node)
- return false;
-
- // First test for native checkedness semantics
- if (isHTMLInputElement(*node))
- return toHTMLInputElement(*node).shouldAppearChecked();
-
- // Else, if this is an ARIA role checkbox or radio or menuitemcheckbox
- // or menuitemradio or switch, respect the aria-checked attribute
- switch (ariaRoleAttribute()) {
- case CheckBoxRole:
- case MenuItemCheckBoxRole:
- case MenuItemRadioRole:
- case RadioButtonRole:
- case SwitchRole:
- if (equalIgnoringCase(getAttribute(aria_checkedAttr), "true"))
- return true;
- return false;
- default:
- break;
- }
-
- // Otherwise it's not checked
- return false;
-}
-
bool AXNodeObject::isClickable() const {
if (getNode()) {
if (getNode()->isElementNode() &&
@@ -1461,16 +1433,6 @@ String AXNodeObject::text() const {
return toElement(node)->innerText();
}
-AccessibilityButtonState AXNodeObject::checkboxOrRadioValue() const {
- if (isNativeCheckboxInMixedState())
- return ButtonStateMixed;
-
- if (isNativeCheckboxOrRadio())
- return isChecked() ? ButtonStateOn : ButtonStateOff;
-
- return AXObject::checkboxOrRadioValue();
-}
-
RGBA32 AXNodeObject::colorValue() const {
if (!isHTMLInputElement(getNode()) || !isColorWell())
return AXObject::colorValue();
@@ -1709,15 +1671,6 @@ static bool isInSameNonInlineBlockFlow(LayoutObject* r1, LayoutObject* r2) {
return b1 && b2 && b1 == b2;
}
-bool AXNodeObject::isNativeCheckboxInMixedState() const {
- if (!isHTMLInputElement(m_node))
- return false;
-
- HTMLInputElement* input = toHTMLInputElement(m_node);
- return input->type() == InputTypeNames::checkbox &&
- input->shouldAppearIndeterminate();
-}
-
//
// New AX name calculation.
//

Powered by Google App Engine
This is Rietveld 408576698