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

Unified Diff: third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/blend-background-extracted.js

Issue 2074813002: Roll Polymer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chromium.patch Created 4 years, 6 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/v1_0/components-chromium/app-layout/app-scroll-effects/effects/blend-background-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/blend-background-extracted.js b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/blend-background-extracted.js
index e48b32a7095d74a2beb47227858fb09faf3c5953..e64c488b071e37adbfd275f41d22e7a5eba8ab19 100644
--- a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/blend-background-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/blend-background-extracted.js
@@ -5,15 +5,24 @@
Polymer.AppLayout.registerEffect('blend-background', {
/** @this Polymer.AppLayout.ElementWithBackground */
setUp: function setUp() {
- this.$.backgroundFrontLayer.style.willChange = 'opacity';
- this.$.backgroundFrontLayer.style.webkitTransform = 'translateZ(0)';
- this.$.backgroundRearLayer.style.willChange = 'opacity';
- this.$.backgroundRearLayer.style.webkitTransform = 'translateZ(0)';
- this.$.backgroundRearLayer.style.opacity = 0;
+ var fx = {};
+ fx.backgroundFrontLayer = this._getDOMRef('backgroundFrontLayer');
+ fx.backgroundRearLayer = this._getDOMRef('backgroundRearLayer');
+ fx.backgroundFrontLayer.style.willChange = 'opacity';
+ fx.backgroundFrontLayer.style.transform = 'translateZ(0)';
+ fx.backgroundRearLayer.style.willChange = 'opacity';
+ fx.backgroundRearLayer.style.transform = 'translateZ(0)';
+ fx.backgroundRearLayer.style.opacity = 0;
+ this._fxBlendBackground = fx;
},
/** @this Polymer.AppLayout.ElementWithBackground */
run: function run(p, y) {
- this.$.backgroundFrontLayer.style.opacity = 1 - p;
- this.$.backgroundRearLayer.style.opacity = p;
+ var fx = this._fxBlendBackground;
+ fx.backgroundFrontLayer.style.opacity = 1 - p;
+ fx.backgroundRearLayer.style.opacity = p;
+ },
+ /** @this Polymer.AppLayout.ElementWithBackground */
+ tearDown: function tearDown() {
+ delete this._fxBlendBackground;
}
});

Powered by Google App Engine
This is Rietveld 408576698