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

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

Issue 775533002: Limit the heading level to 1 - 9. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 151bb67176eda090b410c3d42c3c3fd1d72b8158..f5efea956d315ad830ac975055f2114d9e0005cf 100644
--- a/Source/modules/accessibility/AXNodeObject.cpp
+++ b/Source/modules/accessibility/AXNodeObject.cpp
@@ -878,7 +878,8 @@ int AXNodeObject::headingLevel() const
if (!node)
return 0;
- if (roleValue() == HeadingRole && hasAttribute(aria_levelAttr))
+ if (roleValue() == HeadingRole && hasAttribute(aria_levelAttr)
+ && getAttribute(aria_levelAttr).toInt() <= 9)
dmazzoni 2014/12/04 08:26:31 This still allows 0 and negative numbers. I'd asse
return getAttribute(aria_levelAttr).toInt();
if (!node->isHTMLElement())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698