mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
Bug 1889875 - [devtools] Use InspectorCSSParser in CssAngle#valid. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D206752
This commit is contained in:
parent
edba18f766
commit
9e68da5e87
@ -68,13 +68,14 @@ CssAngle.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get valid() {
|
get valid() {
|
||||||
const token = getCSSLexer(this.authored).nextToken();
|
const token = getCSSLexer(this.authored, true).nextToken();
|
||||||
if (!token) {
|
if (!token) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
token.tokenType === "dimension" &&
|
token.tokenType === "Dimension" &&
|
||||||
token.text.toLowerCase() in this.ANGLEUNIT
|
token.unit.toLowerCase() in this.ANGLEUNIT
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user