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..2f59cf49d15f82b5ef6ed86ca93dca400f733063 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/common/dom_util.js |
+++ b/chrome/browser/resources/chromeos/chromevox/common/dom_util.js |
@@ -2447,9 +2447,10 @@ 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; |
+ return node.className.toLowerCase().split(' ').some(function(className) { |
dmazzoni
2015/01/14 08:20:34
Can you use classList.contains? Or at least, itera
David Tseng
2015/01/14 18:17:35
No; since the current code lower cases the classna
|
+ return cvox.DomUtil.ALT_MATH_CLASSES.tex.indexOf(className) != -1 || |
+ cvox.DomUtil.ALT_MATH_CLASSES.asciimath.indexOf(className) != -1; |
+ }); |
}; |