Commit Graph
18 Commits
Author SHA1 Message Date
Jack Franklin 8064d3ba7a Lint against non-theme-color variables
This CL turns on the use_theme_colors stylelint rule which enforces that
any colors use variables defined in our codebase.

There are many, many violations, unsurprisingly (about 1500), so for now
I have disabled every single violation. The goal of the dark mode
migration will be in part to remove all violations of this rule.

Additionally, new code going forwards should adhere to the rule and not
add the comment to disable the warning.

Bug: 1152736
Change-Id: I51372724ea51485daef3d4f75b7d3f60a7c8016f
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2671323
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-03 11:02:09 +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
Jan Scheffler 34e08814b6 Fix stylelint-config-standard issues in object_ui/objectPropertiesSection.css
Bug: chromium:1083142
Change-Id: I4d529866d75c9809faa0edecc640a4e811c54710
R=mathias@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2282351
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-07-06 11:44: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 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
Kham Udom 047cb6914a Fixed high contrast in Elements panels.
Update the DOM tree panel by fixing missing expanded glyph, removed the
borders, set by the system. The borders should only be visible,
when elements are hovered or selected.

Made sure all the panels, Style, Computed, Event Listeners,
DOM Breakpoints, Properties, and Accessibility, have a hover state,
if there is one, in Default mode. Otherwise, all panels
should be navigable, with keyboard.

Before: https://imgur.com/a/XaXWvFW
After: https://imgur.com/a/1lBV1Br

Update:1
Addressed comments to move styles to a central location,
removed unnecessary use of forced-colors and !important
and unused rule sets.

Update:2
Address change to use border color, more refactoring work
to remove unnecessary !important, more work on centralizing
styles

Bug: 1048378

Change-Id: I6942eb46d6c741fdea3f062ac61ead7c6e9d1bbc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2007930
Commit-Queue: Kham Udom <khamu@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-04 18:57:20 +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
Joel Einbinder e95b2d4cd5 DevTools: Show private properties in the object properties section
This patch adds private class properties to the list of expanded
properties object properties, and orders them properly in the
object preview.

https://i.imgur.com/DDswaiZ.png

Change-Id: I78c995bc9168a08d22bd69f93e1ded324a191a88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1630014
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#666933}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a2a6dc55caa33f524f49025028c3ceb428c2909
2019-06-07 00:38:19 +00:00
Erik Luo bf0990559a DevTools: fix styles for object preview collections and array groups
- Keyboard-focused array groups receive blue style ([100..199])
- [[Entries]] properties will not have 'length' or '__proto__'
- [[Entries]] will be sorted to the top of properties

Screenshot: https://imgur.com/a/kTzSDzv

Bug: 405845
Change-Id: Ifa7d8f5e3cf43d1baf38d5fb6c209af485fe84e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639819
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#665768}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6fef4b71bf96c10d128a2e51ab6615ae62b25900
2019-06-04 01:51:07 +00:00
Joel Einbinder 7fbe24c094 DevTools: Convert to Shadow DOM and Custom Elements v1
Bug: 685385
Change-Id: I027e84d8003b7799492211d5fcf8348cd91fd799
Reviewed-on: https://chromium-review.googlesource.com/c/1422962
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#625513}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b00e6ea1c9b4db5d743c7c204b1f63abf89e0398
2019-01-24 05:19:01 +00:00
Erik Luo e6260f5b10 DevTools: fix line-height for object properties sections
When zoomed in, object properties with underscores can be cutoff due
to overflow: hidden. This adjusts line-height to be more flexible.

Bug: 915708
Change-Id: Ic8ef4aee2c97278b011db8a973274ce7d1e836b7
Reviewed-on: https://chromium-review.googlesource.com/c/1405981
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#622206}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 47b692a6943448ace76e2111a0c3a5d6c28af187
2019-01-11 23:18:59 +00:00
Erik Luo 42fd2c8fca DevTools: iterate on keyboard focused styles
- Focus color is now 'blue', closer to the background color of a
  focused console message.
- In both Objects and Nodes, focus highlight's width fits tightly
  around the text content.

Screenshot: https://imgur.com/a/aLyGRqJ

Bug: 865674
Change-Id: Ie0fb14897dc855cd7713b2ce6ba0328ef205fc7a
Reviewed-on: https://chromium-review.googlesource.com/c/1368842
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#615792}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 073bc1736e62d826520b6d1a746e72b95a797345
2018-12-12 02:31:56 +00:00
Erik Luo 2571ae1fa7 DevTools: fix overflow scroll when searching in object
Screenshot: https://imgur.com/a/SxeRAu8

Bug: none
Change-Id: I9c11677b4a0e4bd24be5a5b43f3b9d1487458c55
Reviewed-on: https://chromium-review.googlesource.com/1173270
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#583941}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5f7817ed740db8b7740191baa6fa5a0215b5be4f
2018-08-17 02:28:35 +00:00
Erik Luo 3971e8af6c DevTools: fix regressed Object popovers, dark theme context
Fixes 2 recent regressions
- Object popover properties had extra scrollbars; now they have
  standard line-height and show overflow
- Dark theme forced SoftContextMenus, which appear behind the
  inspected page in DeviceMode; now they are not enforced by theme

Screenshots:
https://imgur.com/a/JOXwaGI
https://imgur.com/a/NmXVtyx

Bug: none
Change-Id: Ia79e2a23ea987f4ed9e2cd29ba02537bdd4db076
Reviewed-on: https://chromium-review.googlesource.com/1167887
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#581816}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 84a4561766e143b7753a3e0d1dfa46e37b5f0ee0
2018-08-09 07:27:08 +00:00
Erik Luo dad3f07c92 DevTools: expanded Objects hide overflow
All ObjectPropertiesSections call 'hideOverflow()', to avoid overflow
in the OPS's title (to adress crbugs 571759,571767).

However, hideOverflow does not hide overflow due to children, which
causes horizontal scrolling in Console.  This CL makes hide overflow
in properties for all OPS except JSONView.

Screenshot: https://imgur.com/a/x51xJNJ

Bug: none
Change-Id: Ie78f48cd873fd1d61b27c17e76683a4f7031aee8
Reviewed-on: https://chromium-review.googlesource.com/1162913
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#580726}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ae67481a95eded5fc4e09cb4befebc71a4443ef4
2018-08-04 01:51:50 +00:00
Joel Einbinder 3b2a16cf1f DevTools: Improve text selection in ObjectPropertiesSection
This consolidates the name, colon, and value into a single flex item,
which removes extraneous line breaks when copying text, improves
paragraph selection, and fixes some overlapping selection highlights.

Bug: 824625
Change-Id: I90e01990cbf8c2e90da4aba8a9a9bd0f035a8e67
Reviewed-on: https://chromium-review.googlesource.com/976329
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@{#562082}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 632db57a0254f5c56950416aa935988e2174029a
2018-05-26 00:32:19 +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