Commit graph

36 commits

Author SHA1 Message Date
Victor Porof
b8157dfaaf Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35894

--HG--
extra : source : 4722b924e08478f5337ab509718bd66906bf472f
extra : amend_source : a5baa1aab21639fdba44537e3a10b179b0073cb4
2019-07-05 11:29:32 +02:00
Patrick Brosset
a365f19d19 Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

Differential Revision: https://phabricator.services.mozilla.com/D32139

--HG--
extra : moz-landing-system : lando
2019-05-23 09:06:16 +00:00
Mihai Alexandru Michis
2ae5a4bb01 Backed out changeset 0f9626b48a66 (bug 1553451) for linting failures. CLOSED TREE 2019-05-23 10:58:22 +03:00
Patrick Brosset
28f446d619 Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

Differential Revision: https://phabricator.services.mozilla.com/D32139

--HG--
extra : moz-landing-system : lando
2019-05-23 07:07:49 +00:00
Patrick Brosset
babd28f5c6 Bug 1544223 - Disable a few high complexity functions and lower the limit to prevent more complexity; r=jdescottes
Depends on D31973

Differential Revision: https://phabricator.services.mozilla.com/D32120

--HG--
extra : moz-landing-system : lando
2019-05-22 12:08:59 +00:00
Patrick Brosset
ff3148e04f Bug 1544223 - Don't advance to the next property or value when parsing ; or : inside a CSS block; r=gl
Differential Revision: https://phabricator.services.mozilla.com/D31973

--HG--
extra : moz-landing-system : lando
2019-05-22 10:46:55 +00:00
Razvan Maries
5b3e1e60d4 Backed out changeset 070cb0982606 (bug 1512956) for xpcshell fails on test_parseDeclarations.js. CLOSED TREE 2019-02-24 15:06:59 +02:00
Razvan Caliman
535771205c Bug 1512956 - Ensure empty string is considered valid CSS authoredText; r=pbro
When removing all declarations from a rule via the Rule view, the authoredText value ends up as an empty string.
This patch ensures that the fallback cssText is not used in that case because that accidentally restores the whole declaration block when re-parsing the text of the rule.

Differential Revision: https://phabricator.services.mozilla.com/D14753

--HG--
extra : moz-landing-system : lando
2019-02-24 10:28:14 +00:00
Gabriel Luong
b8946f9b80 Bug 1524024 - Extract RuleRewriter into its own module. r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D18359

--HG--
rename : devtools/shared/css/parsing-utils.js => devtools/shared/fronts/inspector/rule-rewriter.js
2019-02-01 11:07:25 -05:00
Gurzau Raul
ee6ee38211 Backed out changeset 3d835071d160 (bug 1524024) for failing at unit/test_rewriteDeclarations.js on a CLOSED TREE 2019-02-04 19:33:10 +02:00
Gabriel Luong
00f9cbee19 Bug 1524024 - Extract RuleRewriter into its own module. r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D18359

--HG--
rename : devtools/shared/css/parsing-utils.js => devtools/shared/fronts/inspector/rule-rewriter.js
2019-02-01 11:07:25 -05:00
Razvan Caliman
bb53752bc3 Bug 1500947 - (Part 3) Update indices of tracked declarations when one is removed; r=pbro
Depends on D11209

We need to take care when deleting a declaration. This means shifting the indexes of declarations which follow it in the CSS rule. To do this, we iterate over all tracked added/removed declarations and make sure to decrement their index if it is larger than the index of the deleted one.

The Rule view and specialized editors do not support inserting declarations at any other position other than at the end of the existing declarations list. For now, it is safe to assume all newly added declarations will not shift any tracked indexes. But we will need to handle this for other use cases, like the Style Editor or manual editing of element style attributes.

MozReview-Commit-ID: InrNbsNsqz6

Differential Revision: https://phabricator.services.mozilla.com/D11318

--HG--
extra : moz-landing-system : lando
2018-11-13 09:00:48 +00:00
Razvan Caliman
a01b8dee61 Bug 1499049 - (Part 6) Support !important in changed CSS property values; r=pbro
Depends on D8722

Include the "!importat" priority flag when tracking changes to CSS declarations.

Differential Revision: https://phabricator.services.mozilla.com/D8967

--HG--
extra : moz-landing-system : lando
2018-10-25 11:06:56 +00:00
Daniel Varga
4fc7bfa931 Merge mozilla-inbound to mozilla-central. a=merge 2018-10-20 13:10:23 +03:00
Gabriel Luong
455a83357a Bug 1500469 - Don't require /shared/css/properties-db.js in the inspector client. r=mtigley 2018-10-19 17:40:31 -04:00
Mark Banner
ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Razvan Caliman
fcbdeb7942 Bug 1490720 - Log changes to CSS declarations from StyleRuleActor. r=pbro
MozReview-Commit-ID: 9J4zBcSxYwj

Differential Revision: https://phabricator.services.mozilla.com/D5681

--HG--
extra : moz-landing-system : lando
2018-09-28 17:30:49 +00:00
Tom Tromey
1ca6fd6782 Bug 1478184 - fix handling of html comments in parseDeclarations; r=gl
parseDeclarations was ignoring html comment tokens, but in fact they
should not be treated any differently from other CSS tokens.

MozReview-Commit-ID: 27Mxt5zbSSJ

--HG--
extra : amend_source : 91e47bbf6951ac9dd4709ac10c49ff51c1781ce8
2018-08-07 13:03:34 -07:00
Julian Descottes
640fe52298 Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4

--HG--
extra : rebase_source : 65de1b0aba412d9044b5196115f74276caa058f2
2018-06-01 12:36:09 +02:00
Tom Tromey
d8c5e0102a Bug 1462553 - fix !important parsing in devtools; r=pbro
Bug 1462553 points out that the CSS-parsing code in parsing-utils was
not correctly handling "!important"; in particular, it was allowing
this to appear in the middle of a declaration, rather than only at the
end.  This patch fixes the parser.

MozReview-Commit-ID: 9efv60gX6nV

--HG--
extra : rebase_source : c7e2d1209132bc7a2285850b4bbd24ecbbcbb48d
2018-05-18 11:39:43 -06:00
J. Ryan Stinnett
23ff4cc75d Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Alexandre Poirot
ae019f78bc Bug 1440320 - Convert Task.jsm to async/await in devtools/shared. r=jryans
MozReview-Commit-ID: IK8BzlYuOWm

--HG--
extra : rebase_source : f2ac7eee538490a3db18e7290f144037592b3f89
2018-02-22 00:49:06 -08:00
Tom Tromey
42097bd9cb Bug 1384463 - only trim CSS-allowed whitespace in declaration parser; r=gl
MozReview-Commit-ID: 7bnu2a9G1uq

--HG--
extra : rebase_source : 32fc701fe10f44e36c88aa73d4b234b94f9990f1
2017-10-19 11:04:30 -06:00
Alexandre Poirot
4a603969ef Bug 1396600 - Make some efforts to lazy load properties-db. r=tromey
MozReview-Commit-ID: LGgVb5kxN7X

--HG--
extra : rebase_source : e4acc31da93eb8d88f5dbc075036d1130511ceee
2017-09-06 18:54:07 +02:00
Tom Tromey
e4a467e282 Bug 1355233 - quote unmatched open paren in function tokens correctly; r=gl
When rewriting in the rule view, the rewriter quotes unmatched open
parens to avoid some edits affecting the rest of the style sheet.  This
was bug 1321970.  However, that change didn't correctly handle the case
of a function token, where the paren in question appears at the end, not
the start, of the token.

MozReview-Commit-ID: GjA40M2KsvX

--HG--
extra : rebase_source : 0dec92ca958d20f02da5c7c4163ad971b2529920
2017-04-17 08:00:58 -06:00
Tom Tromey
57e5c3f0e1 Bug 1321970 - escape unmatched parens in property rewriter; r=gl
MozReview-Commit-ID: 2rs07e8O0ab

--HG--
extra : rebase_source : 78c24247bfed6450cb2ce487280da57039c20bc0
2017-03-16 07:46:53 +01:00
Sebastian Hengst
cb76f56d60 Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
Tim Nguyen
d7ea1c1605 Bug 1330099 - Enable object-shorthand eslint rule. r=jryans
MozReview-Commit-ID: 3wA25rfznBv
2017-01-11 21:22:15 +00:00
Tom Tromey
d0a35ae517 Bug 1328016 - add parseNamedDeclarations and use in rule view; r=pbro
MozReview-Commit-ID: 25LvVRvbpIm

--HG--
extra : rebase_source : bc1d33cf183212863b5b9a1a138d8671aad995b3
2017-01-03 13:14:08 -07:00
JerryShih
0abcdb0c25 Bug 1302787 - implement css-color-4 color function changes in devtool parser. r=ttromey
MozReview-Commit-ID: JQQJcDsXFlp
2016-10-17 02:12:05 -04:00
Iris Hsiao
a391785045 Backed out changeset 02c03ca774ee (bug 1302787) 2016-10-17 12:05:36 +08:00
JerryShih
1b5c30172c Bug 1302787 - Implement css-color-4 color function changes in devtool parser. r=tromey
MozReview-Commit-ID: LrGcHDPUpez

--HG--
extra : rebase_source : 6b66b0c2221a7bb5ae6633b7560c3e2454aafd40
extra : histedit_source : 1307fc6f19eae441be8a5c1dd812609946170612
2016-10-16 03:15:37 +08:00
Tom Tromey
50f3b3fa7f Bug 1301692 - remove comment when deleting disabled property; r=pbro
MozReview-Commit-ID: I52zX7js9Ua

--HG--
extra : rebase_source : f9ee5a17184bdf653e2d0daf13144fb054750e81
2016-09-21 11:23:01 -06:00
Greg Tatum
1e5a5a50e2 Bug 1290988 - Collect devtools/shared/css-* files into a folder. r=tromey
In preparation for the additional files in the `mach generate-css-db`
command, collect the CSS files into a folder.

MozReview-Commit-ID: 9JRVsC2NMK8

--HG--
rename : devtools/shared/css-color-db.js => devtools/shared/css/color-db.js
rename : devtools/shared/css-color.js => devtools/shared/css/color.js
rename : devtools/shared/css-lexer.js => devtools/shared/css/lexer.js
rename : devtools/shared/css-parsing-utils.js => devtools/shared/css/parsing-utils.js
rename : devtools/shared/css-properties-db.js => devtools/shared/css/properties-db.js
extra : rebase_source : 51d8d92db0ae91a7368b109aae9a509ba8012b3f
extra : histedit_source : ee3409615461cba0c656b32fee7f80d4b72a09d1
2016-09-14 10:00:27 -05:00
Sebastian Hengst
d11146270a Backed out changeset 1bca17123507 (bug 1290988) for xpcshell failures (test_rewriteDeclarations.js) and devtools failures (browser_styleeditor_syncAddProperty.js). r=backout
--HG--
rename : devtools/shared/css/color-db.js => devtools/shared/css-color-db.js
rename : devtools/shared/css/lexer.js => devtools/shared/css-lexer.js
rename : devtools/shared/css/properties-db.js => devtools/shared/css-properties-db.js
2016-09-13 17:43:44 +02:00
Greg Tatum
da1990f19b Bug 1290988 - Collect devtools/shared/css-* files into a folder; r=tromey
In preparation for the additional files in the `mach generate-css-db`
command, collect the CSS files into a folder.

MozReview-Commit-ID: 9JRVsC2NMK8

--HG--
rename : devtools/shared/css-color-db.js => devtools/shared/css/color-db.js
rename : devtools/shared/css-lexer.js => devtools/shared/css/lexer.js
rename : devtools/shared/css-properties-db.js => devtools/shared/css/properties-db.js
extra : rebase_source : b73bbe7fcf8177a25b41ecdd6d6c760ed1472fb7
2016-08-29 11:02:34 -05:00