Commit Graph
17 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 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
Simon Zünd d69e945fe7 Fix stylelint-config-standard issues in security/mainView.css
R=mathias@chromium.org

Bug: chromium:1083142
Change-Id: I045c4c7b1dd55a5de3f2418cd1606f58558ad8c3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2259842
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-06-23 10:10:06 +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
Kalon Hinds 0cf5b5b69d High contrast support for the Security Panel
This patch provides forced-colors overrides to make icons and relevant
security info visible in high contrast mode.

Before: https://imgur.com/a/5NIJzYi
After: https://imgur.com/a/4Q4yPWa
Bug: 1048378
Change-Id: I5f925f498ac8523d9c69d3b0a13ebe3a8310ebe0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2057534
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
2020-02-19 20:23:06 +00:00
Michael Liao 3fb7695435 [Security]: Removing aria-haspopup from "View Certificate" buttons
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1819626 to DevTools repository

Test Disable CL: https://chromium-review.googlesource.com/c/chromium/src/+/1894401
Test Fix CL: https://chromium-review.googlesource.com/c/chromium/src/+/1819626

Changes:
- "View Certificate" button is no longer marked as aria-haspopup
- Removing security-certificate-button css class since we can just use the existing origin-button class to retain consistency between certificate buttons.

Reason:
- The only aria-haspopup option in Chromium is submenu
- view certificate should be a dialog popup but would rather not label than mislabel

According to W3C docs (https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup):
"Authors MUST ensure that the role of the element that serves as the container for the popup content is menu, listbox, tree, grid, or dialog, and that the value of aria-haspopup matches the role of the popup container."

Since Chrome operates on aria 1.0 which only has aria-haspopup values of true (menu) and false, we cannot accurately label a dialog popup.

Change-Id: I752f6b47f9e805f1f626cf993583da3005e3d16a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871825
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
2019-12-11 00:35:10 +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
Livvie Lin 6a61f8415e [DevTools] Update SecurityPanel for grey triangle experiment
Security UX is experimenting with using a grey triangle warning for
non-secure site connections (crbug.com/997972). When this icon is
shown, DevTools Security panel's security overview should match the
state shown in the omnibox.

Previously, crrev.com/c/1874787 added the insecure-broken state to
the DevTools protocol, so this cl does the setup so that once the
insecure-broken state gets sent for the DANGEROUS security state
(crrev.com/c/1879498, which needs to be submitted after the frontend
changes) and non-secure connections get styled as kInsecure
(crrev.com/c/1877653), the triangle pointer will point to the correct
icon. For non-secure states, reuse the triangle icon but style it
differently depending on whether the state is HTTP or broken HTTPS.

Bug: 1008218
Change-Id: Ib893489a9d7c450892eff5e33bbbf3f2aef2e283
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880092
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Livvie Lin <livvielin@chromium.org>
2019-10-25 16:14:14 +00:00
Jan Scheffler 673dec0c44 [devtools] Make links look like links
This patch adds a createTextLink method to create
text links and uses it in the security > origin view to
link to the network pane. It also adds "show more" and
"show less" classes for to the text link.

Bug: chromium:977423
Change-Id: If5ff95e5d26af3a20680e93e23e110b912a41de4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1789531
Commit-Queue: Jan Scheffler <janscheffler@google.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#699635}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2d23c1d6ec05bae5d56cc417b90146d9064dde95
2019-09-25 06:00:01 +00:00
Michael Liao (WPT) 73a506ef71 Devtools: making security origin and overview page accessible + adding tests
Changes:

Origin:
- 'Origin' text is now a header 1
- 'Connection' text is now a header 2
- 'Certificate' text is now a header 2
- 'Certificate Transparency' text is now a header 2
- 'Show more/less' and 'Show full details' links are now marked as buttons and are keyboard accessible

Overview:
- 'Security overview' text is now a header 1
- page security description is now a header 2
- 'View x in network panel' link is now marked as a button and is keyboard accessible

.devtools-link css changes:
https://imgur.com/a/9FtpsU4

link elements to button element change:
https://imgur.com/zSMcGVQ

CR Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=962686

Change-Id: I3a62e898d7135ace1d8a9c76dfdbad382c928500
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1606195
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#672600}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ec4778d2487334d68e9fdc9c55d95ab4b9bddf3f
2019-06-26 19:02:00 +00:00
Joel Einbinder e1c93d9cb6 DevTools: Remove 20kb of unused CSS
These css rules used classes that don't exist anywhere in the
javascript. A script was written to find them, but manually checking
is still needed because some scripts generate class names by
string concatenation like 'icon-' + iconType

Change-Id: I15c4f26451b9fa371b366a8977021e2af7eca449
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1618043
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#661630}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e6f259d6e2834c9b0e2cbb0fdd7c9703e1fc6968
2019-05-21 06:16:13 +00:00
Livvie Lin fb0fce693c [DevTools] Improve contrast of "This page is not secure" overview text
Updates color from yellow to black (by relying on default color)
to improve contrast and better match neutral state icon color.

Screenshot: https://drive.google.com/file/d/1JMptH0qC9cIyPIzSD99T29Qvm22M4fr-/view?usp=sharing

Bug: 900027
Change-Id: I1732de356aed28c4c505b5b24cf0e3c666b927fb
Reviewed-on: https://chromium-review.googlesource.com/c/1321858
Commit-Queue: Livvie Lin <livvielin@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#606265}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4050cb84521fe475dd958f2378327ab4662892c8
2018-11-08 01:06:30 +00:00
David Benjamin abaa04857e Improve contrast in the DevTools security panel.
The current coloring is:

Background: #fff or #f3f3f3 (DevTools background)
Title text: rgb(48, 57, 66) or #303942 (DevTools default)
Heading text: rgb(90, 90, 90) or #5a5a5a
Explanation text: #8c8c8c

Obsolete settings end up putting #8c8c8c over #f3f3f3 which rather low
contrast. The last two colors are only used in the security panel, so
they don't appear to come from some overall DevTools palette.

Darken everything up a notch. Match the heading text with the title and
DevTools default. (The title font is already much larger than the
heading font, so we retain visual hierachy.) That frees rgb(90, 90, 90)
for use with the explanation text, which is more readable over #f3f3f3
and is still lighter for visual hierarchy.

Screenshots: https://drive.google.com/open?id=1VQV2xVo1sVKJD0sIgj48W-d_SRJCZHpG

Bug: 889994
Change-Id: I539088f3026db4db2d50a5a27a3f6abf30da3e4f
Reviewed-on: https://chromium-review.googlesource.com/c/1255895
Commit-Queue: David Benjamin <davidben@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#602832}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 343b3cf56e929c08b2797b2dcf75a704fc4a5ce1
2018-10-25 19:45:42 +00:00
David Benjamin f2136e12b8 Show actionable advice for obsolete TLS settings in DevTools
The security panel currently points out obsolete features in the form of a long
cumbersome sentence like:

    The connection to this site uses TLS 1.2 (a strong protocol), ECDHE_RSA
    with P-256 (a strong key exchange), and AES_256_CBC with HMAC-SHA-1 (an
    obsolete cipher).

It is hard to pick out what is wrong, and it does not say what to use instead.
It also does not allow for new fields without being even more cumbersome. (The
server signature is missing.)

Replace this with *actionable* advice for the site administrator.
Implementation-wise this does the following:

- Replace "secure (strong TLS 1.2)" with "secure connection settings" to mirror
  the existing "obsolete connection settings" text.

- Extend SecurityStyleExplanation with a list of recommendations. These show as
  a list under the "obsolete" heading.

- With the secure/obsolete details moved to the recommendation list. Remove the
  "(a strong protocol)" and "(an obsolete cipher)" parentheses and simplify the
  top-level sentence.

- And with the cumbersome sentence fixed, *finally* unblock incorporating the
  server signature into the secure/obsolete status. This CL thus additionally
  routes the server signature out of //net and into the SecurityStyleExplanation
  logic.

Screenshots: https://drive.google.com/open?id=1-JTy2aMWvKImrZSKrOWlUAG7WU2KKarg

This CL does not change the styling or other details of how the security style
explanations are presented, though it's been noted the contrast is too low, so
we may wish to fix the styling either as a follow-up or in this CL.

Bug: 889994
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I913679f77fd5fb0cf018c4a20c2f098effa32674
Reviewed-on: https://chromium-review.googlesource.com/c/1250164
Commit-Queue: David Benjamin <davidben@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Nick Harper <nharper@chromium.org>
Reviewed-by: Adrienne Porter Felt <felt@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#602557}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e7e073ef030ef6d51ea77878bbe9e46cd2007c41
2018-10-25 01:26:06 +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