mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 949651 - Serialize all pseudo-elements with the two-colon syntax, even those that allow one colon. r=dbaron
This commit is contained in:
parent
eb7f8f67b2
commit
989a28438a
@ -677,9 +677,10 @@ nsCSSSelector::AppendToStringWithoutCombinatorsOrNegations
|
||||
// XXXldb Why?
|
||||
aString.Append(char16_t('*'));
|
||||
}
|
||||
if (!nsCSSPseudoElements::IsCSS2PseudoElement(mLowercaseTag)) {
|
||||
aString.Append(char16_t(':'));
|
||||
}
|
||||
// While our atoms use one colon, most pseudo-elements require two
|
||||
// colons (those not in CSS level 2) and all pseudo-elements allow
|
||||
// two colons. So serialize to the non-deprecated two colon syntax.
|
||||
aString.Append(char16_t(':'));
|
||||
// This should not be escaped since (a) the pseudo-element string
|
||||
// has a ":" that can't be escaped and (b) all pseudo-elements at
|
||||
// this point are known, and therefore we know they don't need
|
||||
|
@ -867,9 +867,13 @@ function run() {
|
||||
emptyset, classset(["a", "b", "nomatch"]));
|
||||
|
||||
// Test serialization of pseudo-elements.
|
||||
should_serialize_to("p:first-letter", "p:first-letter");
|
||||
should_serialize_to("div>p:first-letter", "div > p:first-letter");
|
||||
should_serialize_to("span +div:first-line", "span + div:first-line");
|
||||
should_serialize_to("p::first-letter", "p::first-letter");
|
||||
should_serialize_to("p:first-letter", "p::first-letter");
|
||||
should_serialize_to("div>p:first-letter", "div > p::first-letter");
|
||||
should_serialize_to("span +div:first-line", "span + div::first-line");
|
||||
|
||||
// Test serialization of non CSS2 pseudo-element.
|
||||
should_serialize_to("input::-moz-placeholder", "input::-moz-placeholder");
|
||||
|
||||
// Test default namespaces, including inside :not().
|
||||
var html_default_ns = "@namespace url(http://www.w3.org/1999/xhtml);";
|
||||
|
Loading…
Reference in New Issue
Block a user