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

Unified Diff: third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/resize-title-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/resize-title-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/resize-title-extracted.js b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/resize-title-extracted.js
index 68c59a55a47f36b3bf404055279af965d6c29fa0..fcb12df71b6955351f1e9d17b5253fc0d98994a1 100644
--- a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/resize-title-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/resize-title-extracted.js
@@ -12,8 +12,8 @@
Polymer.AppLayout.registerEffect('resize-title', {
/** @this Polymer.AppLayout.ElementWithBackground */
setUp: function setUp() {
- var title = Polymer.dom(this).querySelector('[title]');
- var condensedTitle = Polymer.dom(this).querySelector('[condensed-title]');
+ var title = this._getDOMRef('title');
+ var condensedTitle = this._getDOMRef('condensedTitle');
if (!condensedTitle) {
this._warn(this._logf('effects[resize-title]', 'undefined `condensed-title`'));
@@ -26,9 +26,10 @@
condensedTitle.style.willChange = 'opacity';
title.style.willChange = 'opacity';
-
condensedTitle.style.webkitTransform = 'translateZ(0)';
title.style.webkitTransform = 'translateZ(0)';
+ condensedTitle.style.transform = 'translateZ(0)';
+ title.style.transform = 'translateZ(0)';
var titleClientRect = title.getBoundingClientRect();
var condensedTitleClientRect = condensedTitle.getBoundingClientRect();
@@ -43,10 +44,6 @@
this._fxResizeTitle = fx;
},
- /** @this Polymer.AppLayout.ElementWithBackground */
- tearDown: function tearDown() {
- delete this._fxResizeTitle;
- },
/** @this PolymerElement */
run: function run(p, y) {
var fx = this._fxResizeTitle;
@@ -60,17 +57,15 @@
fx.title.style.opacity = 1;
fx.condensedTitle.style.opacity = 0;
}
-
- interpolate(Math.min(1, p),
- [
- [1, fx.scale],
- [0, -fx.titleDX],
- [y, y-fx.titleDY]
- ],
+ interpolate(Math.min(1, p), [ [1, fx.scale], [0, -fx.titleDX], [y, y-fx.titleDY] ],
function(scale, translateX, translateY) {
this.transform('translate(' + translateX + 'px, ' + translateY + 'px) ' +
'scale3d(' + scale + ', ' + scale + ', 1)', fx.title);
}, this);
+ },
+ /** @this Polymer.AppLayout.ElementWithBackground */
+ tearDown: function tearDown() {
+ delete this._fxResizeTitle;
}
});
})();

Powered by Google App Engine
This is Rietveld 408576698