Commit Graph
58 Commits
Author SHA1 Message Date
Jack Franklin 536a31d8c4 Migrate DOMBreakpointsSidebarPane to TypeScript
Bug: 1011811
Change-Id: Ibfd0fc79847eb505e128b954a9d03f762fd1eee1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2431424
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-09-25 13:41:08 +00:00
Jack Franklin 830dfc1262 Migrate EventListenerBreakpointsSidebarPane to TS
Bug: 1011811
Change-Id: I1559628f538d74470aec9ad7f1bc9e7b24f3b8fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2429770
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-25 13:20:48 +00:00
Jack Franklin a3c271e494 Migrate ObjectEventListenersSidebarPane to TS.
Bug: 1011811
Change-Id: I751037f8fb18cd406f77a268923b960699cb1754
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2429767
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-25 10:58:17 +00:00
Tim van der Lippe cac65d4fa0 Remove skip_rollup
This was a temporary flag as part of the devtools_entrypoint migration.
Since that migration has concluded, we can now remove all references
to it and clean up `build_release_applications.py`.

R=jacktfranklin@chromium.org,aerotwist@chromium.org

Bug: 1101738
Change-Id: I3ef9ec1a99bc9fc1758532124db22b3b4b1a5e2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391140
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-08 15:44:09 +00:00
Tim van der Lippe 321dcca8b2 [globals] self.SDK.domDebuggerManager
R=aerotwist@chromium.org

Bug: 1058320
Change-Id: I523b32d769c6e240ce678e6657a66cd54e2c4c8d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391244
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>
2020-09-08 13:17:19 +00:00
Tim van der Lippe 207e2f9fdc Migrate browser_debugger to devtools_entrypoint
R=jacktfranklin@chromium.org

Bug: 1101738
Change-Id: I2baadadc23f935725272bdb73f256b6827f58f57
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2390620
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-02 15:05:20 +00:00
Michael Liao 867fe2fbf0 [Accessibility - XHR Breakpoints]: Set accessible name for text input
Issue:
- MAS 4.2.1 - Object Information violation
- Text input for XHR/fetch breakpoint in sources pane does not have an accessible name

Changes:
- Adding accessible name of "URL Breakpoint" to text input

Bug: 1120103
Change-Id: I56bbd776f13a57d3211b574c740e346a87fc0048
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2368373
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Songtao Xia <soxia@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
2020-08-24 19:34:06 +00:00
Peter Marshall 9a3d85fa0b css: Use :focus-visible instead of our custom data-keyboard-focus
https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible

:focus-visible is basically the exact same functionality as the custom
data-keyboard-focus attribute that devtools maintains. This CL converts
all of our uses of data-keyboard-focus in CSS to use :focus-visible.

This has no intended behaviour change although it's possible there are
small differences in our implementation vs. the web platform one, so
this might cause some regression with focus styles for keyboard
interaction.

I tested a few of these manually to verify they still do the same thing.

The CSS linter was unhappy about the ordering of some rules due to
specificity-ordering checks, so there is some re-ordering too.

A follow-up CL will remove our implementation of data-keyboard-focus.

Change-Id: Ifc273f7d82e16ea07e24ed2d1faa6f794a12501d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2352236
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
2020-08-24 07:58:42 +00:00
Tim van der Lippe d1a00aacb9 [globals] self.UI.context
R=jacktfranklin@chromium.org

Bug: 1058320
Change-Id: Icc1d806782e7624fff02e719670a2cca59070ddd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2364594
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-08-19 16:24:38 +00:00
Brandon Goddard 02b64b9591 Elements: Remove Event Listener Pane focus override
This CL fixes an apparent focus issue in the Elements Event Listener
sidebar pane. When the event listener tree outline was made
keyboard accessible, it was given focus by default when navigating
to the event listener pane from a mouse click.
However, since the tree was not keyboard
focused or marked focus-visible, it appears that the Event Listener
tab is still focus.

The fix removes the focus method from the widget, which causes focus
to remain on the tabbed pane header, which was the previous behavior.

This does not change the keyboard navigation, as keyboard only users
would still use arrows to nav the Event Listener
tab pane and then tab into it. This is the same behavior as the
Styles pane.

Before video in the bug
After: https://imgur.com/2g7W9MC

Bug: 1114604
Change-Id: I103dccef37bfe605e6093bb0f0d4104e3670da14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2351165
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-08-14 16:53:21 +00:00
Sigurd Schneider 965b1ffc56 Revert "Migrate browser_debugger to devtools_entrypoint"
This reverts commit 8419f16834.

Reason for revert: Doesn't compile:
https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/2171

Original change's description:
> Migrate browser_debugger to devtools_entrypoint
> 
> Bug: 1101738
> Change-Id: Ia5a5b8a6fff3607d787df23d31264552c55267bf
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335069
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>

TBR=aerotwist@chromium.org,jacktfranklin@chromium.org

Change-Id: I60f22d4cd485b3b555ce8e476d58bb01abccbff9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1101738
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2336718
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-08-04 13:01:15 +00:00
Paul Lewis 8419f16834 Migrate browser_debugger to devtools_entrypoint
Bug: 1101738
Change-Id: Ia5a5b8a6fff3607d787df23d31264552c55267bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335069
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-08-04 12:04:53 +00:00
Tim van der Lippe 1b2c52bbfa Remove tvanderlippe@ as explicit OWNER from several front_end subfolders
As part of the initial seeding of the OWNERS, the automated scripts added
myself as OWNERS to pretty much every single folder in `front_end/`. This
is an artifact of the widespread infrastructure I have done, with in
particular the ES Modules migration that touched every single file in
DevTools.

In the past few weeks, several times I have received CLs were I was asked
to perform a domain review on the feature in question. Most of the time,
I have no knowledge of that particular feature.

To reduce confusion and roundtrips asking for different domain reviewers,
I removed myself as explicit OWNERS of these files. Note that I can still
use my INFRA_OWNERS to land changes, but as usual these are infra-only.
E.g. these will include the larger refactorings that span multiple features,
but not a single feature in particular.

I have kept myself OWNERS of folders that are part of the core
architecture of DevTools, as I am comfortable reviewing these as domain
reviewer.

R=yangguo@chromium.org,aerotwist@chromium.org

Change-Id: Ib1be70b97c5395498795b4b28ce7001731305d41
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2282516
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-07-06 12:36:21 +00:00
Jecelyn Yeen 03f87178e1 Fix stylelint-config-standard issues in browser_debugger/domBreakpointsSidebarPane.css
Bug: 1083142
Change-Id: Ibfce0cf08d845339ef9b1e0ef12b5ac79a030147
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279524
Reviewed-by: Jecelyn Yeen‎ <jec@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Jecelyn Yeen‎ <jec@chromium.org>
2020-07-03 05:24:47 +00:00
Christy Chen d05ba96196 [A11y] fix DOM breakpoint checkbox not announced by screen reader
When tabbing into the DOM bp sidebar, the screen reader wont announce the checkbox status because the focus is on the listItem.
This CL makes makes focus to be on the checkbox element.

Gif with NVDA screen reader
https://imgur.com/F0F8Rbq

Bug:963183
Change-Id: I1e793bf962fcc21c6c9ebe4e7dd4d44c160a522b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2228805
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Songtao Xia <soxia@microsoft.com>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-06-08 22:04:38 +00:00
Yang Guo 3852a23f96 Seed more owners to front_end directories
Bug: chromium:1082687
Change-Id: I07ad07fba7513d674eb8b6e84d8296bf64d37230
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2207319
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
Reviewed-by: Leo Lee <leolee@microsoft.com>
2020-05-20 07:20:27 +00:00
Mathias Bynens ca9fa2d73f Consistently format CSS color and opacity values
- Prefer the modern comma-free CSS color function syntax over the
  legacy syntax. [1]
- Explicitly use the `deg` suffix for angle values in colors, to
  clarify the range.
- Explicitly use the `%` suffix for percentages instead of formatting
  the value as a number, again to clarify the range.

[1]: https://twitter.com/mathias/status/1253242715304857601
[2]: https://goo.gle/devtools-css-color

Bug: chromium:1083142
Fixed: chromium:1073885
Change-Id: I8e1582a2dee3553a61df88564051ea84c2011d76
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209091
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
2020-05-19 16:50:26 +00:00
Mathias Bynens b0c1f4bce2 Fix stylelint-config-standard violations
Bug: chromium:1083142
Change-Id: I5ea4cc5d0f83e52856383ba37a47472e33eb19a2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204113
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-05-15 17:05:27 +00:00
Tim van der Lippe f49e23286b Replace single class invocations of createElementWithClass
This applies the following replacement to the codebase:

(\S+) = createElementWithClass\('(\w+)', '([^'\s]+)'\);

to

$1 = document.createElement('$2');\n$1.classList.add('$3');

R=aerotwist@chromium.org

No-Presubmit: true
Bug: 1011811, 1077215
Change-Id: I0d76b39f1ed8cd4a44f18f94e398db934ba4b09c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2176112
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-01 16:54:52 +00:00
Tim van der Lippe 6ab9f46701 Replace simple invocations of createElementWithClass
This applies the following replacement to the codebase:

(\S+) = createElementWithClass\('(\w+)'\)

to

$1 = document.createElement('$2')

R=aerotwist@chromium.org

Bug: 1077215, 1011811
Change-Id: I719bc90097273a9f735ee7fc9828edb6405c27e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2173376
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-01 16:34:51 +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
Paul Lewis 75c7d0decc [global] Remaps self.UI.viewManager
Moves self.UI.viewManager to an instance() method.

Bug: 1058320
Change-Id: I0c444101da59ba9eba4745d1dc551bb8906a0a4f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107624
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-03-19 12:39:32 +00:00
Jack Lynch 6149083d74 Fix focus issue in event listener breakpoints
This CL fixes an issue where focus being on a checkbox in the event
listener breakpoints pane prevents keydown events from being handled by
its parent treeElement, forcing the user to shift-tab to focus the tree
element and navigate the breakpoints tree. Since checkboxes are input
elements, UIUtils.isEditing() returns true if one is focused (preventing
treeElement._treeKeyDown from handling it). To keep the fix simple, I'm
just adding focus listeners to the checkboxes that focus their
treeElements. Pressing space on a treeElement toggles its checkbox, so
all functionality that you would have from focusing a checkbox is
preserved.

Screencasts from the bug: https://drive.google.com/drive/folders/11_47xiS-aMNXXQwvMP-9Or4Dr_QaZFdi?usp=sharing

Bug: 1058338
Change-Id: I4bbcbae29eb0b5dcdaf677388eca2f33be8ceab5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2088117
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Brian Cui <brcui@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
2020-03-16 21:53:56 +00:00
Tim van der Lippe f5f0824062 Migrate typedefs in {animation,bindings,browser_debugger,color_picker,components}-legacy.js
Bug: 1006759
Change-Id: I47ffecc42c0e25dec24f33323f56eecc86a02f42
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2100907
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-12 16:22:22 +00:00
Paul Lewis daac106699 [global] Remaps self.SDK.targetManager
This CL changes references to self.SDK.targetManager (the global
instance of SDK.SDKModel.TargetManager) over to
SDK.SDKModel.TargetManager.instance(). To keep both TypeScript and
Closure happy we must make a method on the TargetManager class itself,
since it only allows private constructors to be accessed by static
methods on the class.

Bug: 1058320
Change-Id: I6ca35024c21cf24254fd6273138a1ab3e163ee00
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2088092
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-05 14:58:03 +00:00
Tim van der Lippe 37a35fff86 Reland "Typecheck Object.js"
This reverts commit f996a1c537.

Reason for revert: Fixed incorrect refactoring in this CL.

Original change's description:
> Revert "Typecheck Object.js"
>
> This reverts commit 258665aca5.
>
> Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712)
> Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462?
>
> Original change's description:
> > Typecheck Object.js
> >
> > To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> > that were using addEventListener or removeEventListener incinsistently.
> >
> >
> >
> > Bug: 1011811
> > Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Commit-Queue: Jose Leal <joselea@microsoft.com>
>
> TBR=szuend@chromium.org,joselea@microsoft.com,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>

Bug: 1011811
Change-Id: I19ebbe0345a5c7380ed69d1ba2921adf0385228e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2084580
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-03 14:09:44 +00:00
Simon Zünd f996a1c537 Revert "Typecheck Object.js"
This reverts commit 258665aca5.

Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712)
Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462?

Original change's description:
> Typecheck Object.js
> 
> To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> that were using addEventListener or removeEventListener incinsistently.
> 
> 
> 
> Bug: 1011811
> Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Commit-Queue: Jose Leal <joselea@microsoft.com>

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

Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-03 05:59:28 +00:00
Jose Leal Chapa 258665aca5 Typecheck Object.js
To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
that were using addEventListener or removeEventListener incinsistently.



Bug: 1011811
Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jose Leal <joselea@microsoft.com>
2020-03-02 18:15:06 +00:00
Kham Udom e991071f67 High contrast work on Sources debugger panel
The changes fixes the hover and and keyboard focus on the panel. The
header gets a focus ring and when hovering or focusing the content
item, the background and foreground changes.

Before: https://imgur.com/a/gZD8xLg
After: https://imgur.com/a/LVruJ6P

Bug: 1048378
Change-Id: If697639f8a5b7d73844e1aab63c9bb2db884b295
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2055546
Commit-Queue: Kham Udom <khamu@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-14 16:06:43 +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 046db888bd Migrate browser_debugger/ to import cross-module
Bug: 1006759
Change-Id: Ieb8297fbffd90b47816591e0cc7e8367770e01fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2054162
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-13 14:24:49 +00:00
Paul Lewis 5e21b5ec9e [Global] Update refs to SDK.domDebuggerManager
Bug: 1006759
Change-Id: Ibe7d3a960cb5f58285d34f5b660b580e4fd3977c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019542
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 14:46:35 +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 50993696be [Global] Update refs to UI.viewManager & UI.zoomManager
Bug: 1006759
Change-Id: Iebf11153861850acbbfef9f40e3552d1be9a6460
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016760
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 15:45:11 +00:00
Paul Lewis 4ae5f4f5ce [Global] Update refs to SDK.targetManager
Bug: 1006759
Change-Id: I0686ef929b89e75c2ea8a731c593d955eca85935
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2015119
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 10:56:40 +00:00
Jack Lynch 0a882882e4 Highlight DOM breakpoints when hit
This CL fixes an issue where one or both of the two instances of the DOM
breakpoints pane (in Sources and Elements) fail to update when a
breakpoint is hit. There's a video in the linked bug showing more
specific repro steps, but the issue stems from three different
extensions in browser_debugger.json that reference
DOMBreakpointsSidebarPane: two views and a ContextFlavorListener. Unlike
every other view in the devtools, these ones define a factoryName rather
than a className. This makes the devtools create separate instances for
each rather than using runtime.sharedInstance(), which breaks
UI.Context._dispatchFlavorChange(), which does rely on
runtime.sharedInstance().

In order to make _dispatchFlavorChange() work properly with both the
Elements and Sources panel views, I replaced their factoryNames with
classNames, i.e. made them share an instance. Some minor changes to
ContainerWidget and _ExpandableContainerWidget were needed to make sure
the shared instance actually shows up where needed, but everything now
works as expected. An alternative would be to rework
Extension.instance() and ContextFlavorListener, but that seems more
invasive.

Bug: 973251
Change-Id: I288dea794518605f8f93c28c7826372dbaea2e1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1984805
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
2020-01-13 17:23:55 +00:00
Paul Lewis 2a4f9fe07d Migrates browser_debugger to ESM internally
Bug: 1006759
Change-Id: Iae67cbad44cfebe3ceb4353f32d9e2e4024b41bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991631
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-09 16:21:21 +00:00
Jack Lynch de07ab85a9 Improve keyboard/screen reader a11y in xhr breakpoints pane
- make all functionality available via keyboard controls by refactoring
the pane to use UI.ListControl based on feedback to [1]
  - the list can be navigated with up/down arrow keys
  - pressing enter on a breakpoint begins editing it
  - hitting spacebar on a breakpoint now toggles its checkbox
  - checkboxes have tabIndex set to -1 to avoid tabstop pollution
  - provide better support for screen readers
  - listitem aria roles
  - use aria-describedby to communicate whether a breakpoint is enabled
  or has been hit
  - add more descriptive label for add breakpoint button

Focus background: https://gyazo.com/9dab02d47053303a84165fcf08cbcbc4
Context menu: https://gyazo.com/7bdfdb7c0b07b2f01a061dc08f09dbb2

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1644461/14/third_party/blink/renderer/devtools/front_end/browser_debugger/DOMBreakpointsSidebarPane.js#141

Bug: 963183
Change-Id: Ib1701ab9534c45fa28478135c909e2042ef6c775
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1891002
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
2020-01-08 01:01:37 +00:00
Jack Lynch 6790102aae Make javascript breakpoints accessible
This change makes the javascript breakpoints pane accessible by:
- adding an option to the context menu to reveal the location of a
breakpoint for keyboard users
- allowing keyboard users to navigate the breakpoints list with the
arrow keys by refactoring the pane to use UI.ListControl, in response to
feedback on [1]
- putting the checked/unchecked status of a breakpoint and whether it
has been hit in its aria-describedby

These changes break a few web tests, so [2] must be merged first to
disable them. Test fixes are here [3].

Screenshots:

Context menu: https://gyazo.com/3f54dd9a1fd146270a64afd635cf2bc6
Hit breakpoint: https://gyazo.com/8363b986f36f67a213170dad73ba0450

Keyboard navigation video: https://i.imgur.com/ZOvVrxf.mp4

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1644461/14/third_party/blink/renderer/devtools/front_end/browser_debugger/DOMBreakpointsSidebarPane.js#141
[2] https://chromium-review.googlesource.com/c/chromium/src/+/1894751
[3] https://chromium-review.googlesource.com/c/chromium/src/+/1636716

Bug: 963183
Change-Id: I360c828145806a1133937ce8c6f2e4885cb0f900
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1891267
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
2020-01-07 20:56:48 +00:00
Jack Lynch 8a344769f6 Improve keyboard/screenreader experience in DOM breakpoints
Currently, there is no intuitive way to navigate the DOM breakpoints
pane by keyboard. This change refactors the DOM breakpoints pane to use
UI.ListControl to manage keyboard navigation, in response to feedback
here [3] about code duplication. Using ListControl also makes it easier
to manage an accessible description on breakpoint elements so that
screen reader users are informed about the checked state of breakpoints
and whether the page is currently paused on them.

Focusing the list items, before/after:
https://gyazo.com/5edc75de0c0e9d7f968f49e114cec324
https://gyazo.com/c3efc3322783f3505bc4dde3edabbf13

This CL breaks a web test, so [1] must be merged first to disable it.
[2] Fixes and reenables it.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1893960
[2] https://chromium-review.googlesource.com/c/chromium/src/+/1644461
[3] https://chromium-review.googlesource.com/c/chromium/src/+/1644461/14/third_party/blink/renderer/devtools/front_end/browser_debugger/DOMBreakpointsSidebarPane.js#141

Bug: 963183
Change-Id: I41e2e8b73baa7ae3e6169163785e245493ab4ba7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1889352
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
2019-12-12 03:34:36 +00:00
Mathias Bynens 9680e2e8b0 Drop -webkit-user-select in favor of user-select
Bug: chromium:1031475
Change-Id: Ibbf222135c97e79ae3be816216fec9675d643952
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953613
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2019-12-06 10:31:53 +00:00
Paul Lewis 7f7a92088c Migrates browser_debugger/ to esm
Bug: 1006759
Change-Id: I6fd8ea8fb749bf1231b481a8b311f0370fe9e401
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1934217
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-26 16:26:56 +00:00
Jack Lynch 16879b94d8 DevTools: Make event listener breakpoints keyboard-navigable
This change makes the event listeners pane navigable by keyboard and
accessible to screen readers.

Standard treeoutline keyboard focus is the only visible change:
https://gyazo.com/0098dd06216f58575468fcf7c5902cbc

Keyboard navigation video: https://i.imgur.com/Hq73jum.mp4

Bug: 963183
Change-Id: Ia32451e29b16a63e20de0a1e6c351e38568c13ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649732
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#706565}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: df40959919b858acf825d39eff2a73bed87c8ddb
2019-10-16 19:38:15 +00:00
Jack Lynch 236a6e9977 DevTools: Make global listeners view keyboard-navigable
This PR enables keyboard navigation of the event listeners tree view and
adds a more descriptive aria-label for the refresh button.

Keyboard navigation gif: https://i.imgur.com/QlKjnEf.mp4
Empty pane focused screenshot: https://gyazo.com/d494f4ab0b2f9d550192f9920838b6a0

Bug: 963183
Change-Id: I6f7c1fa304606238c1bf23d7a663560cc2c75718
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1665298
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#706560}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0c6fbc2d36499207e1695e0acf04e4f69e7934be
2019-10-16 19:16:44 +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
Mandy Chen 1e9d87b8f2 DevTools: Create a grdp file for shared strings to avoid confusion
Since the current localization system uses a unique ID for each string that
is calculated based on the the md5 hash of the string, each string
in the grdp files needs to be unique. However, there are strings in the
frontend that appear multiple times. When such strings are moved across
folders, sometimes a seemingly random grdp file is changed by the autofix
script. (See https://crrev.com/c/1683826 for an example)

This CL introduces shared_strings.grdp, a file dedicated for strings that
are shared across folders/grdp files. Instead of putting these strings in
the grdp files that come first when sorted alphabetically, they live in
shared_strings.grdp and have common descriptions among all instances of
such strings. This way if shared strings need to be moved, it's more clear
what's going on.

Note that this CL contains a lot of changes that are generated automatically
(e.g. shared strings are removed from their current locations), so here's
the list of actual changes that need to be reviewed:

* shared_strings.grdp file is added to front_end/langpacks and front_end/langpacks/
devtools_ui_strings.grd
* path to shared_strings.grdp is added to scripts/localization_utils/localization_utils.js
* in scripts/localization_utils/check_localized_strings.js, the parser marks
strings that appear more than once as shared and set the target grdp file to be
shared_strings.grdp
* shared_strings.grdp file is checked by scripts/check_localizability.js for
localizability violations
* shared_strings.grdp messages have common descriptions added

Bug: 941561
Change-Id: I00db23854656509f2f03988e70adc0109b6e09d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1800918
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#697667}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d10bf7c5a97cf9184866c1117935c199bacf7ff3
2019-09-18 17:18:15 +00:00
Junyi Xiao 14a06c1ce0 DevTools: aXe core linting for DOM breakpoints in Elements.
Added DOM breakpoint accessibility testing.  Slightly
modified the structure of the DOM Breakpoints list DOM (but
didn't alter its display) for more specificity in the CSS.

The test here is a little bit more involved than most of the
tests in the Elements pane, primarily because the process of
launching the DOM breakpoints list and creating them is a
bit more involved than other components of the tool.

Bug: 963183
Change-Id: I2543331f81d1ba96a7a0ddb6ca31dba214a1761a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1683826
Commit-Queue: Junyi Xiao <juxiao@microsoft.com>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#693957}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 06042315a66654aaa9a200f4b32179334f021518
2019-09-05 22:13:19 +00:00
Jack Lynch f85ad68a1c DevTools: Higher-contrast UI for hit breakpoints
This change adds a border to the right side of list elements for
breakpoints that have been hit, making it easier to distinguish hit
breakpoints. Initially recommended by aboxhall in
https://chromium-review.googlesource.com/c/chromium/src/+/1629013/39#message-e4f3d258e8c2e46652d76de2c675361f23afe9ca

Before: https://gyazo.com/f5df60f6de04c79cf3daea6b1947d9b3
After: https://gyazo.com/1e743392451a4eb0f2aba9d22d2b7253
https://gyazo.com/69ace940f429762e46cb70fca7c8774c

Bug: 963183
Change-Id: I336d47902790e16cdff0c3f6c1317ba366f95321
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717269
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#687830}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4c720ea1311597ef036326162ffcc6a39a5dbaf9
2019-08-16 21:25:21 +00:00
Mandy Chen 50fd396d65 DevTools: Add auto-generated descriptions to all grdp files
In the previous patch (https://crrev.com/c/1678842) I added auto-generated
descriptions to changes_strings.grdp. In this patch, I'm adding the rest
of the descriptions. A follow-up patch will be made to add a presubmit
check that all grdp messages have descriptions.

Bug: 941561
Change-Id: I61e65143e7d5160ce1e880c58ec56afdf03819cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1688716
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#675723}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f2d042ca17f3b033b58df41adbeaeaaf0be427c1
2019-07-09 18:03:08 +00:00
Lorne Mitchell c56ff2d968 Reland of "DevTools: Added GRD/GRDP files for all localizable strings in the DevTools."
This is a reland of https://chromium-review.googlesource.com/c/chromium/src/+/1613921/, which was reverted (Bug=966547) because
third_party/blink/renderer/devtools/front_end/langpacks/devtools_ui_strings.grd was being picked up by Google's internal localization pipeline.

Bug=941561

Change-Id: I9a97e16e367716189d34944b76605c9321d47092
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627921
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#664013}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 613ca444d07326b6f087c083af79a636a858a7d9
2019-05-28 23:35:03 +00:00