Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 }; | 473 }; |
| 474 | 474 |
| 475 PerfUI.TimelineOverviewPane.OverviewInfo = class { | 475 PerfUI.TimelineOverviewPane.OverviewInfo = class { |
| 476 /** | 476 /** |
| 477 * @param {!Element} anchor | 477 * @param {!Element} anchor |
| 478 */ | 478 */ |
| 479 constructor(anchor) { | 479 constructor(anchor) { |
| 480 this._anchorElement = anchor; | 480 this._anchorElement = anchor; |
| 481 this._glassPane = new UI.GlassPane(); | 481 this._glassPane = new UI.GlassPane(); |
| 482 this._glassPane.setBlockPointerEvents(false); | 482 this._glassPane.setBlockPointerEvents(false); |
| 483 this._glassPane.setMarginBehavior(UI.GlassPane.MarginBehavior.NoMargin); | 483 this._glassPane.setMarginBehavior(UI.GlassPane.MarginBehavior.Arrow); |
| 484 this._glassPane.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent); | 484 this._glassPane.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent); |
| 485 this._glassPane.contentElement.style.setProperty('pointer-events', 'none'); | |
|
dgozman
2017/04/21 23:04:05
Why this? You should set pointer-events on your co
| |
| 485 this._element = | 486 this._element = |
| 486 UI.createShadowRootWithCoreStyles(this._glassPane.contentElement, 'perf_ ui/timelineOverviewInfo.css') | 487 UI.createShadowRootWithCoreStyles(this._glassPane.contentElement, 'perf_ ui/timelineOverviewInfo.css') |
| 487 .createChild('div', 'overview-info'); | 488 .createChild('div', 'overview-info'); |
| 488 } | 489 } |
| 489 | 490 |
| 490 /** | 491 /** |
| 491 * @param {!DocumentFragment} content | 492 * @param {!DocumentFragment} content |
| 492 */ | 493 */ |
| 493 setContent(content) { | 494 setContent(content) { |
| 494 this._element.removeChildren(); | 495 this._element.removeChildren(); |
| 495 this._element.appendChild(content); | 496 this._element.appendChild(content); |
| 496 this._glassPane.setContentAnchorBox(this._anchorElement.boxInWindow()); | 497 this._glassPane.setContentAnchorBox(this._anchorElement.boxInWindow()); |
| 497 if (!this._glassPane.isShowing()) | 498 if (!this._glassPane.isShowing()) |
| 498 this._glassPane.show(/** @type {!Document} */ (this._anchorElement.ownerDo cument)); | 499 this._glassPane.show(/** @type {!Document} */ (this._anchorElement.ownerDo cument)); |
| 499 } | 500 } |
| 500 | 501 |
| 501 hide() { | 502 hide() { |
| 502 this._glassPane.hide(); | 503 this._glassPane.hide(); |
| 503 } | 504 } |
| 504 }; | 505 }; |
| OLD | NEW |