This CL adds a new configuration option when we linkify script
locations. If the location we want to linkify also has breakpoint
set, then we can optionally reveal the breakpoint edit dialog
(after also jumping to the corresponding source location).
This functionality will be used to polish the UX around logpoints and
conditional breakpoints.
R=kimanh@chromium.org
Bug: 1027458
Change-Id: I593d250e5b270a4c278afe1665ee023a36e836a6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207834
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Resolves regression: Text in network data grid appearing dull with up and down arrow navigation.
Update: The value for `isSelected` within backgroundColor() further checks if the active element is either the data grid element or within the data grid element.
Screenshot: https://i.imgur.com/VJVJynJ.gif
Reverts the revert commit 567afd4da6 - "Revert "Improves voice accessibility for row elements in Network and application Panels."".
Bug: 1405151
Change-Id: I463881cd61eba9b4c81eb79a606ea8ec51c52c70
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4178572
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Sylvester Elorm Coch <elormcoch@microsoft.com>
A new rule is added that checks that calls to itScreenshot are only made
within the newly added directory for the Performance Panel interactions
tests. This plus the rule that ensures screenshots are asserted in an
itScreenshot block, restrict using the screenshot test API outside of
the mentioned directory.
Bug: 1407638
Change-Id: I6cff308e9c150bfa231bd65b6190aa293273910a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207836
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Adding a sourceURL comment to conditional breakpoints and logpoints
allows us to detect console messages that originate from such
breakpoints.
We can then use the signal to treat such console messages differently,
e.g. add a marker to distinguish them from user console messages
and use the anchor link to reveal the breakpoint.
R=kimanh@chromium.org
Bug: 1027458
Change-Id: Id3eea0cc49037a24efcdaf321ea96f2d75663261
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207831
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
The helpers allow the implementation of screenshot tests in DevTools.
A screenshot test that makes use of the helpers is added for the
performance panel. The test is disabled because no screenshot test
infrastructure is available in our bots. Once this isn't the case the
test can be enabled and other screenshot tests added.
Screenshot tests are not added as a dedicated new suite but as
complementary to the interaction tests already in place. For this
purpose, the existing artifacts under test/screenshots/ are removed or
moved to be under test/interactions. The image_diff executables are
moved under third_party
Follow-up: Include dedicated lint rules files.
Bug: 1407638
Change-Id: I7106769b085b6aaa32ea4a089a840418c83536bb
DISABLE_THIRD_PARTY_CHECK=Including new library to third_party/
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190012
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
It is common for webpack to add a hash after each file in the
source map. These are not meaningful to the user and best left
hidden. Because files from source maps aren't the result of
http get queries it is reasonable to assume these are rarely
needed. The exception to the new rule is if the filename would
otherwise be empty we keep the query params.
Fixed: 1402657
Change-Id: I33649f37e65a7c44c3614124f6a4908132b286ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196927
Auto-Submit: Eric Leese <leese@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
The click helper now only accepts selectors so that it is
able to recover from unstable DOM situations. A new deprecated
helper clickElement is introduced for tests that cannot use a
selector currently. This should serve as a red flag that the
test might suffer from flakiness.
Bounding box and offset computation is removed for now. New
Puppeteer version allows providing relative click coordinates
so we need to use that.
Bug: 1411188, 1409768, 1411196, 1410437
Change-Id: I94a272184530842476bb2a879d862c4bd0930dba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4194329
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
For ambiguous file names, we now show a part of the path to that
file that helps to differentiate the breakpoint groups next to
the file name.
When differentiating ambiguous files, we try to find a part of the
url that is uniquely identifying a path in terms of the other
files, if possible. From that unique path, we only show the right
most folder name. If we cannot find such a unique path, we show the
whole path instead.
This happens e.g. for React, where it is common to have an index.js
file for each component.
Before: https://imgur.com/OEUR6bV
After: https://imgur.com/cLneY8H
Fixed: 1403924
Change-Id: Ib9fb822ada120af36618ac76d2c9e524f1c8435b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196916
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
This introduces a new uiLocationRangeToRawLocationRanges() method to the mapping layer which will be used by possibleBreakpoints() in the
BreakpointManager in the future to determine the set of raw location
ranges within which to ask V8 for breakable locations.
The new uiLocationRangeToLocationRanges() takes into account even
special cases like holes that can result from funny source maps, and in
the future should also be useful to compute the skip ranges for the
auto-stepping logic.
For the SourceFormatter ScriptMapping we kept the assumption that the
ranges must be contiguous even though they don't necessarily are (for
formatted documents with inline scripts), but the whole SourceFormatter
functionality is basically deprecated at this point and will soon be
removed (in-place pretty printing was enabled by default with M-111
already).
Bug: chromium:1409365
Change-Id: I3ec7db0ad32272a0af96c2c06f8506d4886bbe9e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196922
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Add option to bypass platformSpecificTextForSubMenuEntryItem since
it is not always needed on all items on the context menu.
Bug: chromium:1377770, chromium:1410776
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_mac_rel
Change-Id: I729775b5621ae5eae140e5333fb5f89f7d7ec8d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196926
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Prior to this change, SourceMap#reverseMapTextRange() would try to map a
range in a source mapped entity by computing the closest points in the
reverse mapping for the start and end position respectively. This does
work for most cases, but does not properly support a lot of the more
interesting cases. Most importantly it does not support the common case
where source maps have "holes" for source entities, or map the same line
of source code to multiple places in the generated code (inlining / tail
duplication as done by JSCompiler for example). The previous method also
did not properly support the case where an entry intersects with the
range, but the start position of the source map entry lies before the
range start position.
This CL changes the method to return a sequence of text ranges, and
addresses the more interesting cases. It also adds relevant test
coverage.
Bug: chromium:1409365
Change-Id: I40f268d1c7ea3c3284bf3f27d19578204ac821d9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196920
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
These classes were basically 1:1 wrappers around the protocol types, and
there's no reason to have them as separate classes as well. It just
makes things unnecessarily challenging to understand (because it isn't
immediately obvious what the difference is) and harder to reason about.
Also rename the RawLocationRange to LocationRange now and use that type
in the appropriate places.
Bug: chromium:1409365
Change-Id: I9ce5a3c272c5592a4ee9322fcdbf07832bae7063
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196914
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
* Added a 1px margin between the text and the warning icon
* Removed vertically aligning the color-mix to middle (all the other
swatches are aligned to baseline by default so this will be too)
* Normalized `hue` to be between [0 - 360] in LCH and OKLCH
Bug: none
Change-Id: I47ac345b12f11e435fe754f97f9b3158e89b8f68
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4194333
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Some colors define powerless copmonents, e.g., when lightness is 100, hue and saturation are irrelevant in the hsl space. With this CL, powerless components are set to 0.
In order to simplify testing and the API a little, also stop returning the "as-authored" original text for Color's asString method. Callers explicitly interested in showing the as-authored value should call the getAuthoredText accessor now.
Bug: 1073895
Change-Id: I6a93fbd5af4b8ae007122360bea3acb67c4b6aa5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4177291
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
This CL adds a new `UserCondition` type to mark user-authored
breakpoint conditions.
Note that there are only 2 places that can create these (modulo
pre-defined constants):
1) When we load breakpoints from settings storage
2) The result of the breakpoint edit dialog
Outside of those two places we should never have to cast a string
to this new type.
R=kimanh@chromium.org
Bug: 1027458
Change-Id: Id49fa42207b813e5380c7ccf30fe6ab761525411
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190003
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Breakpoint setting can take more time than loading the new content (and
is also unrelated to the new content loading), so we need to properly
wait for the breakpoint to migrate here. This is supported by the
findings that in the front-end screenshots of both failed runs mentioned
in https://crbug.com/1409857, the breakpoint is already set.
Bug: chromium:1408033, chromium:1336590
Change-Id: Ia5542cf72c192efab73a3aaf757a6a68c8af1d1d
Fixed: chromium:1409857
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190013
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>