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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js

Issue 1901343004: [Polymer] update third_party polymer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: new pull Created 4 years, 8 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/iron-dropdown/iron-dropdown-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
index 750fbbbd578b723e3114db18a6263ce28054f2ef..3af87ce7f4ca26094a1eed5ae1d8dc7a1b8b99e0 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
@@ -134,9 +134,9 @@
],
attached: function() {
- this.positionTarget = this.positionTarget || this._defaultPositionTarget;
// Memoize this to avoid expensive calculations & relayouts.
this._isRTL = window.getComputedStyle(this).direction == 'rtl';
+ this.positionTarget = this.positionTarget || this._defaultPositionTarget;
},
/**
@@ -184,7 +184,7 @@
* The horizontal offset value used to position the dropdown.
* @param {ClientRect} dropdownRect
* @param {ClientRect} positionRect
- * @param {boolean=false} fromRight
+ * @param {boolean=} fromRight
* @return {number} pixels
* @private
*/
@@ -204,7 +204,7 @@
* The vertical offset value used to position the dropdown.
* @param {ClientRect} dropdownRect
* @param {ClientRect} positionRect
- * @param {boolean=false} fromBottom
+ * @param {boolean=} fromBottom
* @return {number} pixels
* @private
*/
@@ -222,16 +222,20 @@
/**
* Called when the value of `opened` changes.
- *
- * @param {boolean} opened True if the dropdown is opened.
+ * Overridden from `IronOverlayBehavior`
*/
- _openedChanged: function(opened) {
- if (opened && this.disabled) {
+ _openedChanged: function() {
+ if (this.opened && this.disabled) {
this.cancel();
} else {
this.cancelAnimation();
this.sizingTarget = this.containedElement || this.sizingTarget;
this._updateAnimationConfig();
+ if (this.opened && !this.allowOutsideScroll) {
+ Polymer.IronDropdownScrollManager.pushScrollLock(this);
+ } else {
+ Polymer.IronDropdownScrollManager.removeScrollLock(this);
+ }
Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this, arguments);
}
},
@@ -240,10 +244,6 @@
* Overridden from `IronOverlayBehavior`.
*/
_renderOpened: function() {
- if (!this.allowOutsideScroll) {
- Polymer.IronDropdownScrollManager.pushScrollLock(this);
- }
-
if (!this.noAnimations && this.animationConfig && this.animationConfig.open) {
if (this.withBackdrop) {
this.backdropElement.open();
@@ -259,7 +259,6 @@
* Overridden from `IronOverlayBehavior`.
*/
_renderClosed: function() {
- Polymer.IronDropdownScrollManager.removeScrollLock(this);
if (!this.noAnimations && this.animationConfig && this.animationConfig.close) {
if (this.withBackdrop) {
this.backdropElement.close();

Powered by Google App Engine
This is Rietveld 408576698