Commit Graph

38 Commits

Author SHA1 Message Date
Julian Descottes
03cdcd7b0a Bug 1593921 - Use eslint-disable-next-line to disable complexity checks in DevTools r=pbro
Using next-line is less error prone for refactorings than wrapping methods with enable/disable blocks.

Differential Revision: https://phabricator.services.mozilla.com/D51782
2019-11-05 14:29:04 +00:00
Nicolas Chevobbe
290ba5cb21 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300
2019-08-19 12:48:16 +00:00
Victor Porof
435f7b056d Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35894
2019-07-05 11:29:32 +02:00
Patrick Brosset
d93842478f 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
2019-05-23 09:06:16 +00:00
Mihai Alexandru Michis
c358baf0c3 Backed out changeset 0f9626b48a66 (bug 1553451) for linting failures. CLOSED TREE 2019-05-23 10:58:22 +03:00
Patrick Brosset
18bd75fb8c 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
2019-05-23 07:07:49 +00:00
Patrick Brosset
dc09b99342 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
2019-05-22 12:08:59 +00:00
Patrick Brosset
fb5091b2d5 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
2019-05-22 10:46:55 +00:00
Razvan Maries
a51352c65d 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
ddc3a0b032 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
2019-02-24 10:28:14 +00:00
Gabriel Luong
0ebd071bbf Bug 1524024 - Extract RuleRewriter into its own module. r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D18359
2019-02-01 11:07:25 -05:00
Gurzau Raul
04ca9c4a2f 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
922f63efa6 Bug 1524024 - Extract RuleRewriter into its own module. r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D18359
2019-02-01 11:07:25 -05:00
Razvan Caliman
be2b453167 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
2018-11-13 09:00:48 +00:00
Razvan Caliman
b8dbbe9451 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
2018-10-25 11:06:56 +00:00
Daniel Varga
19b44c7933 Merge mozilla-inbound to mozilla-central. a=merge 2018-10-20 13:10:23 +03:00
Gabriel Luong
1d4d455f90 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
3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Razvan Caliman
8ab6683a2c Bug 1490720 - Log changes to CSS declarations from StyleRuleActor. r=pbro
MozReview-Commit-ID: 9J4zBcSxYwj

Differential Revision: https://phabricator.services.mozilla.com/D5681
2018-09-28 17:30:49 +00:00
Tom Tromey
6f40174e25 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
2018-08-07 13:03:34 -07:00
Julian Descottes
82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Tom Tromey
67c7266d64 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
2018-05-18 11:39:43 -06:00
J. Ryan Stinnett
8d1c817851 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
c693997506 Bug 1440320 - Convert Task.jsm to async/await in devtools/shared. r=jryans
MozReview-Commit-ID: IK8BzlYuOWm
2018-02-22 00:49:06 -08:00
Tom Tromey
562df04b80 Bug 1384463 - only trim CSS-allowed whitespace in declaration parser; r=gl
MozReview-Commit-ID: 7bnu2a9G1uq
2017-10-19 11:04:30 -06:00
Alexandre Poirot
8a8fd0f3c4 Bug 1396600 - Make some efforts to lazy load properties-db. r=tromey
MozReview-Commit-ID: LGgVb5kxN7X
2017-09-06 18:54:07 +02:00
Tom Tromey
7351af74b9 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
2017-04-17 08:00:58 -06:00
Tom Tromey
befd2a0581 Bug 1321970 - escape unmatched parens in property rewriter; r=gl
MozReview-Commit-ID: 2rs07e8O0ab
2017-03-16 07:46:53 +01:00
Sebastian Hengst
c6d9ef3e98 Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
Tim Nguyen
548b6bdbef Bug 1330099 - Enable object-shorthand eslint rule. r=jryans
MozReview-Commit-ID: 3wA25rfznBv
2017-01-11 21:22:15 +00:00
Tom Tromey
17e25d65e8 Bug 1328016 - add parseNamedDeclarations and use in rule view; r=pbro
MozReview-Commit-ID: 25LvVRvbpIm
2017-01-03 13:14:08 -07:00
JerryShih
7177bc6fd5 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
685245288b Backed out changeset 02c03ca774ee (bug 1302787) 2016-10-17 12:05:36 +08:00
JerryShih
4430b46c2a Bug 1302787 - Implement css-color-4 color function changes in devtool parser. r=tromey
MozReview-Commit-ID: LrGcHDPUpez
2016-10-16 03:15:37 +08:00
Tom Tromey
d9f7205500 Bug 1301692 - remove comment when deleting disabled property; r=pbro
MozReview-Commit-ID: I52zX7js9Ua
2016-09-21 11:23:01 -06:00
Greg Tatum
0fc28c2ff3 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
2016-09-14 10:00:27 -05:00
Sebastian Hengst
93c9c62451 Backed out changeset 1bca17123507 (bug 1290988) for xpcshell failures (test_rewriteDeclarations.js) and devtools failures (browser_styleeditor_syncAddProperty.js). r=backout 2016-09-13 17:43:44 +02:00
Greg Tatum
36e0a1b1fa 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
2016-08-29 11:02:34 -05:00