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

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

Issue 2834053004: DevTools: Fix timeline overview flickering (Closed)
Patch Set: addressing comment Created 3 years, 7 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 this._hidePopoverCallback = null; 196 this._hidePopoverCallback = null;
197 } 197 }
198 198
199 /** 199 /**
200 * @param {!Document} document 200 * @param {!Document} document
201 */ 201 */
202 _showPopover(document) { 202 _showPopover(document) {
203 var popover = new UI.GlassPane(); 203 var popover = new UI.GlassPane();
204 popover.registerRequiredCSS('ui/popover.css'); 204 popover.registerRequiredCSS('ui/popover.css');
205 popover.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent); 205 popover.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);
206 popover.setBlockPointerEvents(false);
207 popover.setMarginBehavior(UI.GlassPane.MarginBehavior.Arrow); 206 popover.setMarginBehavior(UI.GlassPane.MarginBehavior.Arrow);
208 var request = this._scheduledRequest; 207 var request = this._scheduledRequest;
209 request.show.call(null, popover).then(success => { 208 request.show.call(null, popover).then(success => {
210 if (!success) 209 if (!success)
211 return; 210 return;
212 211
213 if (this._scheduledRequest !== request) { 212 if (this._scheduledRequest !== request) {
214 if (request.hide) 213 if (request.hide)
215 request.hide.call(null); 214 request.hide.call(null);
216 return; 215 return;
(...skipping 28 matching lines...) Expand all
245 delete this._hidePopoverTimer; 244 delete this._hidePopoverTimer;
246 245
247 // We know that we reached the popup, but we might have moved over other ele ments. 246 // We know that we reached the popup, but we might have moved over other ele ments.
248 // Discard pending command. 247 // Discard pending command.
249 this._stopShowPopoverTimer(); 248 this._stopShowPopoverTimer();
250 } 249 }
251 }; 250 };
252 251
253 /** @typedef {{box: !AnchorBox, show:(function(!UI.GlassPane):!Promise<boolean>) , hide:(function()|undefined)}} */ 252 /** @typedef {{box: !AnchorBox, show:(function(!UI.GlassPane):!Promise<boolean>) , hide:(function()|undefined)}} */
254 UI.PopoverRequest; 253 UI.PopoverRequest;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698