DevTools: workaround for slow Elements tree layouts
DevTools: workaround for slow Elements tree layouts

Holding ArrowUp/Down to quickly navigate the Elements tree can cause
a 5+ sec freeze in DT UI, with LayoutNG.

This CL avoids the slowdown, primarily caused by proliferous
re-layouts when adding/removing the 'selected' class.

Bug: 980399
Change-Id: I5459a4a7571843cd9e7072b6ff0c9e36ce19e10e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702746
Reviewed-by: Joel Einbinder <bab755abe9fee48fe544272e55f73517d4e4a725@chromium.org>
Commit-Queue: Erik Luo <26192f5e05d23e5ee959014fb911d780e566545b@chromium.org>
Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#677513}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a54c956bf3e164c7ee168474ecea07b4f3064ea5

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend