| Index: chrome/browser/resources/settings/list_item_behavior.js
|
| diff --git a/chrome/browser/resources/settings/list_item_behavior.js b/chrome/browser/resources/settings/list_item_behavior.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3c4ad1999f86a5efe5a877de03cd0105981689e2
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/settings/list_item_behavior.js
|
| @@ -0,0 +1,22 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +/** @polymerBehavior */
|
| +var ListItemBehavior = {
|
| + ensureMaxZIndex: function() {
|
| + // <iron-list> applies translate3d() transform on every element, which
|
| + // means that in the natural order the (n-1)-th element is at a lower z
|
| + // index than the n-th element. This prevents the popup menu from being
|
| + // painted on top of other elements, and therefore a zIndex adjustment is
|
| + // necessary.
|
| + this.style.zIndex = ++ListItemBehavior.maxZIndex_;
|
| + },
|
| +};
|
| +
|
| +/**
|
| + * The max z index assigned to an <iron-list> item so far. Used to
|
| + * ensure that the per-item popup menu is displayed correctly.
|
| + * @private {number}
|
| + */
|
| +ListItemBehavior.maxZIndex_ = 0;
|
|
|