mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 841896: Rename CSSKeyframesRule.insertRule to appendRule to match spec change.
Note that this does not change the IID of nsIDOMMozCSSKeyframesRule since neither the method signature nor semantics have changed; only the name is different.
This commit is contained in:
parent
f3cff43ce7
commit
27b5ab689a
@ -11,7 +11,7 @@ interface nsIDOMMozCSSKeyframesRule : nsIDOMCSSRule
|
||||
attribute DOMString name;
|
||||
readonly attribute nsIDOMCSSRuleList cssRules;
|
||||
|
||||
void insertRule(in DOMString rule);
|
||||
void appendRule(in DOMString rule);
|
||||
void deleteRule(in DOMString key);
|
||||
nsIDOMMozCSSKeyframeRule findRule(in DOMString key);
|
||||
};
|
||||
|
@ -2315,7 +2315,7 @@ nsCSSKeyframesRule::GetCssRules(nsIDOMCSSRuleList* *aRuleList)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCSSKeyframesRule::InsertRule(const nsAString& aRule)
|
||||
nsCSSKeyframesRule::AppendRule(const nsAString& aRule)
|
||||
{
|
||||
// The spec is confusing, and I think we should just append the rule,
|
||||
// which also turns out to match WebKit:
|
||||
|
@ -29,7 +29,7 @@ var keyframesRule = rules[0];
|
||||
var keyframeRules = keyframesRule.cssRules;
|
||||
is(keyframeRules.length, 0, "Should have no keyframe rules yet");
|
||||
|
||||
keyframesRule.insertRule('0% { }');
|
||||
keyframesRule.appendRule('0% { }');
|
||||
is(keyframeRules.length, 1, "Should have a keyframe rule now");
|
||||
var keyframeRule = keyframeRules[0];
|
||||
is(keyframeRule.parentRule, keyframesRule,
|
||||
|
@ -119,14 +119,14 @@ bounce.deleteRule("75% ,85%");
|
||||
is(bounce.cssRules.length, 3, "deleteRule should match keys in order, parsed");
|
||||
bounce.deleteRule("0%");
|
||||
is(bounce.cssRules.length, 2, "deleteRule should match keys in order, parsed");
|
||||
bounce.insertRule("from { color: blue }");
|
||||
is(bounce.cssRules.length, 3, "insertRule should append");
|
||||
is(bounce.cssRules[2].keyText, "0%", "insertRule should append");
|
||||
bounce.insertRule("from { color: blue }");
|
||||
is(bounce.cssRules.length, 4, "insertRule should append");
|
||||
is(bounce.cssRules[3].keyText, "0%", "insertRule should append");
|
||||
bounce.insertRule("from { color: blue } to { color: green }");
|
||||
is(bounce.cssRules.length, 4, "insertRule should ignore garbage at end");
|
||||
bounce.appendRule("from { color: blue }");
|
||||
is(bounce.cssRules.length, 3, "appendRule should append");
|
||||
is(bounce.cssRules[2].keyText, "0%", "appendRule should append");
|
||||
bounce.appendRule("from { color: blue }");
|
||||
is(bounce.cssRules.length, 4, "appendRule should append");
|
||||
is(bounce.cssRules[3].keyText, "0%", "appendRule should append");
|
||||
bounce.appendRule("from { color: blue } to { color: green }");
|
||||
is(bounce.cssRules.length, 4, "appendRule should ignore garbage at end");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -102,7 +102,7 @@ try {
|
||||
} catch(ex) {}
|
||||
|
||||
rule = make_rule_and_remove_sheet("@keyframes a { from { color: blue } }");
|
||||
rule.insertRule("from { color: fuchsia}");
|
||||
rule.appendRule("from { color: fuchsia}");
|
||||
rule.deleteRule("from");
|
||||
rule.name = "b";
|
||||
rule.cssRules[0].keyText = "50%";
|
||||
|
Loading…
Reference in New Issue
Block a user