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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js

Issue 2712063002: [DevTools] Migrate Popover to GlassPane (Closed)
Patch Set: nit 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 */ 105 */
106 _onMouseMove(event) { 106 _onMouseMove(event) {
107 if (!this._cursorEnabled) 107 if (!this._cursorEnabled)
108 return; 108 return;
109 this._cursorPosition = event.offsetX + event.target.offsetLeft; 109 this._cursorPosition = event.offsetX + event.target.offsetLeft;
110 this._cursorElement.style.left = this._cursorPosition + 'px'; 110 this._cursorElement.style.left = this._cursorPosition + 'px';
111 this._cursorElement.style.visibility = 'visible'; 111 this._cursorElement.style.visibility = 'visible';
112 if (!this._popover) 112 if (!this._popover)
113 return; 113 return;
114 this._buildPopoverContents().then(updatePopover.bind(this)); 114 this._buildPopoverContents().then(updatePopover.bind(this));
115 this._popover.positionElement(this._cursorElement); 115 this._popover.setContentAnchorBox(this._cursorElement.boxInWindow());
116 116
117 /** 117 /**
118 * @param {!DocumentFragment} fragment 118 * @param {!DocumentFragment} fragment
119 * @this {PerfUI.TimelineOverviewPane} 119 * @this {PerfUI.TimelineOverviewPane}
120 */ 120 */
121 function updatePopover(fragment) { 121 function updatePopover(fragment) {
122 if (!this._popoverContents) 122 if (!this._popoverContents)
123 return; 123 return;
124 this._popoverContents.removeChildren(); 124 this._popoverContents.removeChildren();
125 this._popoverContents.appendChild(fragment); 125 this._popoverContents.appendChild(fragment);
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 */ 539 */
540 onClick(event) { 540 onClick(event) {
541 return false; 541 return false;
542 } 542 }
543 543
544 resetCanvas() { 544 resetCanvas() {
545 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; 545 this._canvas.width = this.element.clientWidth * window.devicePixelRatio;
546 this._canvas.height = this.element.clientHeight * window.devicePixelRatio; 546 this._canvas.height = this.element.clientHeight * window.devicePixelRatio;
547 } 547 }
548 }; 548 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698