Commit Graph
41 Commits
Author SHA1 Message Date
Philip Pfaffe 4da2da83f1 Use bytecode offsets in wasm source GoToLine and position indicator
This CL fixes the Go To Line dialog as well as the status row in the
sources panel. Instead of going by line number, use code offsets instead!

Bug: chromium:1152714
Change-Id: I2758b756b44e1401f914c22bb3d5f74c945abacc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562712
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2020-11-30 10:54:48 +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 7f0bf8aeb0 Use import.meta.url to reference formatter_worker
This allows us to remove the formatter_worker_entrypoint and its
files and instead reference `formatter_worker/` itself.

R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I3d7330d947fff4c6e7974fe60338568a0e9d82d7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2412330
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-26 17:10:14 +00:00
Tim van der Lippe 438df3a629 Use TypeScript-authored files in media/
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I5b5462b7d0f0ff9843f79ddc394b7f84134d3341
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2529156
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-11 15:22:19 +00:00
Tim van der Lippe 317534b914 Typecheck formatter/ScriptFormatter.js with TypeScript
R=szuend@chromium.org

Bug: 1011811
Change-Id: I5b730121d9e5c591ab0516c344d34d7654fbc44f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2502609
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-10-27 15:03:57 +00:00
Johan Bay f6929e8957 Typecheck source_frame/SourceFrame.js with TypeScript
Bug: 1011811
Change-Id: Idd7b1d6faea54d2006db1771ed7963ffda9467e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2479133
Commit-Queue: Johan Bay <jobay@google.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-10-20 06:10:20 +00:00
Benedikt Meurer 4ac46d26ea [wasm] Show errors when WasmParser fails.
Previously when something fails during disassembly generation, we'd
silently swallow the promise rejection and abort early, leaving the
UI in a weird state (the "Loading..." bar would never disappear and
the source tab remain empty forever).

Bug: chromium:1136484, chromium:1137335
Change-Id: I7fa03fcdead8be4c027d1118aafefcd5ee82eb2c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2463355
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2020-10-13 10:54:08 +00:00
Jan Scheffler 4a89ed360b [TypeScript] Migrate front_end/source_frame to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: Id6d460cd1e37ee2b4096e90ab02a8c797343171e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2318385
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-29 16:42:54 +00:00
Sigurd Schneider 307d82aaac Modernize CoverageView/CoverageListView
This makes improvements towards TypeScriptification, but much more work
is required.

Bug: chromium:1011811
Change-Id: Ic3c00cfc640dce0fdd6f132a19975436ff2a4617
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2277986
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-07-03 09:15:35 +00:00
Patrick Brosset e65aaac861 Enable the no-return-assign ESLint rule
This rule disallows assigning a value in a return statement.
It also works in one-liner arrow functions.

For instance, a => a = 2 will trigger a warning.
This is to avoid cases where you actually meant to compare a to 2, not
assign the value 2 (maybe you wanted to return a boolean in a filter
callback).
These sorts of issues can easily pass review and cause weird problems
that are hard to track down later.

The rule is enabled in this CL, and all warnings are fixed with this CL.

More info about the rule: https://eslint.org/docs/rules/no-return-assign

Bug: 1093379
Change-Id: I38b98ea59ecaedc83a7f69073b17980808f9a3bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2242761
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2020-06-22 08:34:42 +00:00
Benedikt Meurer f02f84337b [wasm] Proper progress bar for Wasm disassembly generation
Change the wasmparser worker to emit progress events for the name
section decoding, the actual disassembly generation and the joining
of the lines. This way the progress bar in the front-end becomes
more useful for bigger wasm modules, where it's otherwise unclear
to the developer whether DevTools is still doing something or got
stuck somewhere due to a bug.

Fixed: chromium:1090262
Bug: chromium:1043030, chromium:10714320
Change-Id: I38403b17eb27da554855e9cc40e2d6d383df5e4d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230535
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-05 09:30:08 +00:00
Benedikt Meurer f4bb2ff0dc [wasm] Properly terminate the wasmparser worker.
Before we had been leaking all the wasmparser workers.

Bug: chromium:1071432
Change-Id: Ice230c7aa4355facd85202aec02ed01d7fe9c447
Fixed: chromium:1091230
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230505
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-04 13:24:47 +00:00
Benedikt Meurer e18a2584ca [wasm] Use bytecode offsets instead of line numbers
This changes the display of line numbers for Wasm disassembly to use
bytecode offsets, similar to what Firefox DevTools already does. This
makes it clear to the developer that they are staring at binary data
here, and is also consistent with the use of bytecode offsets for
location information everywhere in the developer tools and the Wasm
runtime.

Before: https://i.imgur.com/uVioRlR.png
After: https://i.imgur.com/dqYt2WP.png

Bug: chromium:1071432
Change-Id: I6f295d061bb5ecf845c175d8cc6ac8bd27670cf6
Fixed: chromium:1043047
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2228511
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2020-06-03 17:05:05 +00:00
Benedikt Meurer b358e5fae9 [wasm] Handle disassembly on the editor level
Simplify the handling of non-breakable lines in general, and make
both the line mapping as well as the non-breakable lines iteration
unittestable.

Drive-by-fix: Implement binary search for more efficient
Wasm bytecode reverse mapping.

Fixed: chromium:1056632
Bug: chromium:1071432, chromium:1043047
Change-Id: Ibb2c029a7011206f0676d630c0c94a33fc83d3d8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220098
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2020-06-02 13:17:10 +00:00
Benedikt Meurer fcef4e406f [sources] Make editor location mapping more robust.
This refactors the editor location done in the `UISourceCodeFrame`
via the `Transformer` in the following ways to make it more robust,
preparing for hooking up the WebAssembly disassembly here as well:

 1. Remove the duplicate `Transformer` typedef.
 2. Turn the `Transformer` typedef into a proper interface and have
    `SourceFrameImpl` implement it.
 3. Rename the `Transformer` methods to make sense and adjust the
    return type to an object with meaningful field names, rather than
    an ad-hoc array with two elements.

Bug: chromium:1056632
Change-Id: I3d08b54dab3a04a8595e3a498127f9f91d686694
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220091
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-05-29 07:34:39 +00:00
Tim van der Lippe 18f0489a60 Reland: Move ContentProvider.js and StaticContentProvider.js to text_utils.
They used to live under common.

This is to avoid the dependency from common to text_utils caused by
the method performSearchInContent.

Layout tests were disabled:
https://chromium-review.googlesource.com/c/chromium/src/+/2096995

CL to fix and re enable tests
https://chromium-review.googlesource.com/c/chromium/src/+/2096018/


Bug: 1011811
Change-Id: I76415076366d748ed0b4fe6ff32c73bae0db1312
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2097337
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-17 12:12:17 +00:00
Simon Zünd b4c9ea79e7 Revert "Move ContentProvider.js and StaticContentProvider.js to text_utils."
This reverts commit ba56abb36c.

Reason for revert: Breaks two layout tests:
https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/739

The Try bot also caught this for this CL but was green for some reason.

Original change's description:
> Move ContentProvider.js and StaticContentProvider.js to text_utils.
> They used to live under common.
> 
> This is to avoid the dependency from common to text_utils caused by the method performSearchInContent
> 
> Bug: 1011811
> Change-Id: Ic6ccb32d8c18abda7b259ca14bafca4c7c2003ab
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2090785
> Commit-Queue: Jose Leal <joselea@microsoft.com>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=joselea@microsoft.com,tvanderlippe@chromium.org

Change-Id: Ie8c99b77123e916d9f0cde73339f9cac22fff3ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2095308
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-10 06:29:38 +00:00
Jose Leal Chapa ba56abb36c Move ContentProvider.js and StaticContentProvider.js to text_utils.
They used to live under common.

This is to avoid the dependency from common to text_utils caused by the method performSearchInContent

Bug: 1011811
Change-Id: Ic6ccb32d8c18abda7b259ca14bafca4c7c2003ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2090785
Commit-Queue: Jose Leal <joselea@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-10 00:33:29 +00:00
Jack Franklin 1cb3421614 Move self.mod into NumberUtilities
Bug:  1050549
Change-Id: I44047c605adf3dfd4fc9e971671d7abfc7841cb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2094118
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-03-09 17:15:58 +00:00
Mathias Bynens 23ee1aad0a Reconfigure lint rule w.r.t. quotes
We prefer single quotes by default, but still want to allow double
quotes in cases where that helps avoid quote-escaping, and also want
to allow template literals in cases where string interpolation is
used. For example:

    const a = 'xxx';  // ok
    const b = "xxx";  // not ok, should use single quotes
    const c = "xxx'xxx";  // ok, double quotes avoid an escape sequence
    const d = `xxx`;  // not ok, frivolous use of template literal
    const e = `xxx ${42}`;  // ok

Per https://github.com/eslint/eslint/issues/12976, setting
the `allowTemplateLiterals` option for the `quotes` lint rule to
`false` gives us the desired behavior.

Note that the above lint rules are auto-fixed when running the linter;
there should be no need to manually make any changes to appease the
linter.

Per review feedback, this patch also removes the following escape
sequences for printable non-ASCII symbols:

- U+00D7 → ×
- U+2026 → …
- U+2019 → ’

Chromium CL temporarily updating test expectations:
https://chromium-review.googlesource.com/c/chromium/src/+/2083147

Cq-Depend: chromium:2083147
Bug: chromium:1057042
Change-Id: Id6bec3f96ca694d2fbc07dd8629fce305a58df8a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082372
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
2020-03-02 16:18:16 +00:00
Jack Franklin 4289552031 Remove String.prototype.computeLineEndings
In favour of `StringUtilities.findLineEndingIndexes`.

Kept the old code around in the layout tests; I think the duplication is
fine here given these tests are largely deprecated in favour of e2e
tests.

Change-Id: I4f15097c6880a516d9dbc7bb4f5da68a938f63f9
Bug: 1050549
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2060002
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-28 12:03:08 +00:00
Kim-Anh Tran 1b7de61aa0 [devtools] Add progress bar when lazily loading content
Adds a progress bar indicating the loading process.

Bug: 1043030
Change-Id: Id7a49c8c939b7517bee9625f0c25c2391a4534e4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2065011
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
2020-02-25 06:56:34 +00:00
Tim van der Lippe e2418436c0 Remove typedefs from {source_frame,sources,text_editor,text_utils}-legacy.js
Bug: 1006759
Change-Id: I4c972b7714850b2c7064a1dc9ab5b675be5d5917
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056849
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-18 14:16:57 +00:00
Tim van der Lippe 00d4ce380f Fix usages for Common.DeferredContent typedef
This typedef could not live in `common.js`, as it was referenced in
files in common/ itself.

Bug: 1006759
Change-Id: If058bde3ab0d0ad2b2474ae522391c4f61cdfc71
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056482
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +00:00
Tim van der Lippe 2543c5cbff Migrate source_frame/ to import cross-module
Bug: 1006759
Change-Id: I4e81d6c4f3e75646b5fbd6fb8cfb3df3babed87a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035940
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-04 13:06:21 +00:00
Simon Zünd 308c74fe73 Remove SimpleView.syncToolbarItems and use async variant instead
The ScriptOriginPlugin uses source mapping to resolve a UISourceCode to
a script in order to display a toolbar item for that script. As source
mapping will be asyncified the UISourceCodeFrame needs to provide its
toolbar items in an async way.

Luckily, UI.SimpleView has both a async and non-async version for
sub-classes to provide toolbar items. This CL replaces all uses of
the non-async version with the async version and removes the
non-async version from the interface alltogether.

R=sigurds@chromium.org

Bug: chromium:1032016
Change-Id: Ifce141ccf17bbce3493cb5ffb16aa6874abfe413
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981624
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-01-16 07:18:34 +00:00
Paul Lewis aa437a5f71 Migrates source_frame/ to ESM internally
Bug: 1006759
Change-Id: Ie0c5a2a815806f49e40d089ed8bae729c3846b20
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2002594
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-15 17:01:54 +00:00
Tim van der Lippe b88663fc59 Migrate source_frame/ to ESM
Bug: 1006759
Change-Id: Ibcff1093ef7b7a4a9f4a94a1d75f900b8ab2d88f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903473
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-09 19:29:23 +00:00
Rob Paveza 2eb8c14505 DevTools: Display error when source file can't load
The source editor, when it cannot load a particular file, will simply
display a blank file instead. At the bottom, this is because the APIs
used to load the files do not have a way to propagate an error up to
the call site. Rather, the callback either is never called, or is
called with just an empty string.

This refactor changes the way the project system loads file contents
by replacing the callback model with a Promise-based model. However,
in this version, rather than propagating an error (handled via
catch), the error is exposed as a property on the object passed via
the the load functions. Although it might be preferable to use
async throw/catch, because there are ~4-5 layers of redirection
through the project system, the added complexity seems to not really
justify that work. I'm open to reconsidering this design, though.

Attempting to load a file via file:// which does not exist previously
produced no error because the DevToolsUIBindings handler would just
always resolve with no content and HTTP status 200. I had previously
addressed that bug in this changeset, but I've split it out to
https://chromium-review.googlesource.com/c/chromium/src/+/1847833 .

Sample "after" screenshot: https://imgur.com/a/tlm90sg

Bug: 961940
Bug: 941035

Change-Id: If121611090e9c35eeb1de162b59f8a9f72f696d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1817677
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#705438}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 61ec2a233d9a7bf4bb4b3e610de6fc233ae0d46e
2019-10-13 18:02:38 +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
Paul Lewis 444ed0ae53 DevTools: Use JSX/TSX over standard JS/TS modes
We currently use the mime-type determine into which mode to put
CodeMirror. For the most part this is fine, save for JSX/TSX projects
where the files are saved with .js/.ts files suffixes. Typically this
causes the non-x mime-type to be chosen, which in turn puts CodeMirror
into the wrong mode. Since JSX/TSX are supersets of the non-x versions
this CL simply pushes the mode over to the respective superset.

Bug: 659515
Change-Id: I186d976a6a1ac991a296f92a22c8a0b3e83743c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1800748
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#697180}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b3c794969b499b588fea13020080ab47f86fc576
2019-09-17 12:18:41 +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
Vidal Diazleal 0b6aff4a7f Devtools: Tab titles are not localizable
Tab titles in the devtools are not localizable, this PR makes the title function to actually use l10n tagged templates and fixes the following comment on the code:

third_party\blink\renderer\devtools\front_end\Runtime.js
// FIXME: should be Common.UIString() but runtime is not l10n aware yet.

Change-Id: I4a651e2f1b4ef0e0e6d07b54d52e44c17aeda057
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1554648
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#652717}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 47fe01c857b5aff69d66e36e994bb7796748907b
2019-04-20 01:15:43 +00:00
Alexei Filippov 6c89282a54 DevTools: Make line level profile support memory annotations.
BUG=937880

Change-Id: Ib222ad6cddf23b0f28863e75f1bc729e638c6ee4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504460
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#638307}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f1092ff4c5a57d39196c4821a623d12df03b80d4
2019-03-06 22:30:42 +00:00
Joey Arhar 19e85ccca5 [DevTools] Add binary websocket message viewer behind experiment
Screenshots: https://imgur.com/a/0rtukft

Bug: 605262
Change-Id: I1049d2196e51193419b9dd7ebbe7105a8655a631
Reviewed-on: https://chromium-review.googlesource.com/c/1321570
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#627166}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9eb859773e133754b856482a4b6ea79ba39412fe
2019-01-29 22:07:02 +00:00
Joel Einbinder eff7013cd2 DevTools: Reveal pretty location in auto pretty print experiment
This makes the styles sidebar links point to the correct spots in the
css files.

Change-Id: I6ac0cf1c56e28eee1d7ce3047cd0e2f99cc5621f
Reviewed-on: https://chromium-review.googlesource.com/1086006
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#564252}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 63bd890042723542902bed77b05b5863dee9f427
2018-06-04 21:54:12 +00:00
Joel Einbinder d7595c7afb DevTools: Auto pretty print in sources panel experiment
Change-Id: Ib16be938e7df8c90f02da1211f350d172c34ebff
Reviewed-on: https://chromium-review.googlesource.com/1047949
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#558766}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6cc4917ff46b654205b4aa1700c049c14d2ebabd
2018-05-15 17:41:54 +00:00
Joel Einbinder 5d6cc6eeaa DevTools: SourceFrame pretty print improvements
I extracted out some improvements to inplace pretty print in
SourceFrame from my sources auto pretty print patch.

* Line numbers become blue when pretty print is active
* Selection is properly scrolled into view when pretty print is toggled

Change-Id: Ib1cf8f0a15b8495594ecf121cef8786d8cfd0f16
Reviewed-on: https://chromium-review.googlesource.com/1044878
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#556318}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d893a023c6a2ad473795fc680170c2a018eedab3
2018-05-05 06:29:47 +00:00
Joel Einbinder 8981ae8246 DevTools: Remove SourceFrame onTextEditorContentSet
onTextEditorContentSet is a legacy method from when SourceFrame had
many subclasses. Overriding setContent instead is simpler and makes
for a cleaner plugin story around dispose/ensure plugins.

As a drive-by, the currentSearchResultIndex getter was removed.

Change-Id: I7f467da9297288b9f654eaf1cdd73b8be281cbaa
Reviewed-on: https://chromium-review.googlesource.com/1020812
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#553320}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1e760fbec07f32c51baadf82e967d2e21ae3650c
2018-04-24 22:28:04 +00:00
Joel Einbinder 5002038b21 DevTools: set highlighter type on binding change
This gets the highlighter type from the network UISourceCode, if it
exists. For overrides files with no extension, they will stay colorful
as long as they are bound.

Change-Id: I5f1ff41f54eabb7a7f1abf1aa27b19629529fbfd
Reviewed-on: https://chromium-review.googlesource.com/1003875
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549683}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e832b8e15e96305ca27ce44aaa95e910ffc42ace
2018-04-10 23:56:14 +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