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

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

Issue 2186833002: DevTools: ensure to show the same Popover object only once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 /** 76 /**
77 * @param {?WebInspector.Widget} view 77 * @param {?WebInspector.Widget} view
78 * @param {!Element} contentElement 78 * @param {!Element} contentElement
79 * @param {!Element|!AnchorBox} anchor 79 * @param {!Element|!AnchorBox} anchor
80 * @param {?number=} preferredWidth 80 * @param {?number=} preferredWidth
81 * @param {?number=} preferredHeight 81 * @param {?number=} preferredHeight
82 * @param {?WebInspector.Popover.Orientation=} arrowDirection 82 * @param {?WebInspector.Popover.Orientation=} arrowDirection
83 */ 83 */
84 _innerShow: function(view, contentElement, anchor, preferredWidth, preferred Height, arrowDirection) 84 _innerShow: function(view, contentElement, anchor, preferredWidth, preferred Height, arrowDirection)
85 { 85 {
86 if (this._disposed) 86 if (this._disposed || WebInspector.Popover._popover === this)
87 return; 87 return;
88 this._contentElement = contentElement; 88 this._contentElement = contentElement;
89 89
90 // This should not happen, but we hide previous popup to be on the safe side. 90 // This should not happen, but we hide previous popup to be on the safe side.
91 if (WebInspector.Popover._popover) 91 if (WebInspector.Popover._popover)
92 WebInspector.Popover._popover.hide(); 92 WebInspector.Popover._popover.hide();
93 WebInspector.Popover._popover = this; 93 WebInspector.Popover._popover = this;
94 94
95 var document = anchor instanceof Element ? anchor.ownerDocument : conten tElement.ownerDocument; 95 var document = anchor instanceof Element ? anchor.ownerDocument : conten tElement.ownerDocument;
96 var window = document.defaultView; 96 var window = document.defaultView;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 this._resetHoverTimer(); 418 this._resetHoverTimer();
419 } 419 }
420 } 420 }
421 } 421 }
422 422
423 /** @enum {string} */ 423 /** @enum {string} */
424 WebInspector.Popover.Orientation = { 424 WebInspector.Popover.Orientation = {
425 Top: "top", 425 Top: "top",
426 Bottom: "bottom" 426 Bottom: "bottom"
427 } 427 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698