| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e48b32a7095d74a2beb47227858fb09faf3c5953
|
| --- /dev/null
|
| +++ b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/blend-background-extracted.js
|
| @@ -0,0 +1,19 @@
|
| +/**
|
| + * While scrolling down, fade in the rear background layer and fade out the front background
|
| + * layer (opacity interpolated based on scroll position).
|
| + */
|
| + 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;
|
| + },
|
| + /** @this Polymer.AppLayout.ElementWithBackground */
|
| + run: function run(p, y) {
|
| + this.$.backgroundFrontLayer.style.opacity = 1 - p;
|
| + this.$.backgroundRearLayer.style.opacity = p;
|
| + }
|
| + });
|
|
|