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

Unified Diff: tools/dom/src/NodeValidatorBuilder.dart

Issue 1321613005: Dartium w/ JsInterop enabled (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « tools/dom/src/Html5NodeValidator.dart ('k') | tools/dom/src/Validators.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/NodeValidatorBuilder.dart
diff --git a/tools/dom/src/NodeValidatorBuilder.dart b/tools/dom/src/NodeValidatorBuilder.dart
index 4a412325bd30ba1bf628e02184d54852f7e7a786..f884caeb4420dedfb96cd6550e7cc68c0a7763e5 100644
--- a/tools/dom/src/NodeValidatorBuilder.dart
+++ b/tools/dom/src/NodeValidatorBuilder.dart
@@ -358,11 +358,11 @@ class _SimpleNodeValidator implements NodeValidator {
}
bool allowsElement(Element element) {
- return allowedElements.contains(element.tagName);
+ return allowedElements.contains(element._safeTagName);
}
bool allowsAttribute(Element element, String attributeName, String value) {
- var tagName = element.tagName;
+ var tagName = element._safeTagName;
if (allowedUriAttributes.contains('$tagName::$attributeName')) {
return uriPolicy.allowsUri(value);
} else if (allowedUriAttributes.contains('*::$attributeName')) {
@@ -403,10 +403,10 @@ class _CustomElementNodeValidator extends _SimpleNodeValidator {
var isAttr = element.attributes['is'];
if (isAttr != null) {
return allowedElements.contains(isAttr.toUpperCase()) &&
- allowedElements.contains(element.tagName);
+ allowedElements.contains(element._safeTagName);
}
}
- return allowCustomTag && allowedElements.contains(element.tagName);
+ return allowCustomTag && allowedElements.contains(element._safeTagName);
}
bool allowsAttribute(Element element, String attributeName, String value) {
@@ -462,7 +462,7 @@ class _SvgNodeValidator implements NodeValidator {
// foreignobject tag as SvgElement. We don't want foreignobject contents
// anyway, so just remove the whole tree outright. And we can't rely
// on IE recognizing the SvgForeignObject type, so go by tagName. Bug 23144
- if (element is svg.SvgElement && element.tagName == 'foreignObject') {
+ if (element is svg.SvgElement && element._safeTagName == 'foreignObject') {
return false;
}
if (element is svg.SvgElement) {
« no previous file with comments | « tools/dom/src/Html5NodeValidator.dart ('k') | tools/dom/src/Validators.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698