Commit Graph
35 Commits
Author SHA1 Message Date
Jack Franklin 49a9481a74 Lint color usage in background and border-* properties.
The list of CSS properties we check for colors wasn't thorough and
didn't include `border-left/right/top/bottom` or `background` on its
own. This CL fixes that and disables the rule for any current
violations.

Bug: 1152736
Change-Id: Ic732d653fdfab0462a04dc891bcece1f44e5d471
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2676157
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-02-05 15:39:39 +00:00
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
Jack Franklin 0d88cbb6fd Ban named-colors in our CSS
Used
https://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/ as
the reference and did a bunch of find and replaces. Should be no visible
changes; have checked by running DevTools locally and looking for
anything that looks off.

Note that system colors (e.g. HighlightText) are still permitted.

Fixed: chromium:1171775
Bug: chromium:1104187
Change-Id: I99c281886822deb5a5292ac8691a4f2f9e026428
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2656243
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-02-01 09:33:45 +00:00
Jack Franklin fd9dfaa5e7 [Dark mode] replace #fff background-color
This CL searches for CSS that matches:

- background: #fff
- background: #ffffff
- background: #white
- background-color: #fff
- background-color: #ffffff
- background-color: #white

And replaces the declaration with var(--color-background) from the new
set of color variables.

Bug: 1152736
Change-Id: Ia0575ccfa4e23c92fd4f83e6c911236dbb893fea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577559
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-01-11 16:18:06 +00:00
Wolfgang Beyer a7d0f83e94 Move adorner styles to globally accessible location
We are using adorners in the issues panel. Instead of duplicating the
adorner's styles there, move them to inspectorCommon.css which makes
them available everywhere.

Change-Id: I52fd5e3df9be2cdb291a22da8397143206f59924
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2428843
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2020-09-25 07:43:06 +00:00
Patrick Brosset 1e8df90606 Fix jumping horizontal scrollbar in the Elements pane
The recent fixes done in the Elements pane to force a horizontal
scrollbar when there isn't enough space have introduced a regression
whereby when hovering over nodes in the Elements tree, a scrollbar can
sometimes appear, and disappear as soon as you stop hovering.

Those recent fixes are:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2393465/
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2366972/

The reason the jumpy scrollbar occurs is that when a node is hovered,
instead of having its normal 12px padding left (to indent it compared to
its parent node), it gets a 5px padding left + 1px border + 6px margin.
This is so that expanded nodes can have a left border to easily see how
far down the go in the tree.

Moving from a padding to a combination of padding, margin and border
messes with how the width is calculated. And because of my previous
changes to the Elements pane, it forced a scrollbar to appear where it
should not.

My fix here is to always keep the 12px padding, and instead of using a
border to draw the indentation line, we now use a linear-gradient.
The advantage is that it doesn't mess with the width of the element.

Before: https://imgur.com/qDtSrug.gif
After: https://imgur.com/Mjl1vMz.gif

Bug: 1128873
Change-Id: Ie6952f4631e7f5842578fbe4429b66b2f3dc9111
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2414748
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2020-09-24 07:41:15 +00:00
Patrick Brosset 319303ff59 Fix unreachable nodes in Elements pane when scrolled horizontally
In this recent CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2366972/
I made a change so that the Elements pane would scroll horizontally when
it became too narrow to accomodate the displayed nodes (instead of
forcing them to wrap as veyr narrow columns of characters).

This is a follow-up fix to this change.
I realized that when the pane was scrolled to the right, then hovering
over nodes would not display the usual hovered background color or
highlight the corresponding node in the page.

The first part of the fix was to make sure long attributes could break
anywhere they needed. This is useful since a lot of pages have <a>
or <script> nodes that have very long url attributes.

The second part was making the nodes inline-block display so they could
naturally expand the whole width of the scrollable container instead of
being constrained to 100% (which does not covers the overflow area).

Before: https://imgur.com/O6ya2Td.gif
After: https://imgur.com/U4sWMhj.gif

Bug: 880265
Change-Id: I4a4900052e25839f015e4fee3d20be500d8a0de4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2393465
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
2020-09-14 10:19:07 +00:00
Patrick Brosset d996f5589a Allow horizontal scrolling in the Elements tree
The Elements tree does not scroll horizontally for now.
In most cases, it's good, because some nodes tend to be quite long, and
it's better to have them wrap on multiple lines so you can still see
everything at once without constantly scrolling left and right (which,
depending on the mouse/trackpad device you use, can be difficult).

However, we often run in cases where the lack of horizontal scrollbar is
a problem:
- long attribute values, such as urls wrap in places where it doesn't
make much sense and are harder to read
- more importantly: some web pages have deeply nested DOM trees, so much
that after a point, the nodes have so much left indentation that they
have no space left to the right to display any content. So you can be in
situations where a node is displayed 1 character at a time, over many
lines. Or even worse, certain nodes are not visible anymore.

This change removes the overflow-x:hidden CSS property so the Elements
panel can scroll if needed.
The change still retains the nodes' abilities to wrap (using
word-break: normal; make them wrap at word boundaries only) so in a lot
of cases, nothing will change for users.
However, this also introduces a minimum width for every node in the tree
which will force the horizontal scrollbar to appear after a point, and
will make sure each node has at least that much horizontal space to
display content.

Before/after example screenshot: https://imgur.com/MPO04CU.jpg

Bug: 880265
Change-Id: Ia3bfc1476868ce31ab8ac2f0d8adc59c61894d90
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2366972
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2020-08-24 20:04:26 +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
Changhao Han cd45b42b02 Fix adorner dark mode styles
I've also moved the dark-mode-related style out to the host because
this .theme-with-dark-background is more of the host's styling logic,
and shouldn't be the logic of Adorner.

screencast: https://imgur.com/a/SHXloTg

Bug: chromium:1116310
Change-Id: I0647c7b6b97042f4c6a4257dc746b4be6f641c6f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2354102
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-08-14 06:41:54 +00:00
Mathias Bynens e4de6b3c30 Reland “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.

TBR=changhaohan@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1104187
Change-Id: Ibf36fe5a3802b5f3ac663b7ac873a4758e0fda14
Fixed: chromium:1031475
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2297386
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2297393
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-07-14 14:47:38 +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
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
Sigurd Schneider e22dad5763 Fix stylelint-config-standard issues in front_end/elements/elementsTreeOutline.css
R=mathias@chromium.org

Bug: chromium:1083142
Change-Id: Idf95bed7f3ff33b3abf7d439c70e2919d5e10050
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2264124
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-07-01 07:19:39 +00:00
Changhao Han bc887de850 Fix adorner text center issue
The adorner text was in some cases off by 1 pixel to the top.
This CL fixes this style issue.

before: https://imgur.com/a/uPvqVXb

after: https://imgur.com/a/EzgQX7q

comparison: https://imgur.com/a/KNAUwta

Bug: chromium:1094723
Change-Id: Id530f24f98258ca39d6e886caaddffdc1501b88a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2249661
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-06-22 09:50:53 +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
Changhao Han 006b8c05bc Implement Adorner custom element with public API from ElementsTreeElement
Design doc: https://goo.gle/devtools-adorners

Bug: chromium:1066772
Change-Id: I8b31705471baf7612ac8ed8c305637c366796cf5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2151458
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-04-27 20:04:01 +00:00
Kalon Hinds 025a8b12d0 Remove transparent border-top from Elements tree rows
Previously, Elements tree rows had a transparent border-top to fix a bug
where there was unclick-able deadspace in between rows. This patch
removes the transparent border-top in favor of padding-top, since the
`forced-colors` heuristic makes these borders visible in high-contrast
mode.

Before: https://i.imgur.com/AEb8sSM.png
After: https://i.imgur.com/MAqFaxf.png
Bug: 1048378
Change-Id: I5c077d344f18d5b3f81419562ed030f5d0f8a9fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2076623
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
2020-02-27 17:43:47 +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
Paul Lewis 90be836d4d DevTools: Changes elements line-height to numeric value
We currently hard-code the line-height to 15px. The default font-size is
11px, which means it's a line-height of 1.36. By changing it to be
numeric value we can account for different font-sizes being set via
Chrome's settings.

Bug: 880612
Change-Id: I0fe7aefd04b9c4d4f68c81b5713213d901efbf0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787607
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#696796}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d8e167268d480246a437657e4a123db9b15c6517
2019-09-16 15:01:59 +00:00
Jeff Fisher 3f5f19cd8c DevTools: add keyboard interactions to linkified nodes
- Replace usage of 'title' in the DOMLinkifier and AuditsReportRenderer
  with 'tooltip'. This was a bug introduced during the initial DOMLinkifier
  refactor, see: https://crrev.com/a74a3fc0

- Refactor to pass the options into the Elements.DOMLinkifier.linkifyNodeReference
  instead of just the tooltip text, making it easier to extend and
  following the options config pattern.

- DOM linkified nodes by default can take keyboard
  focus by giving them a tab index and link activation on 'Enter' key.

- The nodes are also given the role of link for screen reader identification.

- API consumers can-opt out of keyboard focus by providing the option
  {preventKeyboardFocus: true}; this is useful if link navigation is
  handled by a context menu.

- Audits report nodes opt-in to keyboard focus.
- Performance event log nodes opt-in to keyboard focus.

- The following views are set to opt-out of keyboard focus to match their
  existing behavior as a migration strategy; these views can opt-in gradually:
  - AccessibilityNodeView
  - StylesSidebarPane

This meets the following WCAG success criteria
1.3.1 Info and Relationships https://www.w3.org/WAI/WCAG21/quickref/#info-and-relationships
2.1.1 Keyboard https://www.w3.org/WAI/WCAG21/quickref/#keyboard
4.1.2 Name, Role, Value https://www.w3.org/WAI/WCAG21/quickref/#name-role-value

Screenshot (Audits tooltip): https://i.imgur.com/zgQUHC3.png
Screenshot (Audits Light Theme): https://i.imgur.com/2eB7pJ4.png
Screenshot (Audits Dark Theme): https://i.imgur.com/VfEFbAF.png
Screenshot (Performance Event Log): https://i.imgur.com/f9YcbC5.png

of the accessibility audit details to view a linkified node.

Test: Create an empty .html file, host it and run an accessibility audit, expand any
Bug: 963183
Change-Id: Ibc3acd4eccf03f408087248b1389d0dd807d9443
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1750153
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#691276}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c4f6092e42657a3b4544d70223b507fd39a4fd31
2019-08-28 19:10:02 +00:00
Erik Luo 7d290dbd41 DevTools: fix position of gutter decorations
Positions of gutter decorations regressed in [1] when an element
that used to be display: none became visibility: hidden.

This CL fixes the positions of decorations to be at the top of
the row.

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

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1702746

Bug: 994296
Change-Id: I8bccaa8c8e1b1f77d905c5b66fc43431f5733e4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769255
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#691195}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 41418672e83ed391126c0ecae5df5119ad7665c1
2019-08-28 16:07:48 +00:00
Junyi Xiao 0ccf6db244 Devtools: a11y fixes for Memory heap profiler
Accessibility testing revealed the following issues within the tool:
1. no focus indicator on javascript VM instances list

This change:
changes current selected/hover and adds selected but inactive color to match treeoutline in Element

Bug: 963183

Workflow gif: https://imgur.com/a/lHNTOP7

Change-Id: Iaed79d7166bf70011711be548ba66c65a57922da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678946
Commit-Queue: Junyi Xiao <juxiao@microsoft.com>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#690483}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 522709bc5b3158fdaef516f391d382d7321e505f
2019-08-26 20:26:47 +00:00
Erik Luo 2f3f97d078 DevTools: workaround for slow Elements tree layouts
Holding ArrowUp/Down to quickly navigate the Elements tree can cause
a 5+ sec freeze in DT UI, with LayoutNG.

This CL avoids the slowdown, primarily caused by proliferous
re-layouts when adding/removing the 'selected' class.

Bug: 980399
Change-Id: I5459a4a7571843cd9e7072b6ff0c9e36ce19e10e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702746
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#677513}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a54c956bf3e164c7ee168474ecea07b4f3064ea5
2019-07-15 22:11:54 +00:00
Joel Einbinder f6f86b6a43 DevTools: SVG Icons
This switches our icons to use svg instead of png. It replaces
the png optimizer with an svg optimizer.

Change-Id: I63f8de9059502ab952d39bbefe5da1f6d4708d37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1643403
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667807}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 56a647b2510baf3b314fab1130dbe08c191c9072
2019-06-10 23:19:12 +00:00
Joel Einbinder b64f5cef66 DevTools: Remove 1px of dead space between elements tree items
There was 1px of margin on items in the elements tree outline. If that
area was clicked, selecting a new element would fail.

Change-Id: I62c3aeb814759349c05582ac6b23309901e6d98e
Reviewed-on: https://chromium-review.googlesource.com/c/1387453
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#628193}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 12e6395ca993404b881e17c0e7540dd0bd197e75
2019-02-01 01:44:36 +00:00
Pavel Feldman 33b4091e40 DevTools: migrate to the light selection color to achieve 4.5+ contrast ratio.
Bug: 850500
Change-Id: Iccf9ca5fe088aa09d46dc4dd3344be79f28013a8
Reviewed-on: https://chromium-review.googlesource.com/c/1388027
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#618701}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6b6debfc317059bbe69de528507b9b397333a612
2018-12-22 01:08:02 +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 fc6a630571 DevTools: navigable ElementsTreeOutline in Console
Introduces a common interface between ElementsTreeOutlines and
ObjectPropertiesSections. This allows both to be keyboard navigable
in Console.

Bug: 865674
Change-Id: I405d161692147374827918cce2369d129620a9fd
Reviewed-on: https://chromium-review.googlesource.com/c/1275225
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604855}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: de8a9c26f6a4e28bc14e613e0d97cae69aef749b
2018-11-02 06:48:52 +00:00
Oriol Brufau 23e7fc0c85 [css-logical] Use standard logical properties in /third_party/blink
Bug 850000 added standard logical properties and aliased prefixed ones
to them. The prefixed properties are still used in various places, but
the standard ones should be used instead. This patch replaces all the
uses in /third_party/blink

Spec: https://drafts.csswg.org/css-logical/#box

BUG=862141

Change-Id: I4d50faa5071ce735931488990d6c2275e57932f7
Reviewed-on: https://chromium-review.googlesource.com/c/1163785
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Original-Commit-Position: refs/heads/master@{#600531}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2976bc70cae2f802321faf3087573229e851bb0c
2018-10-17 20:07:31 +00:00
Erik Luo 13383eb145 DevTools: Console click handler should not capture
This CL
- Changes _messagesClicked's useCapture: true > false.
- Hides gutter on Elements rendered outside ElementsTreeOutline.

This affects two cases:
A) Group with expandable objects (e.g. `console.group({x: 1})`),
user clicks on the object.

Now, clicking an object only expands the object, not the group.

B) Element logged in Console (e.g. `document.body`),
user clicks on "expand triangle", which overlaps with its gutter.

Now that _messagesClicked does not capture, context menu would show
upon clicking the gutter. This CL hides the gutter to allow
expanding Elements in Console.

Bug: 876162
Change-Id: I259f7f305d5ab975a4e8313d9200ff81d13eb9ec
Reviewed-on: https://chromium-review.googlesource.com/1198422
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#592574}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b420ade8c887d6f9acd7be0d4f0b14c6553ac743
2018-09-19 22:21:48 +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