Skip to content

Commit 250194e

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
Do nothing in SplitWidget.showBoth if already showing
This method resulted in some unnecessary work happening in RPP, causing the flame graph to respond to a "resize" event even though nothing changed size. Since RPP calls this often (like when activating an insight), this contributed to the sometimes-janky feeling caused by opening an insight taking too long. Bug: 40278532 Change-Id: I43b4d4e7a9b400cd3edf06f3f606e008b6455c2d Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6221819 Commit-Queue: Connor Clark <[email protected]> Reviewed-by: Paul Irish <[email protected]>
1 parent 2b2ec38 commit 250194e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

front_end/ui/legacy/SplitWidget.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
398398
}
399399

400400
showBoth(animate?: boolean): void {
401+
// Do nothing if both components are already showing.
402+
if (!this.mainElement.classList.contains('hidden') && !this.sidebarElementInternal.classList.contains('hidden')) {
403+
return;
404+
}
405+
401406
if (this.showModeInternal === ShowMode.BOTH) {
402407
animate = false;
403408
}

0 commit comments

Comments
 (0)