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

Unified Diff: ui/webui/resources/js/i18n_template_no_process.js

Issue 1224623013: Port downloads.ItemView to a Polymer component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p-dl-rough-draft2
Patch Set: actually include i18n changes Created 5 years, 5 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
Index: ui/webui/resources/js/i18n_template_no_process.js
diff --git a/ui/webui/resources/js/i18n_template_no_process.js b/ui/webui/resources/js/i18n_template_no_process.js
index 44262810b0328671273ec433f4b6a5b0f2c24496..4e7a7df6da2b545cc9e22e233bf4a312c418a103 100644
--- a/ui/webui/resources/js/i18n_template_no_process.js
+++ b/ui/webui/resources/js/i18n_template_no_process.js
@@ -111,14 +111,7 @@ var i18nTemplate = (function() {
};
var attributeNames = Object.keys(handlers);
- // Chrome for iOS must use Apple's UIWebView, which (as of April 2015) does
- // not have native shadow DOM support. If shadow DOM is supported (or
- // polyfilled), search for i18n attributes using the /deep/ selector;
- // otherwise, do not attempt to search within the shadow DOM.
- var selector =
- (window.document.body && window.document.body.createShadowRoot) ?
- 'html /deep/ [' + attributeNames.join('],[') + ']' :
- '[' + attributeNames.join('],[') + ']';
+ var selector = '[' + attributeNames.join('],[') + ']';
/**
* Processes a DOM tree with the {@code dictionary} map.
@@ -136,7 +129,7 @@ var i18nTemplate = (function() {
}
}
var doc = root instanceof Document ? root : root.ownerDocument;
- if (doc)
+ if (doc && doc.documentElement)
doc.documentElement.classList.add('i18n-processed');
}
« ui/webui/resources/js/i18n_template.js ('K') | « ui/webui/resources/js/i18n_template.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698