This CL follows on from https://crrev.com/c/2516345 and adds the
`enableLegacyPatching` flag to `createShadowRootWithCoreStyles`. This
was harder as the function already took optional argumetns so I have
updated it to take an options bag, and then added an additional option.
This CL means that all the sites where we need to add the
`enableLegacyPatching` are done, and we can begin to plan the first
migration away from the legacy patching mode.
Bug: 1122511
Change-Id: I24e5dbb85e654eae28110ccfb603972034548921
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2517566
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
This was a bit of a bigger CL than intended:
* Added `.d.ts` files to a bunch of CodeMirror files to keep the TS compiler
happy.
* Moved `front_end/cm` to a BUILD.gn and devtools_pre_built. Long term (follow
up CL) we can get rid of `front_end/cm` and have `text_editor` depend on the
third_party CodeMirror directly.
* Migrated text_editor to be a devtools_entrypoint.
Bug: 1101738
Change-Id: Iac61216efa754163a478a3c529ab526ec83b0d13
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2312676
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
cm_web_modes/ was used both in a worker and in the normal browser
context. However, both formatter_worker/ and text_editor/ included the
relevant files in their scripts array.
The fix is to make cm_web_modes a proper module and import either the
browser (_cm.js) variant or the worker (_headless.js) variant.
Bug: 1006759
Change-Id: I85c6f67102d8ffd94e073850b1ac7adcb289b1b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1934218
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
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
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
Some properties including filter/*gradient have functions as values.
CSS autocomplete shows their function names as suggestions
(blur, brightness). In this CL, autocomplete suggests full preset
samples (blur(1px)) so that intermediate suggestions apply visibly
meaningful changes to the page.
Bug: 931145
Change-Id: I4f693b200cb49f5fdf8f428c03154e136c7a8ed2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1466284
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#640575}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: beaedbdb329d74e1d1b9a0166508e0a3f7f632f5
CodeMirror change events can be batched, so multiple before change
events can happen before a change. If a line has not been processed
yet, we shouldn't overwrite it on the intermediate beforechange
or words can be left behind in the dictionary.
Change-Id: I056d95a85870cb1a5d25797159bad01628848edf
Reviewed-on: https://chromium-review.googlesource.com/1083213
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#563818}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: df8ba004326cd0a2182b002b29475111d7737a05
* Enter accepts the current suggestion in the console.
* History suggestions are not auto-selected. The user must use the
arrow keys or manually click to select them now.
Previously we worried about that the user would accidentally select a
suggestion in the console when they actually wanted to run the command
as is. Due to recent improvements in autocomplete, this is less of a
problem. Autocomplete showing up on an already complete expression
should be extremely rare. The only exception is history completions,
which are no longer autoselected.
Change-Id: Id9d567ae69f4c29c63e875a1f3285448adbd7ce3
Reviewed-on: https://chromium-review.googlesource.com/1026838
Reviewed-by: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#555609}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca3ac226e566791986bb6451bdfcb02d661c6eb8