Commit Graph
42 Commits
Author SHA1 Message Date
Tim van der Lippe cbdf5f2baa Migrate upperBound to array-utilities
R=szuend@chromium.org

Bug: 1050549
Change-Id: Icee0883ab986fe08d9766272549f5ed66aee8574
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2644901
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-25 12:21:23 +00:00
Tim van der Lippe d7cfd14814 Fix no-implicit-coercion errors in front_end/
R=jacktfranklin@chromium.org

No-Presubmit: True
Bug: 1082789
Change-Id: Ic77884bf7e9b5dc74053915b3b10699368841b66
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2595268
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-07 12:40:16 +00:00
Patrick Brosset 07f478f0cc Grid: Remove the cssGridFeatures experiment flag
This experiment has been enabled by default in September 2020:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416525

It is time to remove it and graduate the feature to a non-experimental
state.

Bug: 1162894
Change-Id: I9138e20acd191db585f2c6b526f7430121916fef
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2609911
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2021-01-06 09:38:53 +00:00
Mathias Bynens 00e1aac922 Support forcing the CSS :target state
This patch extends the existing “force element state” UI to support
emulating the CSS :target pseudo-class.

Screenshot: https://i.imgur.com/oS5dLbi.png
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/2575668
DevTools DEPS roll: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2586737

Bug: chromium:1156628
Change-Id: Id03f52b82336a602af91a259cd6bb5f53e877160
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581544
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-21 15:20:56 +00:00
Tim van der Lippe 2e38eeaf9f Remove all comments with only the unrestricted annotation
The unrestricted annotation is Closure-specific and can be removed.
This patch removes all comments with only the unrestricted annotation
in them.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: Iba0723644f53f5307c3077d341271af86becc32a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569758
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-02 15:25:32 +00:00
Benedikt Meurer caac7f008d [refactor] Allow undefined for UI location columns.
Currently the devtools-frontend doesn't really distinguish between
UI locations that point to the first column (represented as column
number 0) and UI locations that refer to the whole line, and somehow
we managed to get away with this mixed state. But for the language
plugins to really provide a consistent stepping / breakpoint experience
we need to preserve the information of whether a location refers to the
whole line or to the first column.

The communication to the language plugin continues to pass numbers
for backwards compatibility, using `-1` to state the absence of
column information (i.e. indicating that the location refers to the
line as a whole).

Also-By: pfaffe@chromium.org
Bug: chromium:1153123, chromium:1055327
Change-Id: I030da16e34ac02c259bfd9539e50b77ca18347db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562350
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2020-11-27 09:21:44 +00:00
Tim van der Lippe 3c7eedcd60 Remove all definitions of usesObjectNotation
This was a temporary method, used during the migration to use
objects in dispatcher callbacks. Since all dispatchers now receive
the event as an object, we can remove these temporary methods.

R=aerotwist@chromium.org

Fixed: 1138492
Bug: 1011811
Change-Id: Ib7fbfae567ebc9b2be0a5d760458e5b0c7edc12e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484723
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-20 10:59:51 +00:00
Tim van der Lippe e6d60bea78 Typecheck sdk/CSSModel.js with TypeScript
R=sigurds@chromium.org

Bug: 1011811
Change-Id: I75be700c32b556544c6a91760ed5e2644f6a8adb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484717
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-10-19 14:16:34 +00:00
Simon Zünd ca6b6027b4 [ts] Type-check sdk/CSSRule.js with TypeScript
R=tvanderlippe@chromium.org

Bug: chromium:1011811
Change-Id: I649f35fe26371d592c02edd30c1fca53fc63ffea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2388385
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-09-07 06:22:28 +00:00
Sigurd Schneider f1b9b50369 Fix bug in async function _pollComputedStyleUpdates
The async function _pollComputedStyleUpdates checked whether
_isCSSPropertyTrackingEnabled before doing an await, but not again
after that. The state can change during the await. This lead to
an object becomming null in the meantime, leading to an exception.

Additionally, the dispose() of the CSSModel would trigger a
message to the agent of a already closed target.

Bug: chromium:1066772, chromium:1121534
No-Tree-Checks: true
Change-Id: Ife63bd3a68d6440ffbb2113c78204bae2cf81d43
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2374209
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2020-08-25 12:34:40 +00:00
Changhao Han c71a9c2930 Enable real-time grid adorner
Grid design doc: https://docs.google.com/document/d/1W40pBHV9NearidljNYiXNAT15zsxCgoVXlKYolkW9-E/edit

Backend CL: https://crrev.com/c/2246587

Screencast: https://imgur.com/a/tONHmbE

Bug: chromium:1066772, chromium:1047356
Change-Id: Iaf742678e016949bc9c73f639f2a4865a7c66b4c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2352715
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-08-13 17:39:30 +00:00
Alex Rudenko 25a810222f Warn when font-variation-settings are not used correctly
When font-variation-settings don't match the one supported by
relevant font faces, display a warning icon with warnings next
to the font-variation-settings property in the Styles panel.

Screenshot: https://i.imgur.com/JaHEvn1.png

Bug: 971878
Change-Id: I19a83bc003c282e19585edeabe0650e43bc4a36a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2292280
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-07-16 06:38:21 +00:00
Alex Rudenko 5b6a769ee1 Add an option to emulate missing local fonts
This CL adds a new setting to the Rendering panel which allows
emulating missing local fonts.

Backend CL: https://chromium-review.googlesource.com/c/chromium/src/+/2260013
Screenshot: https://i.imgur.com/VVA6aeN.png

Bug: 384968
Change-Id: Ic0b2ad562486f91e3ef51ec841400f73ffb0c7d4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2270169
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-06-29 09:07:42 +00:00
Sigurd Schneider f96d710ffa Remove unnecessary @unrestricted annotations from front_end/sdk
This CL removes 35 unnecessary @unrestricted annotations from
classes in front_end/ui.

Bug: chromium:1011811, chromium:1079233
Change-Id: I753a95f51e3ce8af6c7344ddc292c08fbb936184
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209085
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-05-20 15:17:43 +00:00
Tim van der Lippe c1b68e2514 Emit fixes for TypeScript 3.9.2
These fixes are required to fix the declaration files emitted
with TypeScript 3.9.2

R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: If7c29221d31c228b0d0bbbd2949168de0f68444d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199079
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>
2020-05-14 10:10:34 +00:00
Tim van der Lippe dc9d2515c5 Add @ts-nocheck annotations to sdk and typecheck sdk/Connections.js
To enable full parallelization of all files in sdk/, we can add the
@ts-nocheck annotation to all files. This suppresses existing
TypeScript errors in these files.

We can then one-by-one remove these annotations and fix the issues
reported in these files. This allows us to parallelize the work
and work on many files at the same time.

As a starter, I typechecked sdk/Connections.js to verify that
typechecking works while all other files are not checked yet.
I did do so by locally suppressing all TypeScript errors in
SDKModel.js and remove the `instance` method on `TargetManager`.
I then confirmed that rebuilding with TypeScript correctly
fails on the missing method, but does not require SDKModel.js
itself to be typechecked.

Bug: 1011811
Change-Id: I46de3839f7d837e951967dd932218bda00c6ad5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2156352
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-04-22 13:17:59 +00:00
Simon Zünd 182134236e Rename namespace import for protocol_client to ProtocolClient
R=tvanderlippe@chromium.org

Bug: chromium:1011811
Change-Id: Idf3e9eb8f6d52db78f563de53b7576ec6c9b9cdc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107557
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-19 12:08:52 +00:00
Simon Zünd 3b0c540211 Rename front_end/protocol to front_end/protocol_client
This CL is part of the work to switch over to the TypeScript compiler
for type checking.

R=tvanderlippe@chromium.org

Bug: chromium:1011811
Change-Id: Ic709a193b252df7e9027c00cf20d8afe525a215a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107539
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-18 18:06:20 +00:00
Paul Lewis 2d7d65c5e8 [global] Remaps self.Common.settings
This CL changes references to self.Common.settings (the global
instance of SDK.Common.Settings) over to
Common.Settings.Settings.instance(). To keep both TypeScript and
Closure happy we must make a method on the Settings class itself,
since it only allows private constructors to be accessed by static
methods on the class.

Bug: 1058320
Change-Id: I04afc8caf64acf29cdda13ef03ad05cfff4786a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091450
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-16 22:04:07 +00:00
Simon Zünd 7cdf69dbbf [utilities] Remove call-site of Array#remove from CSSModel
TBR=jacktfranklin@chromium.org

Bug: chromium:1050549
Change-Id: Ifa67757255c23adc89e1f2976d4e8b74bdebcfbe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2096704
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-10 18:29:13 +00:00
Simon Zünd a26ca6a3a8 [cleanup] Use Map + Set instead of Object + Array in CSSModel
This CL replaces part of the CSSModel._styleSheetIdsForURL data
structure. As a result we also get rid of a use-site of Array#remove.

R=tvanderlippe@chromium.org

Bug: chromium:1050549
Change-Id: I841e7a6f88c59a3a0b1083c66c31cf8050c67f8d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2096446
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-10 13:04:03 +00:00
Simon Zünd 44ca9f9dca [utilities] Remove Map#remove
This CL replaces calls to Map#remove with the native Map#delete.
The actual return value of Map#remove was only used at 3 call-sites
where the function was inlined.

Bug: chromium:1050549
Change-Id: I2b7fc8174a4f585f4caf9957e756156149039097
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2096438
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-10 12:18:23 +00:00
Jan Scheffler eb8d294f90 Revert "[utilities] Use Set instead of Array in CSSModel for pseudo classes"
This reverts commit 4c6117b71e.

Reason for revert: Autoroller failure

Original change's description:
> [utilities] Use Set instead of Array in CSSModel for pseudo classes
> 
> This CL is part of a cleanup effort to get rid of Array#remove.
> 
> Drive-by: Cleanup @return type annotations. {forcePseudoState}
> actually returns {boolean|undefined} which is not checked by any
> call-site and callers of {pseudoState} never check for null/undefined.
> 
> R=​mathias@chromium.org
> 
> Bug: chromium:1050549
> Change-Id: I6c272e88cb55f3240e9534cc19cf899b07d38a5b
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2084577
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>

TBR=mathias@chromium.org,szuend@chromium.org

Change-Id: I8b66ebbf0bb2a1a7f8a867e4304ff4bc30e63836
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1050549
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2094130
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-03-09 12:40:07 +00:00
Simon Zünd 4c6117b71e [utilities] Use Set instead of Array in CSSModel for pseudo classes
This CL is part of a cleanup effort to get rid of Array#remove.

Drive-by: Cleanup @return type annotations. {forcePseudoState}
actually returns {boolean|undefined} which is not checked by any
call-site and callers of {pseudoState} never check for null/undefined.

R=mathias@chromium.org

Bug: chromium:1050549
Change-Id: I6c272e88cb55f3240e9534cc19cf899b07d38a5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2084577
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-03-09 08:20:47 +00:00
Mathias Bynens f06e8c0758 Enable no-else-return lint rule with autofix
This rule matches the Chromium-wide coding style.

Bug: chromium:1057042

Change-Id: I21ad946227ca7344146abace1d2f6146b3a6c207
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2078924
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-28 14:17:07 +00:00
Tim van der Lippe 5ed0fb968c Fix internal bindings in sdk/
These were some left-over fixes that regressed while doing phase 3 of
ESM. It includes fixing the typedefs in sdk-legacy to be in the proper
file and exported.

Bug: 1006759
Change-Id: I939d4287a78888fba65d4baed04ee90f14c88e23
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2055065
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +00:00
Simon Zünd a0d40624e1 [utilities] Replace {valuesArray} with {values} and/or spread operator
For {Set}s we omit the call to Set#values, since spreading a set
{foo} "[...foo]" is equivalent to "[...foo.values()]".

Drive-by: Remove the now unused Map#valuesArray and Set#valuesArray.

Bug: chromium:1050549
Change-Id: Ic9b51f957d895265a79a7fa3471ecb6cb734a1f0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2050770
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-12 16:45:22 +00:00
Tim van der Lippe d41d863344 Migrate sdk/ to import cross-module
Bug: 1006759
Change-Id: I1f4d365ca078007f9d5e5b005e748bac3993e8da
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016757
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-23 16:10:20 +00:00
Paul Lewis 4b64b3f263 [Global] Remap refs to Common.moduleSetting
Bug: 1006759
Change-Id: Ia45ef0fd0b97588ca23a8d784c0564050b0bbf4c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016748
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 12:00:20 +00:00
Sigurd Schneider 13f30b96a8 [coverage] Use timestamps provided by the back-end for coverage
Recent changes added timestamps to the methods that query coverage in
the back-end. This means that the back-end reports the precise time
the coverage was taken, which is especially important if the inspected
frame is on a different device.

Bug: chromium:1022031, chromium:1042927
Change-Id: I6570dedb7d8efe5eb785d9fe03f01bbaeb22fc08
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2011849
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-01-22 10:21:03 +00:00
Tim van der Lippe 9293af7230 Migrate sdk/ to ESM internally
Bug: 1006759
Change-Id: I2bb0c8eaa4fdc89edd8da2b12d9fd0e08d427174
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003327
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-17 15:17:17 +00:00
Tim van der Lippe c96ccd99f0 Remove unused globals
By using the script in crrev.com/c/devtools/devtools-frontend/+/1942289
we can prune all globals that are not actually global. Most of these are
internal private variables that are now module-scoped. Some variables
were also completely unused, which ESLint nicely reported.

Change-Id: I43689ac7544ad1239acc7d0eeec4dcd563d7fea9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-29 16:38:40 +00:00
Jan Scheffler f44777e922 Add CSS files without coverage to Coverage Model
This patch makes sure that all CSS files are registered in
the Coverage Model even when not covered yet.

Fixed: 949045
Change-Id: Iaf2524ec99336c4bdb0f74ead3ceaee819fafa9a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903471
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2019-11-08 10:29:16 +00:00
Sigurd Schneider 718eebb6a0 [devtools] Report end position for CSS scripts to DevTools front-end
This simplifies determining whether a location is inside a CSS header
in the front-end (the front-end doesn't have to request the source
to determine the end line:column from the start line:column and the
size).

Before/After: https://imgur.com/a/OFdQBNL

Bug: chromium:1005789, chromium:1005708, chromium:1004203
Change-Id: I4c660c2a5f901cfe24d022b2636926ecf99254ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821721
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#704542}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 96b62150b53277fdadcf13264379f4de9b47a2da
2019-10-10 10:14:57 +00:00
Tim van der Lippe 9b7d21d126 Migrate sdk/ to ESM
Bug: 1006759
Change-Id: I3f5917ab3f5b3fb823ca460c395301ba19eed2df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841792
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5a7c8d13f806d781e8edb96a9b1f152d4fe1258a
2019-10-07 18:48:07 +00:00
Tim van der Lippe 1d6e57a0e3 Always add braces to single-line if-statements
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
2019-09-30 11:55:34 +00:00
Sigurd Schneider dae38fddc2 [devtools] Support resolution of inline CSS via bindings
Bindings.cssWorkspaceBinding.uiLocationToRawLocations did not resolve
inline styles. This patch adds a mechanism to Bindings.ResourceMapping
to resolve inline styles, similarly to what is done for the resolution
of inline scripts in Bindings.ResourceMapping.uiLocationToJSLocations.

Bindings.ResourceMapping.uiLocationTo{CSS,JS}Locations exist, because
html files can embed scripts and CSS, and the dedicated resource
mappings {Script,Style}SourceMapping do not handle such files. While
Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations was already
falling back to Bindings.resourceMapping.uiLocationToJSLocations,
similar behavior is added in this CL.

The new function CSSModel.createRawLocationsByURL is similar to
DebuggerModel.createRawLocationByURL (without plural "s").

Bug: chromium:720162, chromium:1004203
Change-Id: I05f0af6fc81eb14116c17e55d78d25c11872fb51
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807226
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#698043}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 462e85542061ced9201b9a6cbb1ad506ec3e64ab
2019-09-19 15:55:27 +00:00
Tim van der Lippe ffa7862d4e Update Closure compiler to v20190729
The new compiler caught a lot of pre-existing issues in the codebase.
Sadly, the old compiler version was not smart enough to understand the
new changes. Therefore, the changes have be included in the same CL as
the compiler update.

Most of the changes are related to better handling of prototype and
class inheritance, as well as handling of null/undefined tracking.

Change-Id: I3941a3a240a4d09c4945e1e20d2521090ef837c9
Bug: 991710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762081
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#696761}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca93474213278e32e36d6ace1474c56884030757
2019-09-16 12:07:12 +00:00
Sigurd Schneider 8c2bcfd482 [devtools] Make coverage work from performance panel
This CL fixes a race-condition in CoverageView, and makes CSSModel
remember whether it was covering CSS data after suspension.


Bug: chromium:1000155
Change-Id: I5a454fbb10090e3f0bcdd69dd416336895a47b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781460
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#693065}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a7443e3524ae9d64c73cb04df25de74211e93b06
2019-09-04 09:03:29 +00:00
Pavel Feldman 08c780daf9 DevTools: surface the contrast ratio in the inspect mode tooltip.
Change-Id: Ic4dbcde257d70a5ac92a3d5a287a08fc1bfad11b
Reviewed-on: https://chromium-review.googlesource.com/c/1405462
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#622555}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ddc90ad94df7c00e88261c9f37e35c54f0466c12
2019-01-14 19:52:37 +00:00
Alexey Kozyatinskiy d430d75b9d [DevTools] cleanup source maps
Removed unused methods.

R=lushnikov@chromium.org

Bug: none
Change-Id: I63d14fcbf504d7b39d1758c54df358c1d6bd1630
Reviewed-on: https://chromium-review.googlesource.com/1174857
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#583006}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ec4abe830c34bef9114d55165356d94f409376cd
2018-08-14 20:08:03 +00:00
Blink Reformat 4c46d0969f The Great Blink mv for source files, part 2.
Move and rename files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: 768828
TBR=darin@chromium.org
NOTRY=true

Change-Id: I66d3b155808bc5bdbf237b80208e1e552bcf7f28
Reviewed-on: https://chromium-review.googlesource.com/1001153
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
2018-04-07 15:32:37 +00:00