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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js

Issue 2768193002: [DevTools] Adjust popover arrow position. (Closed)
Patch Set: rebased Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/glassPane.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 UI.GlassPane = class { 5 UI.GlassPane = class {
6 constructor() { 6 constructor() {
7 this._widget = new UI.Widget(true); 7 this._widget = new UI.Widget(true);
8 this._widget.markAsRoot(); 8 this._widget.markAsRoot();
9 this.element = this._widget.element; 9 this.element = this._widget.element;
10 this.contentElement = this._widget.contentElement; 10 this.contentElement = this._widget.contentElement;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return; 145 return;
146 if (this.contentElement.isSelfOrAncestor(/** @type {?Node} */ (event.deepEle mentFromPoint()))) 146 if (this.contentElement.isSelfOrAncestor(/** @type {?Node} */ (event.deepEle mentFromPoint())))
147 return; 147 return;
148 this._onClickOutsideCallback.call(null, event); 148 this._onClickOutsideCallback.call(null, event);
149 } 149 }
150 150
151 _positionContent() { 151 _positionContent() {
152 if (!this.isShowing()) 152 if (!this.isShowing())
153 return; 153 return;
154 154
155 var gutterSize = this._showArrow ? 6 : 3; 155 var gutterSize = this._showArrow ? 8 : 3;
156 var scrollbarSize = 14; 156 var scrollbarSize = 14;
157 var arrowSize = 10; 157 var arrowSize = 10;
158 158
159 var container = UI.GlassPane._containers.get(/** @type {!Document} */ (this. element.ownerDocument)); 159 var container = UI.GlassPane._containers.get(/** @type {!Document} */ (this. element.ownerDocument));
160 if (this._sizeBehavior === UI.GlassPane.SizeBehavior.MeasureContent) { 160 if (this._sizeBehavior === UI.GlassPane.SizeBehavior.MeasureContent) {
161 this.contentElement.positionAt(0, 0); 161 this.contentElement.positionAt(0, 0);
162 this.contentElement.style.width = ''; 162 this.contentElement.style.width = '';
163 this.contentElement.style.maxWidth = ''; 163 this.contentElement.style.maxWidth = '';
164 this.contentElement.style.height = ''; 164 this.contentElement.style.height = '';
165 this.contentElement.style.maxHeight = ''; 165 this.contentElement.style.maxHeight = '';
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 UI.GlassPane.SizeBehavior = { 366 UI.GlassPane.SizeBehavior = {
367 SetExactSize: Symbol('SetExactSize'), 367 SetExactSize: Symbol('SetExactSize'),
368 SetExactWidthMaxHeight: Symbol('SetExactWidthMaxHeight'), 368 SetExactWidthMaxHeight: Symbol('SetExactWidthMaxHeight'),
369 MeasureContent: Symbol('MeasureContent') 369 MeasureContent: Symbol('MeasureContent')
370 }; 370 };
371 371
372 /** @type {!Map<!Document, !Element>} */ 372 /** @type {!Map<!Document, !Element>} */
373 UI.GlassPane._containers = new Map(); 373 UI.GlassPane._containers = new Map();
374 /** @type {!Set<!UI.GlassPane>} */ 374 /** @type {!Set<!UI.GlassPane>} */
375 UI.GlassPane._panes = new Set(); 375 UI.GlassPane._panes = new Set();
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/glassPane.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698