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
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
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
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
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
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
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
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
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