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

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

Issue 2771533004: [DevTools] Make timeline popover easier to use on small screens (Closed)
Patch Set: 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 * @return {?UI.PopoverRequest} 69 * @return {?UI.PopoverRequest}
70 */ 70 */
71 _getPopoverRequest(event) { 71 _getPopoverRequest(event) {
72 return { 72 return {
73 box: this._cursorElement.boxInWindow(), 73 box: this._cursorElement.boxInWindow(),
74 show: popover => this._buildPopoverContents().then(fragment => { 74 show: popover => this._buildPopoverContents().then(fragment => {
75 if (!fragment.firstChild) 75 if (!fragment.firstChild)
76 return false; 76 return false;
77 var content = new PerfUI.TimelineOverviewPane.PopoverContents(); 77 var content = new PerfUI.TimelineOverviewPane.PopoverContents();
78 this._popoverContents = content.contentElement.createChild('div'); 78 this._popoverContents = content.contentElement.createChild('div');
79 this._popoverContents.addEventListener('click', () => this._popoverHelpe r.hidePopover());
79 this._popoverContents.appendChild(fragment); 80 this._popoverContents.appendChild(fragment);
80 this._popover = popover; 81 this._popover = popover;
81 content.show(popover.contentElement); 82 content.show(popover.contentElement);
82 return true; 83 return true;
83 }), 84 }),
84 hide: () => { 85 hide: () => {
85 this._popover = null; 86 this._popover = null;
86 this._popoverContents = null; 87 this._popoverContents = null;
87 } 88 }
88 }; 89 };
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 */ 528 */
528 onClick(event) { 529 onClick(event) {
529 return false; 530 return false;
530 } 531 }
531 532
532 resetCanvas() { 533 resetCanvas() {
533 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; 534 this._canvas.width = this.element.clientWidth * window.devicePixelRatio;
534 this._canvas.height = this.element.clientHeight * window.devicePixelRatio; 535 this._canvas.height = this.element.clientHeight * window.devicePixelRatio;
535 } 536 }
536 }; 537 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698