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

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

Issue 832763002: Expose attributes max, min, value for meter html tag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXNodeObject.cpp
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp
index f60bf63eb7f89e91d50400f4fcd0b0aaa64cd718..f4f3b8b0c6f6a459c22dd49a70d6b158420d8d49 100644
--- a/Source/modules/accessibility/AXNodeObject.cpp
+++ b/Source/modules/accessibility/AXNodeObject.cpp
@@ -39,6 +39,7 @@
#include "core/html/HTMLLabelElement.h"
#include "core/html/HTMLLegendElement.h"
#include "core/html/HTMLMediaElement.h"
+#include "core/html/HTMLMeterElement.h"
#include "core/html/HTMLPlugInElement.h"
#include "core/html/HTMLSelectElement.h"
#include "core/html/HTMLTextAreaElement.h"
@@ -596,6 +597,11 @@ bool AXNodeObject::isMenuButton() const
return roleValue() == MenuButtonRole;
}
+bool AXNodeObject::isMeter() const
+{
+ return roleValue() == MeterRole;
+}
+
bool AXNodeObject::isMultiSelectable() const
{
const AtomicString& ariaMultiSelectable = getAttribute(aria_multiselectableAttr);
@@ -1110,6 +1116,9 @@ float AXNodeObject::valueForRange() const
return input.valueAsNumber();
}
+ if (isHTMLMeterElement(node()))
+ return toHTMLMeterElement(*node()).value();
+
return 0.0;
}
@@ -1124,6 +1133,9 @@ float AXNodeObject::maxValueForRange() const
return input.maximum();
}
+ if (isHTMLMeterElement(node()))
+ return toHTMLMeterElement(*node()).max();
+
return 0.0;
}
@@ -1138,6 +1150,9 @@ float AXNodeObject::minValueForRange() const
return input.minimum();
}
+ if (isHTMLMeterElement(node()))
+ return toHTMLMeterElement(*node()).min();
+
return 0.0;
}
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698