Joel Einbinder
2ef9e0655f
DevTools: Move autocomplete logic ConsolePrompt->JavaScriptAutocomplete
...
This makes the code reusable for other CodeMirrorTextEditors that
might want the same autocomplete experience we have in the Console.
Change-Id: I8660249c08d920d86d2b82524b7bd50d9b5deb05
Reviewed-on: https://chromium-review.googlesource.com/1092080
Commit-Queue: Joel Einbinder <einbinder@chromium.org >
Reviewed-by: Dmitry Gozman <dgozman@chromium.org >
Reviewed-by: Erik Luo <luoe@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#572381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c965d521e045567c17783c5afe1d41c5b1c04d8b
2018-07-03 22:53:57 +00:00
Joel Einbinder
7528f5f309
DevTools: Give argument hints for native function without names
...
Some native functions don't have names in their toString, so now
we use the identifier the user typed in as a fallback.
Change-Id: I79ad4e630a39ff23a109485ea5afded9d660d54e
Reviewed-on: https://chromium-review.googlesource.com/1063037
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org >
Commit-Queue: Joel Einbinder <einbinder@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#559392}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8c78c1f97014e7e249a522342890f0b9fbc2efba
2018-05-17 01:47:03 +00:00
Erik Luo
157d472fd7
DevTools: update autocomplete keywords to ES2017
...
This updates the JS autocomplete keyword list with keywords from
Section 11.6.2.1
https://www.ecma-international.org/ecma-262/8.0/index.html
Screenshot: https://imgur.com/a/sX1wOP7
Bug: none
Change-Id: Ia555723e35311a83d6e64f19fc253a3ea9368384
Reviewed-on: https://chromium-review.googlesource.com/1058562
Reviewed-by: Dmitry Gozman <dgozman@chromium.org >
Commit-Queue: Erik Luo <luoe@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#558840}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 87f64561f24091df1737ce123877be324350e4f3
2018-05-15 21:30:25 +00:00
Joel Einbinder
3f23eb2bdd
DevTools: Argument hints for native functions
...
Change-Id: Ia0e9f3c98735d64a1188b4373c90b7ef2684ea48
Reviewed-on: https://chromium-review.googlesource.com/1054582
Commit-Queue: Joel Einbinder <einbinder@chromium.org >
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org >
Reviewed-by: Erik Luo <luoe@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#558527}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a5be1a79f122d4496aa4a09ddfad0b475d878248
2018-05-14 23:27:51 +00:00
Joel Einbinder
2fc0fb7ea3
DevTools: Give argument hints in the console prompt
...
https://i.imgur.com/Y3OlPM2.png
Change-Id: Ic1d9ef1d47ff93ce77bfc3ae7173689bccf0cb2c
Reviewed-on: https://chromium-review.googlesource.com/1031096
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org >
Commit-Queue: Joel Einbinder <einbinder@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#557030}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 66bdf19b13c9a1dffbd47121101e0b8aedde3495
2018-05-09 00:43:10 +00:00
Joel Einbinder
7228ed7828
DevTools: Clear autocomplete cache when the execution context changes
...
This was attempted before, but the ExecutionContextChanged event is
actually for when the name of an execution context changes, not for
when a new one is selected by the user (or the page is reloaded).
Also added a safety clear on DebuggerResumed
Change-Id: I4c9360139fe90beee2fa3d8a82317fc3aed1e6ae
Reviewed-on: https://chromium-review.googlesource.com/1040906
Reviewed-by: Dmitry Gozman <dgozman@chromium.org >
Commit-Queue: Joel Einbinder <einbinder@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#555627}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ae75af0b961edbac04cd8db77e9efaf77e962436
2018-05-03 00:30:10 +00:00
Joel Einbinder
7e91656ac6
DevTools: Don't show duplicate suggestions in the console prompt
...
Previously properties were shown from every prototype of the object,
regardless of whether or not they were overridden by a higher properity
prototype. This could be confusing with for example '[].leng' which
showed length twice.
Change-Id: I7cee5b18a62d542bbf4562510c4c461afc59da60
Reviewed-on: https://chromium-review.googlesource.com/1026698
Commit-Queue: Joel Einbinder <einbinder@chromium.org >
Reviewed-by: Erik Luo <luoe@chromium.org >
Reviewed-by: Dmitry Gozman <dgozman@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#554270}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 82a54db3b748052649a2c156b5c5e1e125b5ee0e
2018-04-27 02:58:26 +00:00
Joel Einbinder
e0dcbceb5a
DevTools: Use throwOnSideEffects in console autocomplete
...
This lets us give suggestions for expressions like: ({abc: 4 + 3}).
Change-Id: Ia46b2eadb7725753408eb694414344075d00153e
Reviewed-on: https://chromium-review.googlesource.com/1014308
Commit-Queue: Joel Einbinder <einbinder@chromium.org >
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org >
Cr-Original-Commit-Position: refs/heads/master@{#552547}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 00226e5a08d7c0d45e972668f5e9cb5b8911836d
2018-04-21 01:49:53 +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