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

Unified Diff: chrome/browser/resources/chromeos/chromevox/common/dom_util.js

Issue 828373007: Fix math support on wikipedia. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use classList Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/common/dom_util.js
diff --git a/chrome/browser/resources/chromeos/chromevox/common/dom_util.js b/chrome/browser/resources/chromeos/chromevox/common/dom_util.js
index b9dd523220e50a13d7b59136c8dee310add8ee69..962f37d04f49b087b8d8c635aa8e04905c00f278 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/dom_util.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/dom_util.js
@@ -2447,9 +2447,14 @@ cvox.DomUtil.isMathImg = function(node) {
if (node.tagName != 'IMG') {
return false;
}
- var className = node.className.toLowerCase();
- return cvox.DomUtil.ALT_MATH_CLASSES.tex.indexOf(className) != -1 ||
- cvox.DomUtil.ALT_MATH_CLASSES.asciimath.indexOf(className) != -1;
+ for (var i = 0, className; className = node.classList.item(i); i++) {
+ className = className.toLowerCase();
+ if (cvox.DomUtil.ALT_MATH_CLASSES.tex.indexOf(className) != -1 ||
+ cvox.DomUtil.ALT_MATH_CLASSES.asciimath.indexOf(className) != -1) {
+ return true;
+ }
+ }
+ return false;
};
« 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