| Index: polymer_0.5.4/bower_components/web-animations-js/src/apply-preserving-inline-style.js
|
| diff --git a/polymer_0.5.0/bower_components/web-animations-js/src/apply-preserving-inline-style.js b/polymer_0.5.4/bower_components/web-animations-js/src/apply-preserving-inline-style.js
|
| similarity index 89%
|
| copy from polymer_0.5.0/bower_components/web-animations-js/src/apply-preserving-inline-style.js
|
| copy to polymer_0.5.4/bower_components/web-animations-js/src/apply-preserving-inline-style.js
|
| index c96a3359d150593d6d2193ca7bfb330a72506f68..795be364529173046198d02931bc6509e1055248 100644
|
| --- a/polymer_0.5.0/bower_components/web-animations-js/src/apply-preserving-inline-style.js
|
| +++ b/polymer_0.5.4/bower_components/web-animations-js/src/apply-preserving-inline-style.js
|
| @@ -47,8 +47,7 @@
|
| // Stores the inline style of the element on its behalf while the
|
| // polyfill uses the element's inline style to simulate web animations.
|
| // This is needed to fake regular inline style CSSOM access on the element.
|
| - this._surrogateElement = document.createElement('div');
|
| - this._surrogateStyle = this._surrogateElement.style;
|
| + this._surrogateStyle = document.createElementNS('http://www.w3.org/1999/xhtml', 'div').style;
|
| this._style = element.style;
|
| this._length = 0;
|
| this._isAnimatedProperty = {};
|
| @@ -157,10 +156,19 @@
|
| if (element._webAnimationsPatchedStyle)
|
| return;
|
|
|
| - // If this style patch fails (on Safari and iOS) use the apply-preserving-inline-style-methods.js
|
| - // module instead and restrict inline style interactions to the methods listed in styleMethods.
|
| var animatedStyle = new AnimatedCSSStyleDeclaration(element);
|
| - configureProperty(element, 'style', { get: function() { return animatedStyle; } });
|
| + try {
|
| + configureProperty(element, 'style', { get: function() { return animatedStyle; } });
|
| + } catch (_) {
|
| + // iOS and older versions of Safari (pre v7) do not support overriding an element's
|
| + // style object. Animations will clobber any inline styles as a result.
|
| + element.style._set = function(property, value) {
|
| + element.style[property] = value;
|
| + };
|
| + element.style._clear = function(property) {
|
| + element.style[property] = '';
|
| + };
|
| + }
|
|
|
| // We must keep a handle on the patched style to prevent it from getting GC'd.
|
| element._webAnimationsPatchedStyle = element.style;
|
| @@ -180,4 +188,4 @@
|
| if (WEB_ANIMATIONS_TESTING)
|
| testing.ensureStyleIsPatched = ensureStyleIsPatched;
|
|
|
| -})(webAnimationsMinifill, webAnimationsTesting);
|
| +})(webAnimations1, webAnimationsTesting);
|
|
|