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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/inline_editor/SwatchPopoverHelper.js

Issue 2771413006: Revert of [DevTools] Migrate SoftContextMenu to use GlassPane (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 InlineEditor.SwatchPopoverHelper = class extends Common.Object { 7 InlineEditor.SwatchPopoverHelper = class extends Common.Object {
8 constructor() { 8 constructor() {
9 super(); 9 super();
10 this._popover = new UI.GlassPane(); 10 this._popover = new UI.GlassPane();
11 this._popover.registerRequiredCSS('inline_editor/swatchPopover.css'); 11 this._popover.registerRequiredCSS('inline_editor/swatchPopover.css');
12 this._popover.setBlockPointerEvents(false); 12 this._popover.setBlockPointerEvents(false);
13 this._popover.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent); 13 this._popover.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);
14 this._popover.setMarginBehavior(UI.GlassPane.MarginBehavior.Arrow); 14 this._popover.setShowArrow(true);
15 this._popover.element.addEventListener('mousedown', e => e.consume(), false) ; 15 this._popover.element.addEventListener('mousedown', e => e.consume(), false) ;
16 16
17 this._hideProxy = this.hide.bind(this, true); 17 this._hideProxy = this.hide.bind(this, true);
18 this._boundOnKeyDown = this._onKeyDown.bind(this); 18 this._boundOnKeyDown = this._onKeyDown.bind(this);
19 this._boundFocusOut = this._onFocusOut.bind(this); 19 this._boundFocusOut = this._onFocusOut.bind(this);
20 this._isHidden = true; 20 this._isHidden = true;
21 } 21 }
22 22
23 /** 23 /**
24 * @param {!Event} event 24 * @param {!Event} event
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 this.hide(true); 108 this.hide(true);
109 event.consume(true); 109 event.consume(true);
110 return; 110 return;
111 } 111 }
112 if (event.key === 'Escape') { 112 if (event.key === 'Escape') {
113 this.hide(false); 113 this.hide(false);
114 event.consume(true); 114 event.consume(true);
115 } 115 }
116 } 116 }
117 }; 117 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698