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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js

Issue 2834053004: DevTools: Fix timeline overview flickering (Closed)
Patch Set: addressing comment Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js b/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
index d94c4433f8ef964737a2a43dc3dbd745cc872538..f508cf6d0d8eb7dad8a88d60427b4fd96f9b87b1 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
@@ -12,7 +12,8 @@ UI.GlassPane = class {
this.element.shadowRoot.appendChild(this._arrowElement);
this.registerRequiredCSS('ui/glassPane.css');
- this.element.classList.add('no-pointer-events');
+ this.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.PierceGlassPane);
+
this._onMouseDownBound = this._onMouseDown.bind(this);
/** @type {?function(!Event)} */
this._onClickOutsideCallback = null;
@@ -51,10 +52,13 @@ UI.GlassPane = class {
}
/**
- * @param {boolean} blockPointerEvents
+ * @param {!UI.GlassPane.PointerEventsBehavior} pointerEventsBehavior
*/
- setBlockPointerEvents(blockPointerEvents) {
- this.element.classList.toggle('no-pointer-events', !blockPointerEvents);
+ setPointerEventsBehavior(pointerEventsBehavior) {
+ this.element.classList.toggle(
+ 'no-pointer-events', pointerEventsBehavior !== UI.GlassPane.PointerEventsBehavior.BlockedByGlassPane);
+ this.contentElement.classList.toggle(
+ 'no-pointer-events', pointerEventsBehavior === UI.GlassPane.PointerEventsBehavior.PierceContents);
}
/**
@@ -364,9 +368,14 @@ UI.GlassPane = class {
}
};
-/**
- * @enum {symbol}
- */
+/** @enum {symbol} */
+UI.GlassPane.PointerEventsBehavior = {
+ BlockedByGlassPane: Symbol('BlockedByGlassPane'),
+ PierceGlassPane: Symbol('PierceGlassPane'),
+ PierceContents: Symbol('PierceContents')
+};
+
+/** @enum {symbol} */
UI.GlassPane.AnchorBehavior = {
PreferTop: Symbol('PreferTop'),
PreferBottom: Symbol('PreferBottom'),
@@ -374,18 +383,14 @@ UI.GlassPane.AnchorBehavior = {
PreferRight: Symbol('PreferRight'),
};
-/**
- * @enum {symbol}
- */
+/** @enum {symbol} */
UI.GlassPane.SizeBehavior = {
SetExactSize: Symbol('SetExactSize'),
SetExactWidthMaxHeight: Symbol('SetExactWidthMaxHeight'),
MeasureContent: Symbol('MeasureContent')
};
-/**
- * @enum {symbol}
- */
+/** @enum {symbol} */
UI.GlassPane.MarginBehavior = {
Arrow: Symbol('Arrow'),
DefaultMargin: Symbol('DefaultMargin'),
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Dialog.js ('k') | third_party/WebKit/Source/devtools/front_end/ui/Popover.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698