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

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

Issue 1511603002: Merge to m48: Stops using SYSTEM_STATE_INDETERMINATE as it makes radio buttons appear to have a mix… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years 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 dd38c52ffd845461352cb724f04884cb149bffc5..26ceb1af171ffe0f400f2942055f5f20fd9332f2 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -1031,15 +1031,6 @@ AccessibilityExpanded AXNodeObject::isExpanded() const
return ExpandedUndefined;
}
-bool AXNodeObject::isIndeterminate() const
-{
- Node* node = this->node();
- if (!isHTMLInputElement(node))
- return false;
-
- return toHTMLInputElement(node)->shouldAppearIndeterminate();
-}
-
bool AXNodeObject::isPressed() const
{
if (!isButton())
@@ -1338,6 +1329,9 @@ AXObject* AXNodeObject::deprecatedTitleUIElement() const
AccessibilityButtonState AXNodeObject::checkboxOrRadioValue() const
{
+ if (isNativeCheckboxInMixedState())
+ return ButtonStateMixed;
+
if (isNativeCheckboxOrRadio())
return isChecked() ? ButtonStateOn : ButtonStateOff;
@@ -1855,6 +1849,16 @@ String AXNodeObject::computedName() const
return String();
}
+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