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

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

Issue 2706293007: [DevTools] Fix Dialog's close button to properly close dialog. (Closed)
Patch Set: test 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return Math.min(kMaxWidth, UI.measurePreferredSize(element, this._element).w idth); 122 return Math.min(kMaxWidth, UI.measurePreferredSize(element, this._element).w idth);
123 } 123 }
124 124
125 /** 125 /**
126 * @suppressGlobalPropertiesCheck 126 * @suppressGlobalPropertiesCheck
127 */ 127 */
128 _show() { 128 _show() {
129 if (this.visible()) 129 if (this.visible())
130 return; 130 return;
131 // TODO(dgozman): take document as a parameter. 131 // TODO(dgozman): take document as a parameter.
132 this._glassPane.showGlassPane(document); 132 this._glassPane.show(document);
133 this._rowHeight = 133 this._rowHeight =
134 UI.measurePreferredSize(this.createElementForItem({text: '1', subtitle: '12'}), this._element).height; 134 UI.measurePreferredSize(this.createElementForItem({text: '1', subtitle: '12'}), this._element).height;
135 } 135 }
136 136
137 hide() { 137 hide() {
138 if (!this.visible()) 138 if (!this.visible())
139 return; 139 return;
140 this._userInteracted = false; 140 this._userInteracted = false;
141 this._glassPane.hideGlassPane(); 141 this._glassPane.hide();
142 } 142 }
143 143
144 /** 144 /**
145 * @param {boolean=} isIntermediateSuggestion 145 * @param {boolean=} isIntermediateSuggestion
146 * @return {boolean} 146 * @return {boolean}
147 */ 147 */
148 _applySuggestion(isIntermediateSuggestion) { 148 _applySuggestion(isIntermediateSuggestion) {
149 if (this._onlyCompletion) { 149 if (this._onlyCompletion) {
150 this._suggestBoxDelegate.applySuggestion(this._onlyCompletion, isIntermedi ateSuggestion); 150 this._suggestBoxDelegate.applySuggestion(this._onlyCompletion, isIntermedi ateSuggestion);
151 return true; 151 return true;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 /** 360 /**
361 * @typedef {!{text: string, subtitle: (string|undefined), iconType: (string|und efined), priority: (number|undefined), isSecondary: (boolean|undefined), title: (string|undefined)}} 361 * @typedef {!{text: string, subtitle: (string|undefined), iconType: (string|und efined), priority: (number|undefined), isSecondary: (boolean|undefined), title: (string|undefined)}}
362 */ 362 */
363 UI.SuggestBox.Suggestion; 363 UI.SuggestBox.Suggestion;
364 364
365 /** 365 /**
366 * @typedef {!Array<!UI.SuggestBox.Suggestion>} 366 * @typedef {!Array<!UI.SuggestBox.Suggestion>}
367 */ 367 */
368 UI.SuggestBox.Suggestions; 368 UI.SuggestBox.Suggestions;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698