Jaroslav Sevcik
481104acc0
Expose and test scope tree parser
...
This patch exposes the scope parser for wider use so that we can
reuse it for resolving source map names in scope view.
The parser is currently only exercised by several newly introduced
unit tests.
Bug: chromium:1322115
Change-Id: If3ffe0e87cac7e0cb557f60e83d9266193adde73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3624642
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org >
2022-05-11 09:00:52 +00:00
Jack Franklin
e839c0cf22
Enable long import wrapping for JS imports
...
DISABLE_THIRD_PARTY_CHECK=big clang format run against all files in
front_end and test/
Bug: 1319340
Change-Id: I1fff63cb07544ccd0e3059fc901f9a48ff4af13b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598879
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org >
2022-05-03 10:22:12 +00:00
Changhao Han
ced8121dfd
Include custom properties in CSSRuleParser
...
Bug: 1268754
Change-Id: If21278e5e5eb52626d6d02054509664d8fdf1257
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563071
Reviewed-by: Mathias Bynens <mathias@chromium.org >
Commit-Queue: Changhao Han <changhaohan@chromium.org >
2022-04-01 10:15:11 +00:00
Benedikt Meurer
3d369648ae
[popover] Fix hover preview for private fields.
...
The hover preview for private field accesses was broken if there was a
sourcemap, because it was removing the private id token from the
expression string. It was also broken in many cases for keyed property
accesses.
This refactors the tokenization logic to properly recognize (and
support) private id tokens, and to allow arbitrary text in between
'[' and ']' tokens, in particular things like `obj[x + 1]` will now
work correctly.
This adds a bunch of unit tests and also two e2e tests that check that
the popover preview works correctly in case of sourcemaps coming from
either TypeScript or Terser.
Fixed: chromium:1303407
Change-Id: I9ed76fe444af552e7e11ab7097d699b499fee395
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3513352
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org >
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org >
2022-03-14 07:48:23 +00:00
Jaroslav Sevcik
97a93b6671
Substitution of minified identifiers in expressions
...
Without this patch, we only substituted single identifiers. With
the patch, we substitute in arbitrary expressions. (Still only
as an experiment.)
Bug: chromium:1297047
Change-Id: Ifae5cab1a42823559751fbd9dc515edfae02255e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3487866
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org >
2022-03-09 09:13:21 +00:00
Jaroslav Sevcik
83680ec3db
Implement variable substitution for expressions
...
This implements naive substitution in JavaScript expressions.
This is currently unused, but it is covered with unit tests.
The idea is to use this for substituting unminified variables
with minified ones (using the information from source maps).
Bug: chromium:1297047
Change-Id: I244d9137c9dedda1bc5d8a376fcf3b55401e4071
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3477108
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org >
2022-02-24 12:13:00 +00:00
Tim van der Lippe
9a75d3ecab
Change file extension for upcoming esbuild integration
...
R=tikuta@chromium.org
Bug: 1278663
Change-Id: I6386cc304bd19e9f583b1a3ff025945e34074a42
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3428452
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Takuto Ikuta <tikuta@chromium.org >
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
2022-02-01 12:01:00 +00:00
Tim van der Lippe
b67a3f0877
Fix GN dependencies
...
The formatter model creates a worker that references the formatter_worker
entrypoint. However, it wasn't depending on it as such. Therefore,
to ensure deterministic building, we have to add the entrypoint as
dependency to the model. That required another tidy up, as there was
a type defined in the model that was used in the entrypoint. We can
move that type to the entrypoint to circumvent the issue.
Additionally, fix the dependency on Images and themeColors.css to make
them available as expected when running unit tests.
R=jacktfranklin@chromium.org
Fixed: 1284865
Change-Id: I9d1eb6877629ccb5dd5ed105a10acf6291275610
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3369364
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2022-01-06 12:26:09 +00:00
Tim van der Lippe
12bcadba35
Migrate to private class members in entrypoints/
...
This also enables the ESLint rule for this folder
R=jacktfranklin@chromium.org
Bug: 1222126
Change-Id: I872ac654d4a37946aba75def17cc1f1aa8ad893c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3341610
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
2021-12-16 10:31:28 +00:00
Tim van der Lippe
e343bdfafb
Migrate to private class fields in entrypoints/
...
R=szuend@chromium.org
Bug: 1222126
Change-Id: I6863d8180c6a44a0e607e860bbce89bf9d3642ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3338351
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
2021-12-15 11:49:27 +00:00
Marijn Haverbeke
3ea8755408
Remove machinery surrounding CodeMirror 5
...
The third_party module is still there because a few of its scripts are
used for tokenizing.
R=tvanderlippe@chromium.org
Bug: 1241848
Change-Id: I576b7c1a0fb6c78ca83422fdb9117f169a75efb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3295489
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-11-29 15:10:46 +00:00
Tim van der Lippe
379c288384
Allow meta-files to import relative entrypoints
...
We previously disabled this rule in a lot of places to workaround the
fact that the rule wasn't adhering to importing entrypoints in meta
files. Instead, let's update the rule to make it clear that this pattern
is expected and fine.
R=alexrudenko@chromium.org
Bug: 1271490
Change-Id: Idd139b42d9bb27f1f20e573b31bcd5efff8815af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3289221
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2021-11-18 14:53:06 +00:00
Brandon Goddard
3531d9447a
CSP: remove new Function call in ESTreeWalker
...
This CL removes a call to new Function() in order to help remove the
need for 'unsafe-eval' in the devtools frontend
Bug: 1259386
Change-Id: I46487a2591cf7bbccc627b6771cc057a6e05135d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3219661
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com >
2021-10-13 15:28:52 +00:00
Jan Scheffler
d5bf879558
[Underscore Migration] Migrate entrypoints
...
This patch is part of the underscore migration that adds the private
keyword to all properties that start with an underscore and removes the
underscore.
Bug:chromium:1207342
Change-Id: Iec114859ae3f46457bafa2d823e11add202c6eb2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3077887
Commit-Queue: Jan Scheffler <janscheffler@chromium.org >
Auto-Submit: Jan Scheffler <janscheffler@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-08-07 15:52:16 +00:00
Kriti Sapra
56daf78ddb
Updated no-multiple-empty-lines to only have 1 as max
...
DISABLE_THIRD_PARTY_CHECK=updated linting formatting
Bug: 1106746
Change-Id: I371bca95b7cf1e8b7eaa4f9e7c3860af4eedee3e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3057042
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-07-28 14:10:15 +00:00
Will Hernandez
649f1289e0
JSON formatter respects users indentation level
...
When creating this JSON formatter, I shouldn't have manually set the indentation level. JSON formatter now respects the user's indentation level provided in
Settings > Preference > Sources section > Default indentation
R=tvanderlippe@chromium.org
Fixed: 998674
Change-Id: I41ccc1b0ef85f8551f7c9edef3f1b435ed9a16b8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055035
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-07-27 14:35:20 +00:00
Tim van der Lippe
c2cbf32af8
Remove no-unused-vars suppressions
...
We don't use this rule any longer. Therefore, any supression of
the rule is considered a no-op. (We use the typescript-eslint
version instead).
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I13595fffc980db423ee8ad5d133fd187d0dbdbbb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3053746
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-07-27 09:48:39 +00:00
Tim van der Lippe
877f04aa0e
Remove eslint-disable statements from type imports
...
We no longer use the no-unused-vars and instead use the version
of typescript-eslint. The latter can properly detect unused
type-import usages. Therefore, we can remove the eslint-disable
statements, which are essentially noops.
This CL is the result of replacing
```
import type (.*) // eslint-disable-line no-unused-vars
```
with
```
import type $1
```
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I141edcb7125e414c405760af1e4058bfdc6e30f3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3048473
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-07-26 12:53:27 +00:00
Tim van der Lippe
2f0dcbabb5
Fix formatting of SCSS files
...
While we had infrastructure to correctly format SCSS files, formatting
a `.scss` file never worked, as the formatter worker missed the
case to do so.
Therefore, add the case and while we are at it, add corresponding
unit tests. These unit tests were taken from
third_party/blink/web_tests/http/tests/devtools/syntax-highlight-css.js
which was only asserting on AST structure, rather than formatted
output.
R=jacktfranklin@chromium.org
Bug: 1203169
Change-Id: I5453858c3493168db9b1403f9ddab205488ad8d1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2978355
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-22 14:44:08 +00:00
Tim van der Lippe
4965ccdd03
Update types packages
...
This includes the fixes for istanbul-reports and ESTree.
Some functional changes were required to make the type checker
happy again.
DISABLE_THIRD_PARTY_CHECK=Functional changes for types
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I57964301d51b5e94cd6ca8a5453bdc51ca6d9758
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2933803
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-02 16:36:54 +00:00
Will Hernandez
250c88b4d0
Allow JSON responses to be pretty printed.
...
whatChanged:
front_end/entrypoints/formatter_worker/JSONFormatter.ts
created a JSONFormatter file to parse minified JSON files.
front_end/core/common/ResourceType.ts : line 298 : isDocumentOrScriptOrStyleSheet()
Added the resourceType of ‘xhr’ to allow a pretty print button to be set on .json files.
sample video of working pp:
Video: https://www.loom.com/share/2cbe6414caab4db1bdfd054cb3958119
Reproducible steps:
visit: https://tv.youtube.com/welcome/
open devtools
select network tab
filter only json network responses
Reload page and click on any json response.
attempt to pretty print minifed json
R=tvanderlippe@chromium.org
Fixed: 998674
Change-Id: Idcc69b2f43d2e46882488c3bd6d4d933605fca6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2909881
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-02 16:21:44 +00:00
Tim van der Lippe
665f504502
Fix formatting for class definitions
...
The version of TypeScript we use now properly emits class field
definitions. Since this is an ES2022 feature, we need to bump
the version of Acorn to support parsing class field definitions.
Additionally, we need to update the formatter to handle the
spacing around the tokens in a class field definition.
We can revert the local patch to Acorn once
https://github.com/acornjs/acorn/pull/1041 is merged. I will
also work on updating the ESTree type definitions.
R=bmeurer@chromium.org
Bug: none
Change-Id: Id2232e6ce2d8a0a35002e87f181259bb60d26feb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2930379
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-02 12:11:54 +00:00
Simon Zünd
d74e151c60
Add missing dependencies
...
Experimenting with remote build execution revealed that many TypeScript
targets are not specifying all their dependencies in GN.
R=tvanderlippe@chromium.org
Bug: 1211289
Change-Id: Ie4d1dbedd1d8190595281bfe3715169b61cba3d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912735
Commit-Queue: Simon Zünd <szuend@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-25 11:13:33 +00:00
Tim van der Lippe
443cc1e549
Move CodeMirror types to third_party/codemirror
...
Some files that don't import codemirror itself do refer to types
as declared by CodeMirror, which therefore need to implicitly
side-effect import the types. The reason being that these files
are used in both the standalone and full version of CodeMirror
(depending on whether they run in a worker context or not).
Therefore, they can't import `third_party/codemirror/codemirror.ts`,
as that would only contain the full version.
DISABLE_THIRD_PARTY_CHECK=Tsc update
R=szuend@chromium.org
Bug: 1209844
Change-Id: I8719a15b40e9d9f085b24c05af4372ad84812d1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897979
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-05-18 10:07:14 +00:00
Tim van der Lippe
c78a7193d7
Move ESTree types to acorn
...
Not every single ts_library invocation has (and should have) access
to the ESTree types. Therefore, re-export these types via Acorn,
which is the only user of these types.
This also improves the build performance, as we are no longer
rebuilding all of DevTools when these types change.
DISABLE_THIRD_PARTY_CHECK=Tsc cleanup
R=szuend@chromium.org
Bug: 1209844
Change-Id: Ib182ba4f7877d26eea844ac75180542ce2bac44a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2900444
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-05-18 05:24:23 +00:00
Jack Franklin
a75ae7cbb3
Enforce import type when importing TS types.
...
Bug: none
Change-Id: I02ef1182143b7fe091ce92d59f04ac2188903e0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886925
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2021-05-11 14:00:22 +00:00
Tim van der Lippe
6892da0014
Add GN visibility to entrypoints
...
R=jacktfranklin@chromium.org
Bug: 1202788
Change-Id: I5ff52856d177529c26655e79f1fa5db96fa06196
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2856775
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-04-29 08:54:21 +00:00
Tim van der Lippe
9bd3674c17
Reland "Fix acorn-loose entrypoint and remove its exemption"
...
This reverts commit 508aa46b98 .
Reason for revert: Fixed compilation error
Original change's description:
> Revert "Fix acorn-loose entrypoint and remove its exemption"
>
> This reverts commit 1f3df9a2c0 .
>
> Reason for revert: https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8848718136613443488/+/u/compile/stdout
>
> Original change's description:
> > Fix acorn-loose entrypoint and remove its exemption
> >
> > Third_party folders are no longer exempted from importing, to prevent
> > recompilation issues. As an example, crbug.com/1203165 showed that
> > upgrading a third_party package can introduce non-determinism.
> >
> > R=jacktfranklin@chromium.org
> >
> > Bug: 1203165
> > Change-Id: I7bb3eb8b2038647ae0bef35bf21474c440177743
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854674
> > Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
> > Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
>
> Bug: 1203165
> Change-Id: Ic2a6279bf48df0d79dd63a139b777b2a251322fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854682
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Bug: 1203165
Change-Id: Id7d7427017edbc0228402e087e580133c36f1f46
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854683
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-04-28 10:43:34 +00:00
Tim van der Lippe
508aa46b98
Revert "Fix acorn-loose entrypoint and remove its exemption"
...
This reverts commit 1f3df9a2c0 .
Reason for revert: https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8848718136613443488/+/u/compile/stdout
Original change's description:
> Fix acorn-loose entrypoint and remove its exemption
>
> Third_party folders are no longer exempted from importing, to prevent
> recompilation issues. As an example, crbug.com/1203165 showed that
> upgrading a third_party package can introduce non-determinism.
>
> R=jacktfranklin@chromium.org
>
> Bug: 1203165
> Change-Id: I7bb3eb8b2038647ae0bef35bf21474c440177743
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854674
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Bug: 1203165
Change-Id: Ic2a6279bf48df0d79dd63a139b777b2a251322fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854682
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
2021-04-28 09:45:05 +00:00
Tim van der Lippe
1f3df9a2c0
Fix acorn-loose entrypoint and remove its exemption
...
Third_party folders are no longer exempted from importing, to prevent
recompilation issues. As an example, crbug.com/1203165 showed that
upgrading a third_party package can introduce non-determinism.
R=jacktfranklin@chromium.org
Bug: 1203165
Change-Id: I7bb3eb8b2038647ae0bef35bf21474c440177743
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854674
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-04-28 09:08:53 +00:00
Tim van der Lippe
ce9a3c82a8
Consolidate owners in entrypoints/
...
R=yangguo@chromium.org
Bug: 1187573
Change-Id: Id2a6ca1c56165076c3b8d685795c4b286b9687a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2848234
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-04-26 13:48:40 +00:00
Tim van der Lippe
a9ae810860
Move formatter to models/formatter
...
R=aerotwist@chromium.org
Bug: 1187573
Change-Id: Idc2b0f88665e276f692515afe667517a4e5ed245
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2831975
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-04-19 14:18:33 +00:00
Mathias Bynens
3a569c742c
Correctly handle CSS whitespace
...
JavaScript whitespace [1], as observable through `\s` in regular
expression patterns or string methods such as `.trim()`, matches the
following code points:
- U+0009 CHARACTER TABULATION
- U+000A LINE FEED (LF)
- U+000B LINE TABULATION
- U+000C FORM FEED
- U+000D CARRIAGE RETURN (CR)
- U+0020 SPACE
- U+1680 OGHAM SPACE MARK
- U+2000 EN QUAD
- U+2001 EM QUAD
- U+2002 EN SPACE
- U+2003 EM SPACE
- U+2004 THREE-PER-EM SPACE
- U+2005 FOUR-PER-EM SPACE
- U+2006 SIX-PER-EM SPACE
- U+2007 FIGURE SPACE
- U+2008 PUNCTUATION SPACE
- U+2009 THIN SPACE
- U+200A HAIR SPACE
- U+2028 LINE SEPARATOR
- U+2029 PARAGRAPH SEPARATOR
- U+202F NARROW NO-BREAK SPACE
- U+205F MEDIUM MATHEMATICAL SPACE
- U+3000 IDEOGRAPHIC SPACE
- U+FEFF ZERO WIDTH NO-BREAK SPACE
CSS whitespace [2] on the other hand is much more limited:
- U+000A LINE FEED (LF)
- U+0009 CHARACTER TABULATION
- U+0020 SPACE
Additionally, CSS pre-processing [3] normalizes any of the following to
U+000A LINE FEED (LF):
- U+000C FORM FEED
- U+000D CARRIAGE RETURN (CR)
- U+000D CARRIAGE RETURN (CR) followed by U+000A LINE FEED (LF)
Prior to this patch, we were implicitly using JavaScript-specific
definitions of “whitespace” to process CSS source text, resulting in
several issues, of which the reported bug is just one example.
With this patch, we now correctly consider CSS’s definition of
“whitespace” when processing CSS source text.
[1]: https://tc39.es/ecma262/#prod-WhiteSpace
[2]: https://drafts.csswg.org/css-syntax/#whitespace
[3]: https://drafts.csswg.org/css-syntax/#input-preprocessing
Bug: chromium:1193337
Change-Id: Iaeadbd4b033dbce9a5b03bd22c2cc6c0a60f8016
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2831439
Reviewed-by: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Mathias Bynens <mathias@chromium.org >
2021-04-16 13:29:05 +00:00
Tim van der Lippe
7256e5e754
Move formatter_worker to entrypoints/formatter_worker
...
R=aerotwist@chromium.org
Bug: 1187573
Change-Id: I12afe682c2781651ff7cdc1650843010e2c8cbfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2826294
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-04-15 10:30:32 +00:00