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
This commit is contained in:
Tom Tromey
2018-08-07 13:03:34 -07:00
parent 9fd155ce85
commit 6f40174e25
2 changed files with 5 additions and 11 deletions

View File

@@ -318,12 +318,6 @@ function parseDeclarationsInternal(isCssPropertyKnown, inputString,
break;
}
// Ignore HTML comment tokens (but parse anything they might
// happen to surround).
if (token.tokenType === "htmlcomment") {
continue;
}
// Update the start and end offsets of the declaration, but only
// when we see a significant token.
if (token.tokenType !== "whitespace" && token.tokenType !== "comment") {