Commit Graph
18 Commits
Author SHA1 Message Date
Tim van der Lippe 05149e9772 Remove ls from legacy-defs
This adds all missing imports for `ls` to all files. After this change,
all usages of `ls` will now properly be resolved to a LocalizedString
rather than a normal string.

R=jacktfranklin@chromium.org

No-Presubmit: True
Change-Id: Icf6d8c3b8bea1f9e66f4b6b58e4ae4c7f99e6f9c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2629554
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-01-15 12:53:50 +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
Jack Franklin 71519f8efb Introduce enableLegacyPatching flag for CSS patching
As part of the dark mode migration we are adding
`enableLegacyPatching:true` to all call sites of `appendStyle` (and
related methods). If a user passes `false` for that flag, no CSS colour
patching will occur.

This CL is therefore a no-op from a user's perspective as we pass `true`
on every call to maintain existing behaviour, but once we start
migrating we will turn the option to `false`. Long term, once all code
is migrated and the old patching is removed, we will remove this flag
entirely once again.

Bug: 1122511
Change-Id: I76b818e83b7d5ee0175e1548759373f53481e0ab
No-Presubmit: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-03 14:11:46 +00:00
Sigurd Schneider a3e99b0548 [ts] Type-check sdk/ConsoleSidebar.js with TypeScript
Bug: chromium:1011811, chromium:1135143
Change-Id: I9ea659e2fe1f1518a2e26a01009d7e61dd2e0c94
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2452694
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-10-08 12:01:18 +00:00
Jan Scheffler c5bc69f8bf Migrate front_end/console to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: I5c1030afe46de06dd92c0ce1678975ad25cf6634
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2328846
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-30 12:25:40 +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
Tim van der Lippe 93b57c3bbc Remove prototype wrangling for String formatters
They are now moved to the StringUtilities file. Sadly, `String.sprintf`
is still used in the TestRunners that can't use ES modules.

The Multimap required exporting, as the NetworkManager has a reference
to it as well.

Bug: 1050549
Change-Id: Ia7b38dc212282a9800ee8c3083dac7f4a5e046e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2067057
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-02-20 18:15:46 +00:00
Tim van der Lippe c02a97ca2c Fix imports for Common.Event typedef
All references now use the fully qualified
"Common.EventTarget.EventTargetEvent". It renames it to
"EventTargetEvent" to prevent a name-clash with the native "Event" type.

Bug: 1006759
Change-Id: I13fcdfd613041da146d741a0d1f785bfc905a7a8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056481
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +00:00
Tim van der Lippe 9b2f871384 Migrate console/ to import cross-module
Bug: 1006759
Change-Id: I685b1c819e17acab6db5f440cdf8e4b173712649
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2051961
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-13 13:37:48 +00:00
Paul Lewis 6bcdb18044 [Global] Update refs to Common.settings
Bug: 1006759
Change-Id: Ie1943b50ba8ba23fae4f52f958ae6f8c7b6a7d3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016744
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 11:29:11 +00:00
Tim van der Lippe eaacb72383 Migrate console/ to ESM internally
Bug: 1006759
Change-Id: If15f5741c87ff711976a317910cbf01489db1d3e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991515
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-10 14:03:57 +00:00
Peter Marshall 3e4e569cd2 Remove asParsedURL on the String prototype
Use a static function on the ParsedURL class instead.

A lot of our tooling is happier linking through to the class method
rather than the prototype thing, and setting things on prototypes is
generally discouraged in JS for a bunch of reasons.

Change-Id: I95cf70ed58e7cca6d4c2bf7633b69199f513d068
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958524
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2019-12-10 09:00:24 +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
Paul Lewis bf7aa3c19e Migrates console/ to esm
Change-Id: I98fbb09aca094d5493923dd595c940f9f4bc9e85
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1924206
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-20 17:15:48 +00:00
Tim van der Lippe b45d9a0a31 Remove ProductRegistry
Design doc: https://docs.google.com/document/d/1fRNhE_FXfCWwR8zOBkE5J5B6An53Lf0GbQHUB1QSnEI/edit?usp=sharing

Bug:664704,1011466
Change-Id: Iaec3f495a18b821b312694011129902a9c63f67f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893080
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-05 17:54:26 +00:00
Christy Chen c891ec67a1 DevTools: Avoid concatenations of Console sidebar messages for localization
In the Console sidebar, the message titles are using concatenation depending
on the number of the messages. This would cause the issue where the strings
can not be properly translated since concatenation assumes word order,
which can vary depending on the language, and the white spaces between words
might not be needed in other languages.

https://imgur.com/a/nC1Dbmt

This change creates string maps for different cases (No message, 1 message, or
more than one messages) to avoid concatenations.

Grdp changes are generated automatically, with manually written descriptions



Bug: 941561
Change-Id: Iad1803c3d3fadd76e9af3f7407a609e17cd708ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819648
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#703979}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 40f5d8ca8a069ebf1633665535b61819a706431d
2019-10-09 00:31: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
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