Commit Graph
12 Commits
Author SHA1 Message Date
Jesus David Garcia Gomez 61704b4db5 Styles: Prevent invisible properties to invalidate visible ones
e.g.
if your css looks like this:
.selector {
  -webkit-background-clip: text;
}

The backend will return two properties '-webkit-background-clip' and
'background-clip', but 'background-clip' is not visible in the styles
panel.

But even though 'background-clip' is not visible, it invalidates
'-webkit-background-clip'.

This behavior is not only for '-webkit-background-clip' there are
more '-webkit-' properties with the same behavior.

This CL fix this issue.

Before: https://i.imgur.com/0MfEApU.jpg
After: https://i.imgur.com/Mc1Wu72.jpg

Bug: 1163314
Change-Id: I1e35bd6cf2df297823ce313cc21d466825201add
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2613169
Commit-Queue: Jesus David Garcia Gomez <jegarc@microsoft.com>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2021-01-07 17:13:06 +00:00
Tim van der Lippe d7cfd14814 Fix no-implicit-coercion errors in front_end/
R=jacktfranklin@chromium.org

No-Presubmit: True
Bug: 1082789
Change-Id: Ic77884bf7e9b5dc74053915b3b10699368841b66
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2595268
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-07 12:40:16 +00:00
Tony Kostowny 3b97011cec Support expanding uppercased shorthand CSS properties
This bug was caused when the user passes in shorthand CSS properties
written in uppercase letters. The browser would not display the
'toggle-expandable' triangle indicating the availability of longhand
CSS properties.

The fix was to add toLowerCase() to the name argument inside of the
longhandsProperties() method. This allows the argument to be passed
into the longhands() method as a lowercase string, which then is able
to match the lowercase string and returns an array of longhand CSS
properties.

Screenshots:
- Before: https://i.imgur.com/qteeXcP.png
- After: https://i.imgur.com/Y9JzKQM.png

Fixed: chromium:918109
Change-Id: I018b3e7eccaa008ec2b9dbff101bb5681655e624
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2533305
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-11-12 08:42:10 +00:00
Tim van der Lippe 86e3a6a5ad Add missing return types for function parameters in sdk/
These are required for the upcoming TypeScript 3.9.2 upgrade.

R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: I6e9d568ea8a9c7482d355a7d8bc084a579a0202e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199120
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-05-13 11:31:01 +00:00
Alex Rudenko 1828890414 Typecheck CSSStyleDeclaration
Enables TypeScript for CSSStyleDeclaration

Bug: 1011811, 1079233
Change-Id: I6ee414d42b0ca2716d96e98af41dcd41b9dfd3d3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2193584
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-05-11 17:33:12 +00:00
Sigurd Schneider 5305bfcfbc Add missing import to CSSStyleDeclaration
Bug: chromium:1011811
Change-Id: I2da33e3a96c1f4a99bc9950d08d1854c7bc95b75
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2165797
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-04-27 15:14:46 +00:00
Tim van der Lippe dc9d2515c5 Add @ts-nocheck annotations to sdk and typecheck sdk/Connections.js
To enable full parallelization of all files in sdk/, we can add the
@ts-nocheck annotation to all files. This suppresses existing
TypeScript errors in these files.

We can then one-by-one remove these annotations and fix the issues
reported in these files. This allows us to parallelize the work
and work on many files at the same time.

As a starter, I typechecked sdk/Connections.js to verify that
typechecking works while all other files are not checked yet.
I did do so by locally suppressing all TypeScript errors in
SDKModel.js and remove the `instance` method on `TargetManager`.
I then confirmed that rebuilding with TypeScript correctly
fails on the missing method, but does not require SDKModel.js
itself to be typechecked.

Bug: 1011811
Change-Id: I46de3839f7d837e951967dd932218bda00c6ad5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2156352
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-04-22 13:17:59 +00:00
Tim van der Lippe 9293af7230 Migrate sdk/ to ESM internally
Bug: 1006759
Change-Id: I2bb0c8eaa4fdc89edd8da2b12d9fd0e08d427174
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003327
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-17 15:17:17 +00:00
Tim van der Lippe 9b7d21d126 Migrate sdk/ to ESM
Bug: 1006759
Change-Id: I3f5917ab3f5b3fb823ca460c395301ba19eed2df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841792
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5a7c8d13f806d781e8edb96a9b1f152d4fe1258a
2019-10-07 18:48:07 +00:00
Tim van der Lippe 1d6e57a0e3 Always add braces to single-line if-statements
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
2019-09-30 11:55:34 +00:00
Joel Einbinder 5429ac8a61 DevTools: Show malformed CSS properties in the Styles Sidebar
Previously CSS that was not correctly parsed would not appear in the
styles sidebar. If a mistake was made when editing CSS in the sidebar,
the property being edited could dissapear because it would no longer
be parsed correctly.

Bug: 813435
Change-Id: I20cb6b1e977545693c3f75171479d8e9041d83d9
Reviewed-on: https://chromium-review.googlesource.com/1089295
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#566196}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e328358f9e11cda5257454afba56dd2a7cd0b72
2018-06-11 23:22:22 +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