Commit Graph
16 Commits
Author SHA1 Message Date
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 2efbb1b802 Revert "Enable property-no-vendor-prefix stylelint check"
This reverts commit 190803bad8.

Reason for revert: This breaks the icons in DevTools, which leaves gray backgrounds behind.

Original change's description:
> Enable property-no-vendor-prefix stylelint check
> 
> This patch drops unnecessary -webkit- prefixes in CSS and enables
> a lint check to enforce that prevent such properties from being
> added in the future. Note that the use of vendor-prefixed CSS
> properties is still accepted in cases where there is no standardized
> and browser-supported alternative.
> 
> Bug: chromium:1104187
> Change-Id: I29ae93d5a760c4f5037f20663754f448b5083235
> Fixed: chromium:1031475
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2297386
> Reviewed-by: Changhao Han <changhaohan@chromium.org>
> Commit-Queue: Mathias Bynens <mathias@chromium.org>

TBR=mathias@chromium.org,changhaohan@chromium.org

Change-Id: I5fe13b7afd8b71180163c7419092cc6a758903b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1104187
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2297391
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-07-14 14:24:29 +00:00
Mathias Bynens 190803bad8 Enable property-no-vendor-prefix stylelint check
This patch drops unnecessary -webkit- prefixes in CSS and enables
a lint check to enforce that prevent such properties from being
added in the future. Note that the use of vendor-prefixed CSS
properties is still accepted in cases where there is no standardized
and browser-supported alternative.

Bug: chromium:1104187
Change-Id: I29ae93d5a760c4f5037f20663754f448b5083235
Fixed: chromium:1031475
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2297386
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-07-14 13:23:06 +00:00
Kim-Anh Tran 4d1bf453a8 Fix stylelint-config-standard issues in network/networkTimingTable.css
Bug: chromium:1083142
Change-Id: I354c58d3148e942f3acb3fba847a17ed9bab7ee9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279848
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-07-06 07:05:12 +00:00
Sigurd Schneider 8943418680 Fix non-moving arrow regression
My previous CL for the CSS style fix-it dropped a CSS rule. This adds
it back.

Drive-by: Allow custom types to appear in style sheets if the custom
type starts with devtools-, and use ".-theme-preserve" (as a class
name) in the selector for dark mode.

Fixed: chromium:1101680
Bug: chromium:1083142
Change-Id: I4deef5885ce3365f8116631875d7b0212840b012
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2278470
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
2020-07-03 08:22:55 +00:00
Songtao Xia 1e6926836e [DevTools] More info for Service Worker Fetch Responses
This is to re-land PR:

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2233229

The PR is reverted because web_test network/resource-priority.js is
flaky. The test is now disabled.

Add ResponseSource, CacheStorageCacheName, ResponseTime information
for ServiceWorker Fetch responses.

Based on previous work by Anubmat@microsoft.com.

Corresponding Chromium.src
changes: https://chromium-review.googlesource.com/c/chromium/src/+/2145090
Image: https://imgur.com/a/vchMPGZ

Explainer:
https://docs.google.com/document/d/1L-dhKWYoVECdoqVQ0hOKqtyWbk5LtluFWbZE8PJZtnU/edit
Bug: 1066595
Change-Id: Ie34d05d8d3c018b756127385e49d977248f9acc5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2251079
Commit-Queue: Songtao Xia <soxia@microsoft.com>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
2020-06-19 15:10:31 +00:00
Mathias Bynens 42f585a5ad Fix -theme-preserve styles
Previously, many CSS rules were written as:

    -theme-preserve {
      foo: bar;
    }

Note that the selector is `-theme-preserve`, which in theory matches
any <-theme-preserve> elements — but we don’t use any such elements,
and it’s an invalid custom element name [1] anyway.

The only reason these selectors are used is to mark a CSS rule as
unaffected by DevTools theming; `_patchProperty` in `UIUtils.js` checks
if the selector contains `'-theme-'`.

stylelint-config-standard complains about this selector for good
reason, so we should use something else. A simple fix is to use a class
selector instead:

    .-theme-preserve {
      foo: bar;
    }

There is one gotcha: `-theme-preserve` gets applied as an actual class
name to some <input> elements in the memory timeline under the
Performance panel. To prevent those elements from getting all the
`-theme-preserve` styles, this patch changes the class name for that
specific case to `-theme-preserve-input`.

This works great: stylelint is now happy, and `_patchProperty` in
`UIUtils.js` still works correctly, since it only checks if the
selector contains `-theme-` anywhere.

[1]: https://mothereff.in/custom-element-name#-theme-preserve

Bug: chromium:1083142
Change-Id: I923f12de6d581e9fef71a9a58bda184e40dee796
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2252017
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-19 13:07:31 +00:00
Mathias Bynens 38562ddf8f Fix autofixable CSS lint issues
Bug: chromium:1083142
Change-Id: Icaaeebcdaf1e3cfc2fe2a75bf2aa5e814d0794a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2249665
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-17 11:17:07 +00:00
Kim-Anh Tran c2b2b0b863 Revert "[DevTools] More info for Service Worker Fetch Responses"
This reverts commit ce3397987e.

Reason for revert: Fails webtest in Chromium roll: https://ci.chromium.org/p/chromium/builders/ci/Linux%20Tests%20%28dbg%29%281%29/89664

TBR: soxia@microsoft.com,Rob.Paveza@microsoft.com,vidorteg@microsoft.com
Bug: chromium:1095582, chromium:1066595
Change-Id: I7af40a63e65f7f0daedbaeb68de4a779391ca3ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2248193
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2020-06-17 07:22:47 +00:00
Songtao Xia ce3397987e [DevTools] More info for Service Worker Fetch Responses
Add ResponseSource, CacheStorageCacheName, ResponseTime information
for ServiceWorker Fetch responses.

Based on previous work by Anubmat@microsoft.com.

Corresponding Chromium.src
changes: https://chromium-review.googlesource.com/c/chromium/src/+/2145090
Image: https://imgur.com/a/vchMPGZ

Explainer:
https://docs.google.com/document/d/1L-dhKWYoVECdoqVQ0hOKqtyWbk5LtluFWbZE8PJZtnU/edit
Bug: 1066595
Change-Id: I437966c567d3f90aa0b7c11a784de45cd41bfb14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2233229
Commit-Queue: Songtao Xia <soxia@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
2020-06-16 05:41:06 +00:00
Anubha Mathur 88bc40da79 Add Serviceworker respondWith Timeline to network panel
Image: https://imgur.com/a/Mqe15Ab

Goes alongside PR: https://chromium-review.googlesource.com/c/chromium/src/+/2142145

Bug: 1066579
Change-Id: Ic46148a21d0fc19ab2013467d5147c4adf958b6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2142449
Commit-Queue: Anubha Mathur <anubmat@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jose Leal <joselea@microsoft.com>
2020-06-02 21:17:01 +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
Kham Udom e22500101f High contrast update for Network panels
The patch updates the common styles, not only for Network, but other
panels that uses data grid. It fixes the hover, focus and selected
states.
Fixed hover, focus and selected on all individual panels within
Network. Fixed the filter and the cursor and resize handle within
the timeline.

Before: https://imgur.com/a/HR5topn
After: https://imgur.com/a/Gpph5BI

Bug: 1048378
Change-Id: Id0715ac873826471b35a400895efa5c178a589d9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2059527
Commit-Queue: Kham Udom <khamu@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-18 07:19:36 +00:00
Brandon Goddard 61d33dd0c3 DevTools: Enhanced accessibility of Network tool Timing tab
This change enhances the accessibility of the Network tool Timing tab
by making the following changes:

 - Add hidden global headers to give column context to screen readers
 - Slight modification of color contrast for section headers (> 4.5)
 - Updated "TIME" to "DURATION" to avoid confusion
 - Applied ARIA heading for soft headers
 - Restructured columns to remove empty table cells from being read
   by a screen reader
 - Added ARIA labels to waterfall column that
   read the start time of the request. (Column 3 indicates the
   duration of that part of the request timing).

Bug: 963183

Before: https://imgur.com/qKzqyYv

After (with screen reader): https://imgur.com/Sk6vuT6

Change-Id: Ife782e02929f2a1624fd0b827b4e1f729babd209
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647132
Reviewed-by: Erik Luo <luoe@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#693774}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: eafc9468202520ab4df62e886f509fcadd9d190c
2019-09-05 16:31: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