From 41717280d65c2e6393f7176d2636c302d8d8b8b3 Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Wed, 19 Feb 2014 10:25:59 -0800 Subject: [PATCH] Always use xhr to load styles; relying on caching was too brittle. --- src/declaration/styles.js | 10 +--------- test/html/styling/x-sheets.html | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/declaration/styles.js b/src/declaration/styles.js index 6fa954c..70b15c0 100644 --- a/src/declaration/styles.js +++ b/src/declaration/styles.js @@ -28,15 +28,7 @@ } var styles = this.findLoadableStyles(content); if (styles.length) { - // if SD polyfill or opt-in, use xhr for cssText, otherwise - // allow platform to cache styles. - // TODO(sorvell): experimental flag to force direct caching of cssTest - // rather than relying on platform to cache @import rules. - if (window.ShadowDOMPolyfill || this.hasAttribute('cache-csstext')) { - Platform.loader.xhrStyles(styles, callback); - } else { - Platform.loader.cacheStyles(styles, callback); - } + Platform.styleResolver.loadStyles(styles, callback); } else if (callback) { callback(); } diff --git a/test/html/styling/x-sheets.html b/test/html/styling/x-sheets.html index 1dbdd8a..97e6afa 100644 --- a/test/html/styling/x-sheets.html +++ b/test/html/styling/x-sheets.html @@ -1,4 +1,4 @@ - +