Tim van der Lippe
bcd6b5c3ff
Inline and remove isEnterKey
...
R=szuend@chromium.org
Bug: 1050549
Change-Id: I7242fa3b0c2a69d2e4b4dd7c642ba09a5f4dc9bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2624713
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
2021-01-13 13:02:42 +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
Yisi
508bcddc99
Fix: right-click in CSS var() cannot open the context menu
...
This CL solves the problem that right-clicking in CSS var() will jump to the defined position. The context menu is now displayed correctly.
Bug: 1152391, 1124707
Change-Id: I961eda46abe5fbe552260f3761596f968cecb1ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593293
Reviewed-by: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com >
Commit-Queue: Changhao Han <changhaohan@chromium.org >
2020-12-16 22:24:55 +00:00
Michael Liao
6035f4a583
[Font Editor Prototype]: Implements Experimental Typography CSS Editor in Styles Pane
...
Reference Document: https://docs.google.com/document/d/1zvmKDfdgVgL-QX2W4nKfgoeG_69YDF0AsLerIzL3rPE/edit?usp=sharing
Explainer: https://docs.google.com/document/d/1TmvbZuJR4fHuViE0X23y_1kUT43qt98mdj5GZxWf_W0/edit
Bug: 1093229
Change-Id: I0a8d049bd564a5ba547466067a12185565af7820
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2305613
Commit-Queue: Michael Liao <michael.liao@microsoft.com >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
Reviewed-by: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Songtao Xia <soxia@microsoft.com >
Reviewed-by: Tony Ross <tross@microsoft.com >
Reviewed-by: Shane Clifford <shanejc@microsoft.com >
2020-12-01 19:54:05 +00:00
Yisi
3ceec8ebf9
Fixed copy declaration(context menu) with no space after colon
...
Before: padding:10px; or padding: 10px;
After: padding: 10px;
This is more readable and consistent with `Copy all declarations`.
Bug: 1152391
Change-Id: I636c3e110325b09effe69cc1c5fb722b336ced17
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566428
Reviewed-by: Changhao Han <changhaohan@chromium.org >
Commit-Queue: Changhao Han <changhaohan@chromium.org >
2020-12-01 12:51:16 +00:00
Yisi
3c1ec23006
Add copy css context menu in Styles panel
...
This CL adds the following context menu:
- Copy selector // Copy the current selector.
- Copy rule // Copy the CSS ruleset of the current node, hereafter referred to as rule.
- Copy all declarations // Copy all declarations under the current rule, including invalid and prefixed properties.
- Copy declaration // Copy the declaration in the current line.
- Copy property // Copy the property in the current line.
- Copy value // Copy the value in the current line.
Screenshot: https://i.imgur.com/AFYtnPd.png
In addition, orders placed in the 'Copy styles' context menu respect the indentation in the DevTools settings.
Bug: 1152391
Change-Id: I0ba0489cc1f539dd22d372c399ab155670bfc57c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2557071
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2020-11-30 16:30:51 +00:00
Tim van der Lippe
70842f313f
Replace title property setter with Tooltip install invocation
...
ui/Tooltip.js overrides the HTMLElement prototype to override the
title property. Rather than using this property, we shoul be
calling Tooltip.install directly. This makes sure that new
components are not relying on the behavior of the legacy
prototype patching.
These usages have been manually audited using the following regexes:
Search: ([\S]+)\.title = ([^;]+);
Replace: UI.Tooltip.Tooltip.install($1, $2);
Note that there are classes in DevTools that also have a title
property. Most notably `TreeElement`. We should not be replacing
these, as they do not inherit from HTMLElement. Luckily, we are
running TypeScript to make sure we don't call `Tooltip.install`
with a non-HTMLElement.
A follow-up CL will clean up the getters.
R=jacktfranklin@chromium.org
Bug: 1150762
No-presubmit: True
Change-Id: I5928e75c70293531849e0576f4fb2a2a8b3e02d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2555060
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-11-23 17:16:46 +00:00
Sigurd Schneider
e18667ab58
[ts] Type-check ui/Treeoutline.js with TypeScript
...
Bug: chromium:1011811
Change-Id: I12aaa2e1776e57f0ff61443f788035d5f7991b4f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2550068
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2020-11-19 16:26:43 +00:00
Jack Franklin
005e840323
TypeScriptify ui/ContextMenu.js
...
Bug: 1011811
Change-Id: I952ba24d967060914adbf7a8885ae97ca26084b8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2549790
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2020-11-19 12:33:24 +00:00
Tim van der Lippe
2e4ad365f6
Remove bridge files from inline_editor
...
Since inline_editor is now TS-only, the bridge files are no
longer necessary.
R=changhaohan@chromium.org ,jacktfranklin@chromium.org
Bug: 1011811
Change-Id: I081dc8653aa255892f785fd847d81cd550535696
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2546922
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Changhao Han <changhaohan@chromium.org >
2020-11-18 14:57:08 +00:00
Changhao Han
45bd77db91
TypeScriptify StylesSidebarPane.js: final part
...
DISABLE_THIRD_PARTY_CHECK=adding new TypeScript definition file
Bug: chromium:1011811, chromium:1093296
Change-Id: Ifb03cf74d98ab4c3aeba40bdce19051e85ffdd38
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2544482
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-17 21:13:27 +00:00
Changhao Han
7969fdd595
Fix CSSAngle unit conversion issue
...
This CL fixes two issues:
1. unit conversion would lose precision after several rotations;
2. unit conversion would persist to the backend, which is inconsistent
with other swatches' behaviors.
Bug: chromium:1147435
Change-Id: I041b4a941019692f8fb9597911131fdea2d07bcc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2529357
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2020-11-10 17:31:18 +00:00
Changhao Han
406f1d8636
Update popover state to only allow one popover in Styles pane
...
Bug: chromium:1142525, chromium:1126178
Change-Id: Ie5bad0344bc402b533429be38e03187f51406988
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2509584
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Changhao Han <changhaohan@chromium.org >
2020-10-30 13:33:25 +00:00
Changhao Han
8655e96a00
Move CSSAngle-related files from elements/ to inline_editor/
...
In the future, I expect more type components to reside in inline_editor/
because it's where current type-component-like components live, e.g.
ColorSwatch, BezierSwatch, etc.
Bug: chromium:1126178
Change-Id: Icfc9553c5f3e54ef94e04de50cda8b7ef7a9bc8a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2509573
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Changhao Han <changhaohan@chromium.org >
2020-10-30 11:25:26 +00:00
Changhao Han
07a68b23bb
Add contextual background for angle component v1
...
This adds simple contextual background for angle components, i.e. cases
when applying the entire CSS property value makes sense. Therefore, we
only apply this to three CSS properties: color, background, and
background-color. After we refactor the way CSS properties are parsed
in the frontend, we can do more atomic and precise contextual background
in v2: https://crbug.com/1143010 .
Video: https://imgur.com/a/0DUJZQy
Bug: chromium:1138633, chromium:1126178
Change-Id: Ib4a3e3904d410d2432134a28f67029856d3ac9cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2503512
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Adam Argyle <argyle@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2020-10-28 22:56:28 +00:00
Patrick Brosset
394c92ff64
Use the new color-swatch component in CSS vars
...
The recently introduced CSSVarSwatch component was handling color-like
variables on its own, by displaying a color swatch when needed.
This color swatch did not support shift-click format changes, nor click
to change the color.
This change removes this handling and uses the new color swatch
component instead.
This way, click and shift-click on color swatches for CSS vars does work
as expected (even if it "computed" the value and therefore removes the
var link).
GIF: https://imgur.com/egBMRU6.gif
Bug: 1137438
Change-Id: Ie7b6cf31833b6c3e0b8b225da5f4bdf512876a17
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2495208
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
Reviewed-by: Shane Clifford <shanejc@microsoft.com >
2020-10-28 18:08:22 +00:00
Changhao Han
8d08014305
Angle component style fixes
...
This CL adds more shadow to the clock and its hand, and uses proper
math to calculate the hand and the dials' positions instead of using
the transparent gradient trick. This makes round edges in the hand
and the dials possible.
Bug: chroimum:1141435, chromium:1126178
Change-Id: Ia61e957b7537a0b7739cc83ede75d2999a2d7106
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2494809
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Auto-Submit: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Adam Argyle <argyle@chromium.org >
2020-10-26 22:53:06 +00:00
Patrick Brosset
284a5933e2
Refactor the ColorSwatch to use TypeScript and LitHTML web component
...
This will make it possible to reuse this component in other new-style
web components like CSSVarSwatch (which, today, duplicates the logic).
The ColorSwatch has a number of different consumers today that require
different things from it. I looked at all these consumers and based on
them defined an API that should work for everything:
- renderColor: which accepts either a parsed color or a string to be
parsed as well as an optional format (or flag to use the format from the
user settings) and an optional tooltip.
- swatch-click event: to alert consumers when the swatch is clicked, so
they can hook up the colorpicker to it.
- format-changed event: to alert consumers when the swatch is
shift-clicked so they can react to the new format.
This component has 1 slot that consumers can use to display the color
value as text.
This is useful mostly for the Styles pane. Indeed, the way properties
are edited in that pane relies on them having an available textContent.
So the color string needs to be in the light DOM, not only in the shadow
DOM.
This is why you'll see the slotted element being updated when the format
changes.
Bug: 1137438
Change-Id: I27b757e63a54be2899d9d6b0e94d1af54f3ee22d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2480042
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com >
Reviewed-by: Shane Clifford <shanejc@microsoft.com >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Changhao Han <changhaohan@chromium.org >
2020-10-23 08:04:21 +00:00
Paul Lewis
b68f669c4e
TypeScriptify StylePropertyTreeElement.js
...
R=jacktfranklin@chromium.org
Bug: 1011811
Change-Id: I5f8a0710f77bd6f8c6b067de02935783b7f52815
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2485088
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-10-22 12:28:59 +00:00
Changhao Han
a67320cd7c
CSS <angle> component
...
Design doc: https://docs.google.com/document/d/1CvsRHYzEYO2ESLvferomPjqlnseVwnxp6Tb_WoXvfOE/edit#
Screencast run 1: https://imgur.com/a/73cBBZW
Screencast run 2: https://imgur.com/a/NSbMb0a
Bug: chromium:1126178
Change-Id: Id667caf1fafe0b47a8f9094846dd054d3abf264d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2372546
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2020-10-16 15:42:07 +00:00
Sigurd Schneider
23c5297dda
Remove DOM prototype patching of createTextChild(ren)
...
Bug: chromium:1011811
Change-Id: I44a66c10efd317dcb7d5a4f58ab4be0fded4b215
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2466182
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
2020-10-13 10:23:48 +00:00
Patrick Brosset
9812601eb6
Track clicks on var() function links
...
Record a devtools action taken when users click on a link inside a var()
function.
This depends on backend CL: https://chromium-review.googlesource.com/c/chromium/src/+/2451925
Bug: 1124707
Change-Id: I6034bc9b29ec2df7d832edd1b781689fa924e551
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2451605
Reviewed-by: Tony Ross <tross@microsoft.com >
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com >
2020-10-09 07:30:58 +00:00
Patrick Brosset
d93ee76664
New jump-to-var feature in the Styles pane
...
This implements a new feature called jump-to-var.
It allows users to quickly jump from a custom property used in a var()
CSS function to where this property is defined.
A simple link underline is displayed for those.
If the property used does not exist, then no underline appears.
The explainer for this feature can be found here:
https://docs.google.com/document/d/1LRwH_lIO-gqe8hWzVq8QGFsJ27eEl158nFsuPlLGfnU/edit#
Demo: https://imgur.com/fI6YBBq.gif
Bug: 1124707
Change-Id: Ie9360f7dcace7621e4352fc4e6301e4c991b166e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2425340
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com >
Reviewed-by: Songtao Xia <soxia@microsoft.com >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2020-10-05 17:30:41 +00:00
chait pinnamaneni
e11be3c4ad
[DevTools] Shorthand properties bug fix
...
If user creates a new property which overloads the expanded longhand property for a CSS property
defined in the same section, the longhand property is not getting overloaded in the styles pane.
https://i.imgur.com/3bBDljf.png
Bug:1002914
Change-Id: Ib633a3deb45b294a4504a4e8af4d1632d4f9a975
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2393466
Commit-Queue: Chait Pinnamaneni <cpinnamaneni@microsoft.com >
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com >
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com >
Reviewed-by: Michael Liao <michael.liao@microsoft.com >
2020-09-24 20:56:26 +00:00
Paul Lewis
6d4ebb2006
Reland "Reland "Updates elements to devtools_module""
...
This reverts commit 340bd16cd3 .
Reason for revert: devtools_pre_built no longer makes hardlinks
Original change's description:
> Revert "Reland "Updates elements to devtools_module""
>
> This reverts commit 04858cf7dd .
>
> Reason for revert: This seems to trigger the known issue that
> TSC is rewriting source files because of left-over hard-links.
> See https://ci.chromium.org/p/devtools-frontend/builders/ci/Stand-alone%20Linux/2582
>
> To reproduce locally, check out the commit before this revision,
> do a clean build, then check out this revision, and do a build.
> This will succeed but rewrite source files (which it shouldn't).
>
>
> Original change's description:
> > Reland "Updates elements to devtools_module"
> >
> > This reverts commit 22d876ca02 .
> >
> > Reason for revert: Build issues on bots should be fixed
> >
> > Original change's description:
> > > Revert "Updates elements to devtools_module"
> > >
> > > This reverts commit 81e818fad8 .
> > >
> > > Reason for revert: Anticipating build errors on bots
> > >
> > > Original change's description:
> > > > Updates elements to devtools_module
> > > >
> > > > Bug: 1101738
> > > > Change-Id: I294d366c95a3b5dc7ac5b757855846a7b31ac60b
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2329779
> > > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> > > > Commit-Queue: Paul Lewis <aerotwist@chromium.org >
> > >
> > > TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
> > >
> > > Change-Id: I3e36a1520e34be3ce1779ecdf2b4cead6a293971
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: 1101738
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2332815
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org >
> > > Commit-Queue: Paul Lewis <aerotwist@chromium.org >
> >
> > TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
> >
> > # Not skipping CQ checks because this is a reland.
> >
> > Bug: 1101738
> > Change-Id: Ia0d06bb75f2610459f4d0b31ff6b770b1031d982
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335060
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org >
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> > Commit-Queue: Paul Lewis <aerotwist@chromium.org >
>
> TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
>
> Change-Id: Iabfbe2aad94033078eac41338d64ca069f49332f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1101738
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335273
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org >
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
TBR=sigurds@chromium.org ,aerotwist@chromium.org ,jacktfranklin@chromium.org
# Not skipping CQ checks because this is a reland.
Bug: 1101738
Change-Id: I42579d6cac06ec45377789253588ba94ee72a226
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2336715
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2020-08-10 09:15:45 +00:00
Sigurd Schneider
340bd16cd3
Revert "Reland "Updates elements to devtools_module""
...
This reverts commit 04858cf7dd .
Reason for revert: This seems to trigger the known issue that
TSC is rewriting source files because of left-over hard-links.
See https://ci.chromium.org/p/devtools-frontend/builders/ci/Stand-alone%20Linux/2582
To reproduce locally, check out the commit before this revision,
do a clean build, then check out this revision, and do a build.
This will succeed but rewrite source files (which it shouldn't).
Original change's description:
> Reland "Updates elements to devtools_module"
>
> This reverts commit 22d876ca02 .
>
> Reason for revert: Build issues on bots should be fixed
>
> Original change's description:
> > Revert "Updates elements to devtools_module"
> >
> > This reverts commit 81e818fad8 .
> >
> > Reason for revert: Anticipating build errors on bots
> >
> > Original change's description:
> > > Updates elements to devtools_module
> > >
> > > Bug: 1101738
> > > Change-Id: I294d366c95a3b5dc7ac5b757855846a7b31ac60b
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2329779
> > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> > > Commit-Queue: Paul Lewis <aerotwist@chromium.org >
> >
> > TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
> >
> > Change-Id: I3e36a1520e34be3ce1779ecdf2b4cead6a293971
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1101738
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2332815
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org >
> > Commit-Queue: Paul Lewis <aerotwist@chromium.org >
>
> TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
>
> # Not skipping CQ checks because this is a reland.
>
> Bug: 1101738
> Change-Id: Ia0d06bb75f2610459f4d0b31ff6b770b1031d982
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335060
> Reviewed-by: Paul Lewis <aerotwist@chromium.org >
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> Commit-Queue: Paul Lewis <aerotwist@chromium.org >
TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
Change-Id: Iabfbe2aad94033078eac41338d64ca069f49332f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1101738
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335273
Reviewed-by: Sigurd Schneider <sigurds@chromium.org >
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
2020-08-03 14:47:19 +00:00
Paul Lewis
04858cf7dd
Reland "Updates elements to devtools_module"
...
This reverts commit 22d876ca02 .
Reason for revert: Build issues on bots should be fixed
Original change's description:
> Revert "Updates elements to devtools_module"
>
> This reverts commit 81e818fad8 .
>
> Reason for revert: Anticipating build errors on bots
>
> Original change's description:
> > Updates elements to devtools_module
> >
> > Bug: 1101738
> > Change-Id: I294d366c95a3b5dc7ac5b757855846a7b31ac60b
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2329779
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> > Commit-Queue: Paul Lewis <aerotwist@chromium.org >
>
> TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
>
> Change-Id: I3e36a1520e34be3ce1779ecdf2b4cead6a293971
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1101738
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2332815
> Reviewed-by: Paul Lewis <aerotwist@chromium.org >
> Commit-Queue: Paul Lewis <aerotwist@chromium.org >
TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
# Not skipping CQ checks because this is a reland.
Bug: 1101738
Change-Id: Ia0d06bb75f2610459f4d0b31ff6b770b1031d982
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335060
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-08-03 14:01:07 +00:00
Paul Lewis
22d876ca02
Revert "Updates elements to devtools_module"
...
This reverts commit 81e818fad8 .
Reason for revert: Anticipating build errors on bots
Original change's description:
> Updates elements to devtools_module
>
> Bug: 1101738
> Change-Id: I294d366c95a3b5dc7ac5b757855846a7b31ac60b
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2329779
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> Commit-Queue: Paul Lewis <aerotwist@chromium.org >
TBR=aerotwist@chromium.org ,jacktfranklin@chromium.org
Change-Id: I3e36a1520e34be3ce1779ecdf2b4cead6a293971
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1101738
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2332815
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-08-03 11:24:30 +00:00
Paul Lewis
81e818fad8
Updates elements to devtools_module
...
Bug: 1101738
Change-Id: I294d366c95a3b5dc7ac5b757855846a7b31ac60b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2329779
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-08-03 11:07:47 +00:00
Alex Rudenko
25a810222f
Warn when font-variation-settings are not used correctly
...
When font-variation-settings don't match the one supported by
relevant font faces, display a warning icon with warnings next
to the font-variation-settings property in the Styles panel.
Screenshot: https://i.imgur.com/JaHEvn1.png
Bug: 971878
Change-Id: I19a83bc003c282e19585edeabe0650e43bc4a36a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2292280
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2020-07-16 06:38:21 +00:00
Songtao Xia
2dcb84564b
[DevTools] [Styles] Keyboard focus set after editing
...
The accessibility bug below is about lost keyboard focus after using
keyboard to edit style rules. It reveals a flaw in the style editing
code: it is justifiable to call "toggle property and continue editing"
when the property is being typed. But when the command handler realizes
that we need to cancel this editing, the following problems occured.
1) The cancel editing code is called before the necessary information
for continuing editing is gathered. An exception can be thrown. The fix
orders them correctly.
2) The continue editing code does not set the focuses correctly. There
are three situations:
2.a) the canceled editing is in the middle of a list of properties;
focus/editing-starting position should be at the next property.
2.b) the canceled editing is at the end of a list of properties; it
should be reasonable to set focus/editing-starting position at the
last property.
2.c) the section has no css rules; it is reasonable to set focus on
the section itself.
Screen recording for 2.a and 2.c:
continue editing the next property:
https://imgur.com/VFJjhE2
no property in section, focus on section:
https://imgur.com/mlhgo5t
Change-Id: Ic8c41ef3acc4f55331356b651aabcf7dc90ca43e
Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1081766
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2196823
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com >
Reviewed-by: Brian Cui <brcui@microsoft.com >
Commit-Queue: Songtao Xia <soxia@microsoft.com >
2020-05-15 03:08:26 +00:00
Michael Liao
509eb2aa10
[Style Property Tree Element]: Fixing bug where StylePropertyTreeElement.property is incorrectly set
...
Issue:
- When deleting a StylePropertyTreeElement via an empty string, the updatedProperty variable (which is eventually set to this.property) is incorrectly set.
- this._style removes the deleted property on line 1145 at "let success = await this.property.setText(styleText, majorChange, overwriteProperty);"
- When fetching updatedProperty via this._style.propertyAt(this.property.index), this.property.index is not adjusting for the deleted property
- This results in setting updatedProperty to an incorrect property (usually the property after the deleted one) or null (if you are deleting the last property in the section).
Changes:
- Adding check if the property is a majorChange (committing changes) and if the styleText is empty (will delete property)
- In this case, it will keep the property as is to avoid setting it to null or another property.
Bug: 1077097
Change-Id: I76d13fc78ef02c2a85e3b9875ec7c763d313508f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2175085
Reviewed-by: Tony Ross <tross@microsoft.com >
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com >
Commit-Queue: Michael Liao <michael.liao@microsoft.com >
2020-05-04 19:05:41 +00:00
Tim van der Lippe
c0c46e5f47
Use CSSMetadata URL regex in StylePropertyTreeElement.js
...
We already have a (correct) regex defined in CSSMetadata. However,
we weren't using that in the StylePropertyTreeElement.js. This thus
fixes copy-pasting of urls in the style sections of the elements
panel which contain parentheses.
R=jacktfranklin@chromium.org
Fixed: 758875
Bug: 1066415
Change-Id: I903713109252162c62bfc3b873558e6202b787dd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2144101
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-04-09 13:17:40 +00:00
Changhao Han
d1b1b5fac5
add check to ensure style pane update
...
Deleting the last property in a styles section incorrectly skips style pane update.
This check ensures style pane update when the property's index is out-of-bound.
Bug: chromium:1060267
Change-Id: Ic4073b03c482285fd75b0dc9f1e1800534fce112
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2123472
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-03-27 12:22:16 +00:00
Tim van der Lippe
bbe7c212f9
Revert "Adds check to ensure style pane update"
...
This reverts commit d5a3755f19 .
Reason for revert: https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8884767372176444016/+/steps/E2E_tests/0/stdout
Original change's description:
> Adds check to ensure style pane update
>
> Deleting the last property in a styles section incorrectly skips style pane update.
> This check ensures style pane update when the property's index is out-of-bound.
>
> Bug: chromium:1060267
> Change-Id: Ie6f6a436c789745bcd1f5ece6162cc4ada82a5b3
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107525
> Commit-Queue: Changhao Han <changhaohan@chromium.org >
> Reviewed-by: Mathias Bynens <mathias@chromium.org >
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
TBR=mathias@chromium.org ,tvanderlippe@chromium.org ,changhaohan@chromium.org
Change-Id: Ie40b9fe85490d9f50596d55a046d65cee89e3e05
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1060267
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119547
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-03-26 11:48:30 +00:00
Changhao Han
d5a3755f19
Adds check to ensure style pane update
...
Deleting the last property in a styles section incorrectly skips style pane update.
This check ensures style pane update when the property's index is out-of-bound.
Bug: chromium:1060267
Change-Id: Ie6f6a436c789745bcd1f5ece6162cc4ada82a5b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107525
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-03-26 00:48:03 +00:00
Paul Lewis
767a0a101e
[global] Remaps self.Bindings.cssWorkspaceBinding
...
This CL changes references to self.Bindings.cssWorkspaceBinding (the
globalinstance of Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding) over
to Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.instance(). To keep
both TypeScript and Closure happy we must make a method on the
CSSWorkspaceBinding class itself, since it only allows private
constructors to be accessed by static methods on the class.
Bug: 1058320
Change-Id: Ic42d2b76e5bcec38029827dce14e3bf06ceaf89a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107520
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-03-17 18:34:18 +00:00
Paul Lewis
2d7d65c5e8
[global] Remaps self.Common.settings
...
This CL changes references to self.Common.settings (the global
instance of SDK.Common.Settings) over to
Common.Settings.Settings.instance(). To keep both TypeScript and
Closure happy we must make a method on the Settings class itself,
since it only allows private constructors to be accessed by static
methods on the class.
Bug: 1058320
Change-Id: I04afc8caf64acf29cdda13ef03ad05cfff4786a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091450
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-03-16 22:04:07 +00:00
Tim van der Lippe
ec69c21bca
Migrate typedefs in {console,cookie_table,coverage,elements,emulation}-legacy.js
...
Bug: 1006759
Change-Id: Ic3568c5471a5e12becd9d8df3772e61189c270a7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2100909
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2020-03-12 17:12:21 +00:00
Tim van der Lippe
37a35fff86
Reland "Typecheck Object.js"
...
This reverts commit f996a1c537 .
Reason for revert: Fixed incorrect refactoring in this CL.
Original change's description:
> Revert "Typecheck Object.js"
>
> This reverts commit 258665aca5 .
>
> Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712 )
> Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462 ?
>
> Original change's description:
> > Typecheck Object.js
> >
> > To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> > that were using addEventListener or removeEventListener incinsistently.
> >
> >
> >
> > Bug: 1011811
> > Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> > Commit-Queue: Jose Leal <joselea@microsoft.com >
>
> TBR=szuend@chromium.org ,joselea@microsoft.com ,tvanderlippe@chromium.org ,jacktfranklin@chromium.org
>
> Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
> Reviewed-by: Simon Zünd <szuend@chromium.org >
> Commit-Queue: Simon Zünd <szuend@chromium.org >
Bug: 1011811
Change-Id: I19ebbe0345a5c7380ed69d1ba2921adf0385228e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2084580
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-03-03 14:09:44 +00:00
Simon Zünd
f996a1c537
Revert "Typecheck Object.js"
...
This reverts commit 258665aca5 .
Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712 )
Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462 ?
Original change's description:
> Typecheck Object.js
>
> To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> that were using addEventListener or removeEventListener incinsistently.
>
>
>
> Bug: 1011811
> Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
> Commit-Queue: Jose Leal <joselea@microsoft.com >
TBR=szuend@chromium.org ,joselea@microsoft.com ,tvanderlippe@chromium.org ,jacktfranklin@chromium.org
Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
2020-03-03 05:59:28 +00:00
Jose Leal Chapa
258665aca5
Typecheck Object.js
...
To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
that were using addEventListener or removeEventListener incinsistently.
Bug: 1011811
Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jose Leal <joselea@microsoft.com >
2020-03-02 18:15:06 +00:00
Simon Zünd
da7058fcd6
Move String#isWhitespace from the String prototype to a utiltiy function
...
R=jacktfranklin@chromium.org
Bug: chromium:1050549
Change-Id: Ief2e7c72d6faecd3849e66cfc7300891e22055b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2080372
Commit-Queue: Simon Zünd <szuend@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-03-02 09:30:13 +00:00
Mathias Bynens
f06e8c0758
Enable no-else-return lint rule with autofix
...
This rule matches the Chromium-wide coding style.
Bug: chromium:1057042
Change-Id: I21ad946227ca7344146abace1d2f6146b3a6c207
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2078924
Commit-Queue: Mathias Bynens <mathias@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-02-28 14:17:07 +00:00
Tim van der Lippe
97611c9403
Migrate elements/ to import cross-module
...
Bug: 1006759
Change-Id: I253ab8e4768cf57aa017dca98dfff851eeec8cec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052169
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2020-02-13 14:26:58 +00:00
Paul Lewis
2ddc6313de
[Global] Updates refs for bindings globals
...
Bug: 1006759
Change-Id: Ib73c3ce4b014126da088851bfeccdff49d6ba0ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016754
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-01-23 13:37:40 +00:00
Paul Lewis
4b64b3f263
[Global] Remap refs to Common.moduleSetting
...
Bug: 1006759
Change-Id: Ia45ef0fd0b97588ca23a8d784c0564050b0bbf4c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016748
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-01-23 12:00:20 +00:00
Tim van der Lippe
086a277d7b
Typecheck Color.js with TypeScript
...
It also makes sure that project references are working correctly between
`ts_library` definitions and adds a `global-defs.d.ts` file for platform
to define the prototype wrangling we are doing.
DISABLE_THIRD_PARTY_CHECK=Update config
Bug: 1011811
Change-Id: Ie3c63ea182803c815f0876ca147c9a8f6709d5e4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2011080
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2020-01-22 12:26:04 +00:00
Rob Paveza
72079dfe4e
Squelch CSS race condition error on edits
...
There are minor race conditions in which the StylePropertyTreeElement
is tracking its own CSSProperty and the property is deleted from the
CSSStyleDeclaration to which it belongs. The conditions are particularly
difficult to reproduce, and the user experience does not seem to raise
an issue, probably because changes to the underlying SDK model cause
immediate refreshes of the entire tree).
This change modifies the behavior to not cause an error in the event
that the race condition is encountered by treating edits as having the
entire string, so that user edits aren't dropped.
Change-Id: I2777196cb88fa2928f8a5471398b0a58c8c67853
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947523
Reviewed-by: Mike Jackson <mjackson@microsoft.com >
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com >
2020-01-08 17:09:45 +00:00
Tim van der Lippe
aabc830090
Migrate elements/ to use ES-imports
...
This moves the side-effects to elements-legacy.js (which is lazily
loaded by the Runtime) and resolves all internal references using
ES-imports.
Bug: 1006759
Change-Id: I911a3a31f12e68488c9cd8d807ef03a9c7286668
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1960447
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2019-12-10 16:00:15 +00:00