Skip to content

Commit 3a0ded1

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Prevent double-draw during dimming
The first dimming from hovering in a table was double-drawing the flame graph due to the "disabled" state of the 3p-dimming setting calling "refreshDimming" again. We don't actually need to disable the setting, so deleting that line fixes this. https://trace.cafe/t/VbetOBZ0OP Bug: 40278532 Change-Id: I8fc16f2025861d1adc546740a309287c0a43caeb Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6219691 Auto-Submit: Connor Clark <[email protected]> Commit-Queue: Paul Irish <[email protected]> Reviewed-by: Paul Irish <[email protected]>
1 parent dcd2305 commit 3a0ded1

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -738,18 +738,13 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
738738
/**
739739
* This "disables" the 3P checkbox in the toolbar.
740740
* Disabling here does a couple of things:
741-
* 1) updates the setting to "disabled"
742-
* 2) makes the checkbox dimmed and unclickable
743-
* 3) gives the checkbox UI an indeterminate state
744-
* Only make the change if it's different to avoid an infinite loop
741+
* 1) makes the checkbox dimmed and unclickable
742+
* 2) gives the checkbox UI an indeterminate state
745743
*/
746744
set3PCheckboxDisabled(disabled: boolean): void {
747745
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_DIM_UNRELATED_EVENTS)) {
748-
if (this.#thirdPartyCheckbox?.inputElement.disabled !== disabled) {
749-
this.#thirdPartyCheckbox?.applyEnabledState(!disabled);
750-
this.#thirdPartyCheckbox?.setIndeterminate(disabled);
751-
this.#dimThirdPartiesSetting?.setDisabled(disabled);
752-
}
746+
this.#thirdPartyCheckbox?.applyEnabledState(!disabled);
747+
this.#thirdPartyCheckbox?.setIndeterminate(disabled);
753748
}
754749
}
755750

0 commit comments

Comments
 (0)