Commit Graph
21 Commits
Author SHA1 Message Date
Tim van der Lippe 5e1aeb0577 Remove suppress annotations
All of these were Closure-specific.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: Ia580e21cd3b06f532bb5a63a770ccfa3d7c796ee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569761
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-02 17:27:02 +00:00
Tim van der Lippe 7dcef88d8b Remove skip_compilation from module.json files
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I4c4fd280adb4f5f7b327239d08d80b2cb98b203b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560248
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-25 13:19:08 +00:00
Sigurd Schneider adcafe0029 Replace field on HTMLElement with WeakMap
Bug: chromium:1011811
Change-Id: If5fba1cf2c550ef958efef882d93972c2d9b60cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2552504
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-20 16:10:52 +00:00
Tim van der Lippe 6f3dba2370 Use TypeScript-authored files in main/
This actually found some misconfigurations in the test runners,
where `console_test_runner` shouldn't have been typechecked by
Closure and `TestRunner.js` was incorrectly using globals.

R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I31fa4d72417bff6345d6e856c7645766cabd1fb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2519706
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-05 14:21:41 +00:00
Tim van der Lippe 8b068ffba1 Remove initialization of globals in Runtime
We initialize the globals in the `-legacy.js` files and therefore
don't require the additional assignments in the Runtime itself.

R=jacktfranklin@chromium.org

Bug: 1127902
Fixed: 1058320
Change-Id: Id6c13d9f2b9d781bfab73957621324335d394a2b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2410225
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-09-15 12:08:12 +00:00
Tim van der Lippe 5faef2fb69 Load console_test_runner as module
R=jacktfranklin@chromium.org

Bug: 1105476
Change-Id: I5fb3dd76595b938f9430db5e6aa5d8eade471901
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2409982
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-09-14 14:42:38 +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
Mathias Bynens 5e43b27e8b Reformat module.json files
This patch makes it so that all module.json files use the same
consistent indentation that matches .editorconfig and the rest
of the codebase. At the request of reviewers, one such file
(front_end/emulated_devices/module.json) has been excluded
from this patch. It will be reformatted in a separate CL.

Note that this patch does not “roll CodeMirror”, although a
pre-commit hook forces me to include that phrase in the commit
message because the module.json file in the relevant folder is
modified.

Bug: chromium:1070492
Change-Id: Ib31ed5232461e2f80bf05f31105fc919f6639b0a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2127007
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-04-14 05:35:23 +00:00
Simon Zünd 6b7708a02a Prepare various test utilities for asynchronous source mapping
This CL prepares all test runners for:
  * asynchronous {rawLocationToUILocation}
  * asynchronous live location updates

The call-tree roots are web tests. All web tests have already been
prepared so this CL prepares the test runners themselves.

Bug: chromium:1032016
Change-Id: I1dc9432eaab7177df44ac0711294ee02e62a0fd2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2067072
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-02-25 12:22:33 +00:00
Paul Lewis d990734442 [Global] Update refs to UI.context
Bug: 1006759
Change-Id: I4a405fb1d80f6a384a311a3482c37f943238b73f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019137
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 14:25:48 +00:00
Paul Lewis e504fd6a5f [Global] Updates refs to SDK.consoleModel
Bug: 1006759
Change-Id: Ifa6d7f177a22a38eaa4f3a16a26c797659ddee98
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2017145
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 17:10:50 +00:00
Christy Chen 94b4a0baf8 DevTools: Avoid using .join() to construct the title of a console counter
Change ported from CL
https://chromium-review.googlesource.com/c/chromium/src/+/1866856

WarningErrorCounter is using .join to construct the title, which is an
anti-pattern that prevents proper localization of lists. This CL is changing
it to use placeholders instead.
https://imgur.com/EZ9egYl


Bug: 941561
Change-Id: I9bd67821c25dd6deea62f051041c9f6b7ed8ac73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873361
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2019-11-20 23:13:53 +00:00
Adithya Srinivasan 7a133d2629 Portals: Keep DevTools open across activation
To implement this, we reattach the DevToolsUIBindings for the current
DevToolsWindow to the RenderFrameDevToolsAgentHost for the activated
WebContents and reset the main connection in the frontend to reconnect
with and enable the new agents.

Bug: 992887
Change-Id: I0ca4e6cc7a6c633680bfd03d574a4030ab65d7b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1788122
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703973}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5d50d1e0bf22d0474cfc31f63b867706a3e7590f
2019-10-09 00:27:48 +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
Erik Luo 840be6b88d DevTools: fix stick-to-bottom for Console with keyboard navigation
Keyboard navigation in Console presents new interactions that our
stick-to-bottom (STB) logic should care about.

Prompt
- Before, STB only cared about TextChanged events, but now cares
  about focusin, since users can Tab from messages to prompt

Objects
- Expanding an object results in noticeable scroll-anchoring jumps,
  STB should turn off due to expanding. Expanding a small object
  that can fit in viewport should guarantee it is visible.

Bug: 865674
Change-Id: I47872110d4bf2261b4940b565f8c926333b66836
Reviewed-on: https://chromium-review.googlesource.com/c/1330350
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#613239}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc2fb34c6c8a513781dc7d78e827f340605681e9
2018-12-03 20:54:27 +00:00
Erik Luo fc2214fc41 DevTools: move BrowserConsole back into Console
Motivated by the desire to make Console links keyboard navigable,
this CL removes the BrowserConsole module and moves logic back into
ConsoleViewMessage.

BrowserConsole did not explicitly depend on BrowserSDK.

Bug: 865674
Change-Id: Ibb004c52699b1d504b32accdfa4ee19adc907633
Reviewed-on: https://chromium-review.googlesource.com/c/1338329
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#610186}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6a233641478415452d93a94c4850d0fe42ded6a9
2018-11-21 19:54:58 +00:00
Erik Luo 0b8282e795 DevTools: navigate, expand Console objects via keyboard
With experiment enabled:
- Use Arrow keys to expand ObjectPropertiesSections in Console

Bug: 865674
Change-Id: Ia85969eb7b8f282e2403ab2a5d140821f2e977e6
Reviewed-on: https://chromium-review.googlesource.com/c/1239441
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#597671}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c4c8bf57e8cae49003ca59ed29901feb91b0dc45
2018-10-08 20:37:46 +00:00
Erik Luo 4b002328ab DevTools: [console-stability] more precise viewport
Simplify visible index calculation and tests by
- Remove padding on viewport container
- Remove negative margin (was on error/warning logs)

Improve visible index / scrollItemIntoView() precision by
- Rebuild cumulative heights even if each message is slightly off
- No need to scroll last item into view if it is fully visible
- Perform extra scroll on scroll into view in case items above
  were larger than expected
- Message height measurements now include wrapper's border

Bug: 865674
Change-Id: Id4abad0e40a971dff9accbc7b904427ea02f728c
Reviewed-on: https://chromium-review.googlesource.com/1144254
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#579175}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8ee170a089cd03e7f0b7ab6982174d15d0180f8a
2018-07-30 21:23:31 +00:00
Erik Luo 5fb33bda7b DevTools: use expandable fragment for long Object property values
Screenshot: https://imgur.com/a/FUh1E91

Bug: 754216
Change-Id: Id7f04637f85ad776e4c61b0cedf500351723342d
Reviewed-on: https://chromium-review.googlesource.com/1081677
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#564286}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d96b9f46eafdd0145393b5fe3e188e9bedb2da72
2018-06-04 23:23:52 +00:00
Erik Luo db2f5680ee DevTools: split console test for classNames
- Only 1 Console test dumps classNames: 'console-format-classes.js'
- Classes dumped with indentation

Bug: none
Change-Id: Ieb919f05e3a69f374ed6baecbaef99f66cf20e33
Reviewed-on: https://chromium-review.googlesource.com/1077747
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#563069}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4721e0729effe874178841d90336cb93340ebb80
2018-05-30 23:49:39 +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