Commit Graph
3200 Commits
Author SHA1 Message Date
Simon Zünd bf8e3bda61 [linkifier] Add option to reveal the breakpoint edit dialog
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>
2023-02-01 10:48:56 +00:00
Elorm Coch e730b99520 Reland "Improves voice accessibility for row elements in Network and application Panels."
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>
2023-01-31 20:09:02 +00:00
Alex Rudenko 643c1227a3 Remove clickElement in live-edit-moving-breakpoint_test.ts
Bug: 1411188
Change-Id: I30b42b3e8cef6277fb501619a3df0550c8514243
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207840
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-01-31 15:21:27 +00:00
Andrés Olivares b0384e77be Lint against screenshot tests outside perf panel interaction test base
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>
2023-01-31 15:01:42 +00:00
Alex Rudenko 1ec35fcf3e Remove usage of clickElement in data_grid_controller_test.ts
Bug: 1411188
Change-Id: If191586f91dcb46f4662965842a842582b68b570
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207839
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-01-31 14:27:00 +00:00
Jaroslav Sevcik 05fdb64cd2 Throttle layouting source tree items when adding them to the Navigator View
Bug: none
Change-Id: Ia7470170ed0b3b7a4bb3605e7ffb306224059c20
Signed-off-by: Victor Porof <victorporof@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190007
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2023-01-31 14:24:39 +00:00
Alex Rudenko 1356402107 Add click element retries
Fixed: 1411644
Change-Id: Id7152f406e5086a70c59f7c24e4c7e099578da5a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207835
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2023-01-31 13:09:41 +00:00
Simon Zünd 9762db476c Add sourceURL comment for conditional breakpoints and logpoints
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>
2023-01-31 12:46:39 +00:00
Alex Rudenko afbc6c6e3a Fix flaky hover tests
Adds a hover and hoverElement helpers similar to click
and clickElement.

Fixed: 1411185
Change-Id: I14498d7ac7252eaa5e9cc5e3ece60a08ae46c942
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207832
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-01-31 11:30:40 +00:00
Andrés Olivares 30f4469ea7 Add screenshot tests helpers
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>
2023-01-31 10:21:47 +00:00
Danil Somsikov 211ea4bc1b Simplify AppManifestView test.
Using an existing custom event instead of spying on the throttler makes
the test more direct.

Bug: 1410071
Change-Id: I8fcf7de92dfa2bd3603a856da26e43bf1a691260
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207830
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-31 09:57:25 +00:00
Al Muthanna Athamina 99d420146c [E2E] Convert shadow-dom-modify-chardata Layout test to Mocha test
Bug: chromium:1377770
Change-Id: I4dca5c5cddcf4b1d33d1b888815b330cca9f2d03
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4203272
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
2023-01-31 09:36:35 +00:00
Alex Rudenko 6aa5c62300 Reduce flakiness for a memory test
Bug: none
Change-Id: Ie4eea3486927552617e36ec355a77bfc37989f9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207828
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2023-01-31 08:49:32 +00:00
Eric Leese 14e8b46d06 Hide query params for files from source maps.
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>
2023-01-31 08:42:42 +00:00
Danil Somsikov 251d779807 Handle cookiePartitionKey coming via ExtraRequestInfo.
Bug: 1383233
Change-Id: I55e70e0dbeee534c40d1e9c6a0d80fe122a0d9ae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196928
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
2023-01-31 07:50:17 +00:00
Alex Rudenko e92fe9d745 Refactor the click helper to use Puppeteer's methods
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>
2023-01-30 14:27:54 +00:00
Kim-Anh Tran 0801f17e15 [BreakpointView] Show differentiating path for ambiguous file names
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>
2023-01-30 13:46:16 +00:00
Benedikt Meurer 92cb106a23 [bindings] Fix BreakpointManager#possibleBreakpoints()
Use the newly added uiLocationRangeToRawLocationRanges() to compute the
correct location ranges to ask V8 for possible breakpoints, even in the
presence of several inline <script>s within a line or funny sourcemaps.

Bug: chromium:1409365
Change-Id: I52ef6e7083f522f1a8767a2199af910983663146
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4203269
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-30 13:38:25 +00:00
Benedikt Meurer ae824e6ff5 [bindings] Introduce uiLocationRangeToRawLocationRanges().
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>
2023-01-30 11:47:19 +00:00
Benedikt Meurer 83d7dbb786 [text_utils] Introduce TextRange.intersection().
This adds a new intersection() method to TextRange, which will be used
subsequentely to implement correct containment of location ranges in
https://crrev.com/c/4196922.

Bug: chromium:1409365
Change-Id: Ied32933df6de64c8b53c50fb6f44744980767385
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196932
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-30 11:47:19 +00:00
Benedikt Meurer 63d268dccc [sources] Fix TextRange.containsLocation().
This is split out from https://crrev.com/c/4196922, fixing the treatment
of end offsets for inline scripts as exclusive.

Bug: chromium:1409365
Change-Id: If1508b5d79f204f339ca0b7acce1a5d65bff7375
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196931
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-30 11:47:19 +00:00
Alex Rudenko 0b8b888ec0 [Recorder] Implement Recorder extension API for replay
Chromium documentation: https://crrev.com/c/4161597
Doc: go/devtools-recorder:replay-extensions
Bug: chromium:1400243
Change-Id: I4ab5d6cc7c30a5a9970c5099a8cdff179c2f3722
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4117074
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2023-01-30 09:28:34 +00:00
Randolf 18fb49bad8 Separate modifier key press from click helper
This CL separates the modifier key press from the click helper to lower the complexity of the click API and improve overall API safety of using modifier clicks.

Bug: 1411188
Change-Id: Ide04871c14589d7b60dd361d9a607ea3d8f75b28
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4201723
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2023-01-30 09:27:31 +00:00
Wolfgang Beyer 556eac45ed Skip failing e2e-tests on Mac
Bug: 1411185
Change-Id: Ib9ba64c4bad470d7ef6355f51e65fa7332dd4f6f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196930
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
2023-01-30 08:42:18 +00:00
Al Muthanna Athamina 44ac91669b [E2E] Add option to bypass platformSpecificTextForSubMenuEntryItem
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>
2023-01-30 06:41:49 +00:00
Randolf cc8925401c Update puppeteer to 19.6.2
DISABLE_THIRD_PARTY_CHECK=Files need updating

Bug: 1410437
Change-Id: I510c33a2435e03a6d0bcc389b062741490161083
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196856
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-28 00:27:27 +00:00
Wolfgang Beyer 52239f1e83 Skip failing e2e-test on Mac
Bug: 1410776
Change-Id: I2d06ad765122a2e6f6d2016488d95c34b82f8093
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196925
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2023-01-27 16:07:26 +00:00
Danil Somsikov 76ea8b3f61 Roll protocol
DISABLE_THIRD_PARTY_CHECK=Handle rename done in crrev.com/c/4126918
Bug: 1383233
Change-Id: I2b4de01db4e6c0d77da07bcaf119d80aca655ab0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196923
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2023-01-27 13:42:19 +00:00
Benedikt Meurer 40109c0d50 [sourcemaps] Make SourceMap#reverseMapTextRanges() yield correct ranges.
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>
2023-01-27 11:35:53 +00:00
Al Muthanna Athamina 839b02d036 [E2E] Convert switch-panels-while-editing-as-html Layout test to Mocha test
Bug: chromium:1377770
Change-Id: Ic599a4c7df11ac8940121bbe28d95b17342f2633
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4194332
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2023-01-27 10:42:42 +00:00
Filipa Senra 226d2bf4d7 [Privacy Sandbox] Add PSExtensionsAPI message for deprecation issue
This CL ads the deprecation message and milestone to be shown when the
PrivacyExtensionsAPI shows up on the Issues DevTools Panel.
See http://go/cl-c/4166933 and http://go/cl-c/4171292 for context.

Bug: 1378703, b/254414152
Change-Id: Ifd4502a895a7fbfff04a1025054922b08b9295ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4171293
Commit-Queue: Filipa Senra <fsenra@google.com>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2023-01-26 18:32:46 +00:00
Benedikt Meurer 41e852dd83 [cleanup] Remove redundant ScriptPosition and LocationRange types.
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>
2023-01-26 12:38:01 +00:00
Simon Zünd c96b7aaec0 [cleanup] Remove zero-width-space workaround in Linkifier
The crash was fixed (see https://crbug.com/931164).

This allows us to remove the zero-width-space usage of the linkifier
and every site that was checking for it.

R=kimanh@chromium.org

Bug: 1057021
Change-Id: I691789a22e0eec5f6609b0f7c4b7d0d8ebffd544
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196918
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-01-26 12:21:49 +00:00
Ergün Erdoğmuş b3b2afb9ac [Color] Fix small visual issues in color features
* 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>
2023-01-26 11:56:45 +00:00
Philip Pfaffe f600600cf5 [Colors] Selectively show alpha formats in the color conversion menu
Legacy color formats rgb and hex can distinguish between alpha formats
and non-alpha formats. Only show the matching format in the color
conversion menu.

Bug: 1073895
Change-Id: I041ae13ee6fe3f515f175e3f3d2accc324d4bb78
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196519
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2023-01-26 11:11:07 +00:00
Philip Pfaffe 77c04d83f0 [Colors] Create dedicated classes for HSL and HWB colors
This allows us to keep track of clipping/powerless components in these
spaces as well. Before the info was silently dropped when converting to RGB.

Drive-by: Fix a typo and introduce ColorXD utility types to denote "raw" multichannel colors.
Bug: 1073895
Change-Id: Ifbddd0f2ec8c9fafdc3e08429552030f228ddece
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190009
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-01-26 10:27:20 +00:00
Philip Pfaffe 1275481ec0 [Colors] Account for powerless components
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>
2023-01-25 18:23:19 +00:00
Wolfgang Beyer d4a45e987e DataGrid: when filtering, ignore content of invisible cells.
Fixed: 1410161
Change-Id: I111acc0ee8295edd46a994ae83159198526a5bb4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4194330
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2023-01-25 15:56:35 +00:00
Simon Zünd 1147afd897 Add unit tests for Breakpoint#backendCondition()
R=kimanh@chromium.org

Bug: 1027458
Change-Id: I72ed31fa8409459fa4cf7b37a758b81e4ca10873
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190014
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-01-25 12:14:30 +00:00
Ergun Erdogmus 9f3432a40c Show display-p3 color space rectangle for wide gamut supported syntaxes
Fixed: 1408777
Change-Id: Idd56d70fde2bcda54b585c38096218fa0b25df1d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4189996
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>
2023-01-25 11:05:52 +00:00
Andrés Olivares bca0739541 Add support for heading token in MarkdownView
Support instances of `# heading` until a depth of 6.

Bug: 1378184
Change-Id: I6bd7cdf1f5435a86602174a8aace3ff68d6e4cd2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3985910
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2023-01-25 10:12:17 +00:00
Simon Zünd d58285eeca Add branded type for user-authored breakpoint conditions
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>
2023-01-25 09:31:59 +00:00
Simon Zünd 25650e0d5d Store breakpoint conditions as entered by the user
This CL switches how we store logpoints. Instead of storing the
already wrapped (in console.log) expression, we store the expression
as it was entered by the user and wrap it on-demand.

To make this work nicely with existing logpoints, we add a settings
migration that removes the prefix/suffix.

R=jarin@chromium.org, kimanh@chromium.org

Bug: 1027458
Change-Id: I58a2f0192d5b96fbe1afcf30b2015cb1360067ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190001
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
2023-01-25 07:58:36 +00:00
Benedikt Meurer 07504fdc3e [e2e] Unflake HMR breakpoint migration test.
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>
2023-01-25 06:58:50 +00:00
Wolfgang Beyer 84175b83e4 [e2e] Disable flaky e2e-test on mac
Bug: 1409857
Change-Id: I3fec624b70e0796548fab0a7b983f50343f5ae3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190010
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2023-01-24 15:10:48 +00:00
Benedikt Meurer f3c717dee8 [sourcemaps] Port two previously removed web tests to unit tests.
This adds two cases from the http/tests/devtools/text-source-map.js
(which was previously removed as part of https://crrev.com/c/4161608)
back as unit tests, to ensure that we cover these cases.

Bug: chromium:1262113, chromium:611738
Change-Id: I2f410a10d7107cc3e89f0f43927ce84f8abde103
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190002
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-24 10:40:38 +00:00
Al Muthanna Athamina f38525585e [E2E] Convert elements/styles-3/styles-disable-inherited Layout test to Mocha test
Bug: chromium:1377770
Change-Id: I4ec13a57e3f8d7624c8c967b7b9d20bf15a030ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4129517
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
2023-01-24 09:50:25 +00:00
Simon Zünd 576db2d0f5 Use isLogpoint instead of checking for the prefix in test
R=kimanh@chromium.org

Bug: 1027458
Change-Id: Ieb5a903a6a88e82d9d795bfe7082a1c903fdddd3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4190000
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2023-01-24 09:21:48 +00:00
Kim-Anh Tran b6c8a19b39 [BreakpointView] Add checkbox to disable/enable breakpoints in group
This CL adds a checkbox that appears on hovering over the file name.
The checkbox is a shortcut to disable/enable all breakpoints that
are grouped underneath that file.

Drive-by: Updated wrong details tag closure, and some spacing/alignment

Before: https://imgur.com/6triQ9i
After: https://imgur.com/C3zJWo1
Fixed: 1402891
Change-Id: Ia681d2f9457cb6f32a323fbf7b322968bb2c9dd0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4187236
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2023-01-24 06:22:15 +00:00
Simon Zünd abf8625f96 [e2e] Disable two flaky tests on mac
Bug: 1409768,1409770
Change-Id: Id166c15227b5e6f02ce16d6e34286df9ef0dd7bc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4189997
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2023-01-24 06:06:22 +00:00