DevTools has some settings that requires a reloading of DevTools
after changing them.
If DevTools frontend is undocked, several issues were noticed.
1) device mode button does not work.
2) clicking on "Reload devtools" button, a tab appears instead of
that the devtools is reloaded.
The cause of the issue is that when "Reload DevTools" is clicked,
the reloading logic fails to consider the case when DevTools is
undocked.
Fix is to use the same logic as frontend.components.reload in
frontend.ui. We move the DockController.js from components to ui as
1) ui cannot depend on component and 2) DockController is arguably
a legitimate part of ui.
The after gif is below, where we tested both cases.
https://imgur.com/8LVLPMW
Bug: chromium:1105779, chromium:1113601
Change-Id: Ie8e1e60c49ff733de53ab7ad1409d8c44e99162a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2354551
Commit-Queue: Songtao Xia <soxia@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Some not yet resolved backend problem breaks the usual flow of events
after the anchor element navigation happens within the DevTools
(e.g., <a href="#anchor" />). One of the issues is that styles events
are missing after the DevTools's reloaded. This change reattaches the
target before reloading DevTools to mitigate the issue.
Fixed: 972001
Change-Id: Ie815a9a7e5dda8d39686068c8064e19bc31285b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2157025
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9