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

Unified Diff: third_party/polymer/v0_8/components-chromium/polymer/src/lib/expr/style-protector-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 7 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: third_party/polymer/v0_8/components-chromium/polymer/src/lib/expr/style-protector-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/polymer/src/lib/expr/style-protector-extracted.js b/third_party/polymer/v0_8/components-chromium/polymer/src/lib/expr/style-protector-extracted.js
deleted file mode 100644
index c47726f148cbb7c194c8d73883d91da519aa937a..0000000000000000000000000000000000000000
--- a/third_party/polymer/v0_8/components-chromium/polymer/src/lib/expr/style-protector-extracted.js
+++ /dev/null
@@ -1,50 +0,0 @@
-
-(function() {
-
- var transformer = document.createElement('style', 'x-style');
-
- var styleProtector = {
-
- scopeDocumentSheets: function() {
- this.scopeSheets(this.getSheetsToScope());
- },
-
- getSheetsToScope: function() {
- var s$ = document.styleSheets;
- return Array.prototype.filter.call(s$, function(s) {
- return s.ownerNode.hasAttribute(this.SCOPE_ATTR);
- }, this);
- },
-
- scopeSheets: function(sheets) {
- for (var i=0, l=sheets.length, s; (i<l) && (s=sheets[i]); i++) {
- this.scopeSheet(s);
- }
- },
-
- scopeSheet: function(sheet) {
- var owner = sheet.ownerNode;
- var cssText = transformer.scopeCssText(this.rulesToCss(sheet.cssRules));
- if (owner.localName === 'link') {
- var style = document.createElement('style');
- style.textContent = cssText;
- owner.parentNode.insertBefore(style, owner);
- owner.parentNode.removeChild(owner);
- } else {
- owner.textContent = cssText;
- }
- },
-
- rulesToCss: function(cssRules) {
- for (var i=0, css=[]; i < cssRules.length; i++) {
- css.push(cssRules[i].cssText);
- }
- return css.join('\n\n');
- },
-
- SCOPE_ATTR: 'needs-scoping'
- };
-
- addEventListener('DOMContentLoaded', styleProtector.scopeDocumentSheets());
-
-})();

Powered by Google App Engine
This is Rietveld 408576698