ui/Tooltip.js overrides the HTMLElement prototype to override the
title property. Rather than using this property, we shoul be
calling Tooltip.install directly. This makes sure that new
components are not relying on the behavior of the legacy
prototype patching.
These usages have been manually audited using the following regexes:
Search: ([\S]+)\.title = ([^;]+);
Replace: UI.Tooltip.Tooltip.install($1, $2);
Note that there are classes in DevTools that also have a title
property. Most notably `TreeElement`. We should not be replacing
these, as they do not inherit from HTMLElement. Luckily, we are
running TypeScript to make sure we don't call `Tooltip.install`
with a non-HTMLElement.
A follow-up CL will clean up the getters.
R=jacktfranklin@chromium.org
Bug: 1150762
No-presubmit: True
Change-Id: I5928e75c70293531849e0576f4fb2a2a8b3e02d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2555060
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>
As part of the dark mode migration we are adding
`enableLegacyPatching:true` to all call sites of `appendStyle` (and
related methods). If a user passes `false` for that flag, no CSS colour
patching will occur.
This CL is therefore a no-op from a user's perspective as we pass `true`
on every call to maintain existing behaviour, but once we start
migrating we will turn the option to `false`. Long term, once all code
is migrated and the old patching is removed, we will remove this flag
entirely once again.
Bug: 1122511
Change-Id: I76b818e83b7d5ee0175e1548759373f53481e0ab
No-Presubmit: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
A regression introduced by a rename in 586c7e11 resulted in an
exception when the WebSocket messages list contained more than one
message. This CL corrects the reference to the
ResourceWebSocketFrameNodeTimeComparator function name.
Bug: chromium:1041752
Change-Id: Ibb84592e49b12263c88da21f287113342359b433
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2013560
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Eric Lawrence [MSFT] <ericlaw@microsoft.com>
Issue:
- Data grids in DevTools do not have an aria-label
- There are a ton of DataGrid parameters and adding one is messy
Changes:
- Naming all data grids
- Created DataGrid.Datagrid.Parameters type to hold data grid parameters (including a required gridName field)
Bug: 963183
Change-Id: I83b130d468fb80034be264b45b86b799f650e978
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1891652
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
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
Right now when using UI.ToolbarComboBox, the caller has to remember to
call setTitle() after constructing it, otherwise no aria-label will be
set for the 'select' element. Some callers did not do this, but all
select elements are user visible and must have aria-label set.
To ensure that this mandatory property is set, this CL changes the
constructor to require a title argument and sets the ARIA accessible
name (thus setting aria-label) to the title.
Remove the setTitle() method which was only used to add a title right
after the creation of the object.
Update all of the users of UI.ToolbarComboBox to provide a title,
fixing accessibility issues for the users that did not already call
setTitle().
Make accessibleName mandatory for ToolbarSettingComboBox as there is
only one caller, and they provide it.
Change-Id: Ib60e2edab763bbfaa4e71a1c76ed4fa4e21e3fc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821904
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#699754}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 36119d248b809872edfc1acde75cbee57226fc92
Accessibility testing revealed the following issues within the tool:
1. no label for the group by combobox
2. link is not keyboard accessible
This change adds:
1. better aria-placeholder for filter input bar
2. aria-label for icons and group by combobox
3. context menu for links
Bug: 963183
Change-Id: I63f343e4cc056468c3e640b735b50f7bec3051c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1633332
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Junyi Xiao <juxiao@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#698981}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bf7b95ff63504e19559165eb12958ebc23def777
Currently in the websocket message viewer, sent text messages have a
green background, received text messages have a white background, and
binary messages are yellow on yellow. This patch removes all of these
interesting colors and replaces them with data grid striping to look
more like the other datagrids in devtools.
Screenshots: http://crbug.com/963949#c2
Bug: 963949
Change-Id: I0403a8c67a36e5ad0bd006d59e60fc02d371d7ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614036
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#660948}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b7376e9a27a05101c607526f4c4441e582cbeb86
* Enabled the check_localization presubmit script.
* Fixed localization issues caught by the check_localization presubmit script.
* Updated the check_localization script to allow contatenation of non-alphabetic strings with localized strings.
* For example, ls`Status Code` + ": " is a valid concatenation. This allows for decorations to be concatenated with localized strings.
Change-Id: I741940c9ebdac363ac0ccad3f7de20d508204e2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1544878
Auto-Submit: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#647134}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a329cb73b0b5d5cddb89a34fd7da6cb1a3c87dd
This patch replaces the TabbedPane in the binary websocket viewer with a
bottom toolbar which has a dropdown for which view you want and a copy
button. Since the feedback was positive in a UX meeting, I am removing
the experiment.
Screenshots: https://imgur.com/a/v2iH4mg
Bug: 605262
Change-Id: I9ee50fdf75e82043d85bf3ab6745ae79027ffc4f
Reviewed-on: https://chromium-review.googlesource.com/c/1449108
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#629025}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a33c7ca1b2db81054aef98dcaed2912a14bccd5
This fixes up some places in code that ignored `encoded` flag from the
result of `Network.getResponseBody` and similar CDP commands, instead making
own assumptions based on "common sense" (whether it's text content type,
whether it can be parsed as-is and so on).
This works fine for Chromium either way because it upholds these assumptions,
but technically it's a violation of the protocol and makes devtools app
easily incompatible with other CDP implementations.
Change-Id: Ifbd3ad487e6f39a75795b362cc3828466ba4f775
Reviewed-on: https://chromium-review.googlesource.com/c/1230042
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#598318}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5b046432f18e81cc58d32191c8a8ad150c8b74ad