Commit 0363d88c authored by shanmuga.m's avatar shanmuga.m Committed by Commit bot

Remove WEBKIT_KEYFRAMES_RULE and WEBKIT_KEYFRAME_RULE

Remove WEBKIT_KEYFRAMES_RULE and WEBKIT_KEYFRAME_RULE
from CSSRule interface.

Intent to Remove thread:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/mW1njtgDPHA

BUG=689681
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2795223002
Cr-Commit-Position: refs/heads/master@{#466930}
parent da89e55f
......@@ -282,8 +282,6 @@ interface CSSRule
attribute PAGE_RULE
attribute STYLE_RULE
attribute SUPPORTS_RULE
attribute WEBKIT_KEYFRAMES_RULE
attribute WEBKIT_KEYFRAME_RULE
getter cssText
getter parentRule
getter parentStyleSheet
......
......@@ -3,8 +3,6 @@ This test checks that the CSSRule RuleTypes for keyframe-related rules are what
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ruleType is 7
PASS ruleType is 8
PASS ruleType is 7
PASS ruleType is 8
If we got to this point then we did not crash and the test has passed.
......
Tests parsing the @-webkit-keyframes rule without closing brace. "User agents must close all open constructs ... at the end of the style sheet." (http://www.w3.org/TR/CSS21/syndata.html#parsing-errors). So it must be parsed as if all braces are closed.
Tests parsing the @keyframes rule without closing brace. "User agents must close all open constructs ... at the end of the style sheet." (http://www.w3.org/TR/CSS21/syndata.html#parsing-errors). So it must be parsed as if all braces are closed.
PASS: keyframes rule has length 4
......@@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Tests CSS parser autocloses braces.</title>
<style type="text/css" media="screen">
@-webkit-keyframes foo {
@keyframes foo {
from { left: 100px; }
40% { left: 200px; }
60% { left: 200px; }
......@@ -18,7 +18,7 @@
var ss = document.styleSheets;
for (var i = 0; i < ss.length; ++i) {
for (var j = 0; j < ss[i].cssRules.length; ++j) {
if (ss[i].cssRules[j].type == window.CSSRule.WEBKIT_KEYFRAMES_RULE && ss[i].cssRules[j].name == rule)
if (ss[i].cssRules[j].type == window.CSSRule.KEYFRAMES_RULE && ss[i].cssRules[j].name == rule)
return ss[i].cssRules[j];
}
}
......@@ -41,7 +41,7 @@
</script>
</head>
<body onload="test()">
<div>Tests parsing the @-webkit-keyframes rule without closing brace. &quot;User agents must close all open constructs ... at the end of the style sheet.&quot;
<div>Tests parsing the @keyframes rule without closing brace. &quot;User agents must close all open constructs ... at the end of the style sheet.&quot;
(<a href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors">http://www.w3.org/TR/CSS21/syndata.html#parsing-errors</a>). So it must be parsed as if
all braces are closed.</div>
<div id="console"></div>
......
......@@ -6,16 +6,16 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Constants
PASS CSSKeyframeRule exists on Window object
PASS CSSKeyframesRule exists on Window object
PASS WEBKIT_KEYFRAME_RULE exists on Window.CSSRule object
PASS WEBKIT_KEYFRAMES_RULE exists on Window.CSSRule object
PASS WEBKIT_KEYFRAME_RULE does not exist on Window.CSSRule object
PASS WEBKIT_KEYFRAMES_RULE does not exist on Window.CSSRule object
PASS KEYFRAME_RULE exists on Window.CSSRule object
PASS KEYFRAMES_RULE exists on Window.CSSRule object
Basic queries
PASS keyframes1.type is window.CSSRule.WEBKIT_KEYFRAMES_RULE
PASS keyframes1.type is window.CSSRule.KEYFRAMES_RULE
PASS keyframes1.name is 'test1'
PASS rules1.length is 2
PASS rules1.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules1.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules1.item(0).cssText is '0% { left: 10px; }'
PASS rules1.item(1).cssText is '100% { left: 20px; }'
......@@ -32,10 +32,10 @@ PASS rules2.length is 6
PASS rules2.item(5).cssText is '10% { left: 30px; }'
Keys
PASS keyframes3.type is window.CSSRule.WEBKIT_KEYFRAMES_RULE
PASS keyframes3.type is window.CSSRule.KEYFRAMES_RULE
PASS keyframes3.name is 'test3'
PASS rules3.length is 3
PASS rules3.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules3.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules3.item(0).keyText is '0%'
PASS rules3.item(1).keyText is '50%, 60%'
PASS rules3.item(2).keyText is '90%, 100%'
......@@ -46,18 +46,18 @@ PASS rules3.item(2).cssText is '90%, 100% { left: 20px; }'
Find a rule
PASS rules3.item(0).style is an instance of CSSStyleDeclaration
PASS rules3.item(0).style.length is 1
PASS rule.type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rule.type is window.CSSRule.KEYFRAME_RULE
PASS rule.cssText is '0% { left: 10px; }'
Find a rule with multiple key values
PASS rule.type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rule.type is window.CSSRule.KEYFRAME_RULE
PASS rule.cssText is '50%, 60% { left: 30px; }'
Find a rule using from and to
PASS keyframes4.type is window.CSSRule.WEBKIT_KEYFRAMES_RULE
PASS rule.type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS keyframes4.type is window.CSSRule.KEYFRAMES_RULE
PASS rule.type is window.CSSRule.KEYFRAME_RULE
PASS rule.cssText is '0% { left: 10px; }'
PASS rule.type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rule.type is window.CSSRule.KEYFRAME_RULE
PASS rule.cssText is '100% { left: 20px; }'
Try to find a rule that doesn't exist
......@@ -65,58 +65,58 @@ PASS Non-existent rule was not found
Delete a rule
PASS rules5.length is 2
PASS rules5.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules5.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules5.item(0).keyText is '0%'
PASS rules5.item(1).keyText is '90%, 100%'
Delete a from rule
PASS rules6.length is 2
PASS rules6.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules6.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules6.item(0).keyText is '50%'
PASS rules6.item(1).keyText is '100%'
Delete a rule that doesn't exist
PASS rules7.length is 2
PASS rules7.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules7.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules7.item(0).keyText is '0%'
PASS rules7.item(1).keyText is '90%, 100%'
Set a keyframe key
PASS rules8.length is 2
PASS rules8.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules8.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules8.item(0).keyText is '70%'
PASS rules8.item(1).keyText is '90%, 100%'
Set a keyframe key with 'from'
PASS rules9.length is 2
PASS rules9.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules9.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules9.item(0).keyText is '0%'
PASS rules9.item(1).keyText is '90%, 100%'
Set a keyframe key with multiple values
PASS rules10.length is 2
PASS rules10.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules10.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules10.item(0).keyText is '0%, 10%, 0%, 20%, 30%, 100%'
PASS rules10.item(1).keyText is '90%, 100%'
Set a keyframe key with an out-of-range value
PASS rules11.item(0).keyText = "40%, -50%, 60%"; threw exception SyntaxError: Failed to set the 'keyText' property on 'CSSKeyframeRule': The key '40%, -50%, 60%' is invalid and cannot be parsed.
PASS rules11.length is 2
PASS rules11.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules11.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules11.item(0).keyText is '0%'
PASS rules11.item(1).keyText is '90%, 100%'
Set a keyframe key with an invalid value
PASS rules12.item(0).keyText = "foo"; threw exception SyntaxError: Failed to set the 'keyText' property on 'CSSKeyframeRule': The key 'foo' is invalid and cannot be parsed.
PASS rules12.length is 2
PASS rules12.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules12.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules12.item(0).keyText is '0%'
PASS rules12.item(1).keyText is '90%, 100%'
Set a keyframe key with a null value
PASS rules13.item(0).keyText = null; threw exception SyntaxError: Failed to set the 'keyText' property on 'CSSKeyframeRule': The key 'null' is invalid and cannot be parsed.
PASS rules13.length is 2
PASS rules13.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules13.item(0).type is window.CSSRule.KEYFRAME_RULE
PASS rules13.item(0).keyText is '0%'
PASS rules13.item(1).keyText is '90%, 100%'
PASS successfullyParsed is true
......
<html>
<head>
<style type="text/css" media="screen">
@-webkit-keyframes test1 {
@keyframes test1 {
from { left: 10px; }
to { left: 20px; }
}
@-webkit-keyframes test2 {
@keyframes test2 {
from { left: 10px; }
to { left: 20px; }
30% { left: 30px; }
60% { left: 60px; }
20% { left: 50px; }
}
@-webkit-keyframes test3 {
@keyframes test3 {
0% { left: 10px; }
50% , 60% { left: 30px; }
-10% { left: 50px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test4 {
@keyframes test4 {
from { left: 10px; }
50% { left: 30px; }
to { left: 20px; }
}
@-webkit-keyframes test5 {
@keyframes test5 {
0% { left: 10px; }
50% , 60% { left: 30px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test6 {
@keyframes test6 {
from { left: 10px; }
50% { left: 30px; }
to { left: 20px; }
}
@-webkit-keyframes test7 {
@keyframes test7 {
0% { left: 10px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test8 {
@keyframes test8 {
0% { left: 10px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test9 {
@keyframes test9 {
0% { left: 10px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test10 {
@keyframes test10 {
0% { left: 10px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test11 {
@keyframes test11 {
0% { left: 10px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test12 {
@keyframes test12 {
0% { left: 10px; }
90%, 100% { left: 20px; }
}
@-webkit-keyframes test13 {
@keyframes test13 {
0% { left: 10px; }
90%, 100% { left: 20px; }
}
......@@ -81,14 +81,14 @@ else
testFailed("CSSKeyframesRule does not exist on Window object");
if (window.CSSRule.WEBKIT_KEYFRAME_RULE)
testPassed("WEBKIT_KEYFRAME_RULE exists on Window.CSSRule object");
testFailed("WEBKIT_KEYFRAME_RULE exists on Window.CSSRule object");
else
testFailed("WEBKIT_KEYFRAME_RULE does not exist on Window.CSSRule object");
testPassed("WEBKIT_KEYFRAME_RULE does not exist on Window.CSSRule object");
if (window.CSSRule.WEBKIT_KEYFRAMES_RULE)
testPassed("WEBKIT_KEYFRAMES_RULE exists on Window.CSSRule object");
testFailed("WEBKIT_KEYFRAMES_RULE exists on Window.CSSRule object");
else
testFailed("WEBKIT_KEYFRAMES_RULE does not exist on Window.CSSRule object");
testPassed("WEBKIT_KEYFRAMES_RULE does not exist on Window.CSSRule object");
if (window.CSSRule.KEYFRAME_RULE)
testPassed("KEYFRAME_RULE exists on Window.CSSRule object");
......@@ -104,12 +104,12 @@ debug("");
debug("Basic queries");
var keyframes1 = document.styleSheets.item(0).cssRules.item(0);
shouldBe("keyframes1.type", "window.CSSRule.WEBKIT_KEYFRAMES_RULE");
shouldBe("keyframes1.type", "window.CSSRule.KEYFRAMES_RULE");
shouldBe("keyframes1.name", "'test1'");
var rules1 = keyframes1.cssRules;
shouldBe("rules1.length", "2");
shouldBe("rules1.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules1.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules1.item(0).cssText", "'0% { left: 10px; }'");
shouldBe("rules1.item(1).cssText", "'100% { left: 20px; }'");
......@@ -144,12 +144,12 @@ debug("");
debug("Keys");
var keyframes3 = document.styleSheets.item(0).cssRules.item(2);
shouldBe("keyframes3.type", "window.CSSRule.WEBKIT_KEYFRAMES_RULE");
shouldBe("keyframes3.type", "window.CSSRule.KEYFRAMES_RULE");
shouldBe("keyframes3.name", "'test3'");
var rules3 = keyframes3.cssRules;
shouldBe("rules3.length", "3");
shouldBe("rules3.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules3.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules3.item(0).keyText", "'0%'");
shouldBe("rules3.item(1).keyText", "'50%, 60%'");
shouldBe("rules3.item(2).keyText", "'90%, 100%'");
......@@ -166,7 +166,7 @@ var rule = keyframes3.findRule("0%");
if (!rule)
testFailed("Could not extract '0%' keyframe rule");
shouldBe("rule.type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rule.type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rule.cssText", "'0% { left: 10px; }'");
debug("");
......@@ -175,21 +175,21 @@ var rule = keyframes3.findRule("50%, 60%");
if (!rule)
testFailed("Could not extract '50%,60%' keyframe rule");
shouldBe("rule.type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rule.type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rule.cssText", "'50%, 60% { left: 30px; }'");
debug("");
debug("Find a rule using from and to");
var keyframes4 = document.styleSheets.item(0).cssRules.item(3);
shouldBe("keyframes4.type", "window.CSSRule.WEBKIT_KEYFRAMES_RULE");
shouldBe("keyframes4.type", "window.CSSRule.KEYFRAMES_RULE");
rule = keyframes4.findRule("From");
shouldBe("rule.type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rule.type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rule.cssText", "'0% { left: 10px; }'");
rule = keyframes4.findRule("TO");
shouldBe("rule.type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rule.type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rule.cssText", "'100% { left: 20px; }'");
debug("");
......@@ -208,7 +208,7 @@ var keyframes5 = document.styleSheets.item(0).cssRules.item(4);
keyframes5.deleteRule("50%,60%");
var rules5 = keyframes5.cssRules;
shouldBe("rules5.length", "2");
shouldBe("rules5.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules5.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules5.item(0).keyText", "'0%'");
shouldBe("rules5.item(1).keyText", "'90%, 100%'");
......@@ -219,7 +219,7 @@ var keyframes6 = document.styleSheets.item(0).cssRules.item(5);
keyframes6.deleteRule("0%");
var rules6 = keyframes6.cssRules;
shouldBe("rules6.length", "2");
shouldBe("rules6.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules6.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules6.item(0).keyText", "'50%'");
shouldBe("rules6.item(1).keyText", "'100%'");
......@@ -230,7 +230,7 @@ var keyframes7 = document.styleSheets.item(0).cssRules.item(6);
keyframes7.deleteRule("70%");
var rules7 = keyframes7.cssRules;
shouldBe("rules7.length", "2");
shouldBe("rules7.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules7.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules7.item(0).keyText", "'0%'");
shouldBe("rules7.item(1).keyText", "'90%, 100%'");
......@@ -240,7 +240,7 @@ debug("Set a keyframe key");
var rules8 = document.styleSheets.item(0).cssRules.item(7).cssRules;
rules8.item(0).keyText = "70%";
shouldBe("rules8.length", "2");
shouldBe("rules8.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules8.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules8.item(0).keyText", "'70%'");
shouldBe("rules8.item(1).keyText", "'90%, 100%'");
......@@ -250,7 +250,7 @@ debug("Set a keyframe key with 'from'");
var rules9 = document.styleSheets.item(0).cssRules.item(8).cssRules;
rules9.item(0).keyText = "from";
shouldBe("rules9.length", "2");
shouldBe("rules9.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules9.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules9.item(0).keyText", "'0%'");
shouldBe("rules9.item(1).keyText", "'90%, 100%'");
......@@ -260,7 +260,7 @@ debug("Set a keyframe key with multiple values");
var rules10 = document.styleSheets.item(0).cssRules.item(9).cssRules;
rules10.item(0).keyText = "0%, 10%, from, 20%, 30%, to";
shouldBe("rules10.length", "2");
shouldBe("rules10.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules10.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules10.item(0).keyText", "'0%, 10%, 0%, 20%, 30%, 100%'");
shouldBe("rules10.item(1).keyText", "'90%, 100%'");
......@@ -270,7 +270,7 @@ debug("Set a keyframe key with an out-of-range value");
var rules11 = document.styleSheets.item(0).cssRules.item(10).cssRules;
shouldThrow('rules11.item(0).keyText = "40%, -50%, 60%";');
shouldBe("rules11.length", "2");
shouldBe("rules11.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules11.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules11.item(0).keyText", "'0%'");
shouldBe("rules11.item(1).keyText", "'90%, 100%'");
......@@ -280,7 +280,7 @@ debug("Set a keyframe key with an invalid value");
var rules12 = document.styleSheets.item(0).cssRules.item(11).cssRules;
shouldThrow('rules12.item(0).keyText = "foo";');
shouldBe("rules12.length", "2");
shouldBe("rules12.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules12.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules12.item(0).keyText", "'0%'");
shouldBe("rules12.item(1).keyText", "'90%, 100%'");
......@@ -290,7 +290,7 @@ debug("Set a keyframe key with a null value");
var rules13 = document.styleSheets.item(0).cssRules.item(12).cssRules;
shouldThrow('rules13.item(0).keyText = null;');
shouldBe("rules13.length", "2");
shouldBe("rules13.item(0).type", "window.CSSRule.WEBKIT_KEYFRAME_RULE");
shouldBe("rules13.item(0).type", "window.CSSRule.KEYFRAME_RULE");
shouldBe("rules13.item(0).keyText", "'0%'");
shouldBe("rules13.item(1).keyText", "'90%, 100%'");
......
......@@ -2,11 +2,7 @@ description(
'This test checks that the CSSRule RuleTypes for keyframe-related rules are what we expect.'
);
var ruleType = window.CSSRule.WEBKIT_KEYFRAMES_RULE;
shouldBe("ruleType", "7");
ruleType = window.CSSRule.WEBKIT_KEYFRAME_RULE;
shouldBe("ruleType", "8");
ruleType = window.CSSRule.KEYFRAMES_RULE;
var ruleType = window.CSSRule.KEYFRAMES_RULE;
shouldBe("ruleType", "7");
ruleType = window.CSSRule.KEYFRAME_RULE;
shouldBe("ruleType", "8");
......
......@@ -15,9 +15,9 @@ PASS document.styleSheets[0].cssRules[3].type is CSSRule.MEDIA_RULE
FAIL document.styleSheets[0].cssRules[3].cssRules.foo should be bar (of type string). Was undefined (of type undefined).
PASS document.styleSheets[0].cssRules[3].type is CSSRule.MEDIA_RULE
FAIL document.styleSheets[0].cssRules[3].media.foo should be bar (of type string). Was undefined (of type undefined).
PASS document.styleSheets[0].cssRules[4].type is CSSRule.WEBKIT_KEYFRAMES_RULE
PASS document.styleSheets[0].cssRules[4].type is CSSRule.KEYFRAMES_RULE
FAIL document.styleSheets[0].cssRules[4].cssRules.foo should be bar (of type string). Was undefined (of type undefined).
PASS document.styleSheets[0].cssRules[4].cssRules[0].type is CSSRule.WEBKIT_KEYFRAME_RULE
PASS document.styleSheets[0].cssRules[4].cssRules[0].type is CSSRule.KEYFRAME_RULE
FAIL document.styleSheets[0].cssRules[4].cssRules[0].style.foo should be bar (of type string). Was undefined (of type undefined).
PASS document.styleSheets[0].cssRules[5].type is CSSRule.PAGE_RULE
FAIL document.styleSheets[0].cssRules[5].style.foo should be bar (of type string). Was undefined (of type undefined).
......
......@@ -45,8 +45,8 @@
test("document.styleSheets[0].cssRules[2]", "CSSRule.FONT_FACE_RULE", "style");
test("document.styleSheets[0].cssRules[3]", "CSSRule.MEDIA_RULE", "cssRules");
test("document.styleSheets[0].cssRules[3]", "CSSRule.MEDIA_RULE", "media");
test("document.styleSheets[0].cssRules[4]", "CSSRule.WEBKIT_KEYFRAMES_RULE", "cssRules");
test("document.styleSheets[0].cssRules[4].cssRules[0]", "CSSRule.WEBKIT_KEYFRAME_RULE", "style");
test("document.styleSheets[0].cssRules[4]", "CSSRule.KEYFRAMES_RULE", "cssRules");
test("document.styleSheets[0].cssRules[4].cssRules[0]", "CSSRule.KEYFRAME_RULE", "style");
test("document.styleSheets[0].cssRules[5]", "CSSRule.PAGE_RULE", "style");
</script>
......
......@@ -408,8 +408,6 @@ interface CSSRule
attribute PAGE_RULE
attribute STYLE_RULE
attribute SUPPORTS_RULE
attribute WEBKIT_KEYFRAMES_RULE
attribute WEBKIT_KEYFRAME_RULE
getter cssText
getter parentRule
getter parentStyleSheet
......
......@@ -337,8 +337,6 @@ interface CSSRule
attribute PAGE_RULE
attribute STYLE_RULE
attribute SUPPORTS_RULE
attribute WEBKIT_KEYFRAMES_RULE
attribute WEBKIT_KEYFRAME_RULE
getter cssText
getter parentRule
getter parentStyleSheet
......
......@@ -664,8 +664,6 @@ interface CSSRule
attribute STYLE_RULE
attribute SUPPORTS_RULE
attribute VIEWPORT_RULE
attribute WEBKIT_KEYFRAMES_RULE
attribute WEBKIT_KEYFRAME_RULE
getter cssText
getter parentRule
getter parentStyleSheet
......
......@@ -664,8 +664,6 @@ interface CSSRule
attribute STYLE_RULE
attribute SUPPORTS_RULE
attribute VIEWPORT_RULE
attribute WEBKIT_KEYFRAMES_RULE
attribute WEBKIT_KEYFRAME_RULE
getter cssText
getter parentRule
getter parentStyleSheet
......
......@@ -49,9 +49,7 @@ class CORE_EXPORT CSSRule : public GarbageCollectedFinalized<CSSRule>,
kFontFaceRule = 5,
kPageRule = 6,
kKeyframesRule = 7,
kWebkitKeyframesRule = kKeyframesRule,
kKeyframeRule = 8,
kWebkitKeyframeRule = kKeyframeRule,
kNamespaceRule = 10,
kSupportsRule = 12,
kViewportRule = 15,
......
......@@ -49,8 +49,4 @@
// CSS Device Adaptation
// https://dev.w3.org/csswg/css-device-adapt/#css-rule-interface
[RuntimeEnabled=CSSViewport] const unsigned short VIEWPORT_RULE = 15;
// Non-standard APIs
const unsigned short WEBKIT_KEYFRAMES_RULE = 7;
const unsigned short WEBKIT_KEYFRAME_RULE = 8;
};
......@@ -36,18 +36,9 @@ CSSKeyframesRule.prototype.cssRules;
*/
CSSRule.KEYFRAMES_RULE = 7;
/**
* @type {number}
*/
CSSRule.WEBKIT_KEYFRAMES_RULE = 7;
/**
* @type {number}
* @see http://dev.w3.org/csswg/css-animations/#interface-cssrule
*/
CSSRule.KEYFRAME_RULE = 8;
/**
* @type {number}
*/
CSSRule.WEBKIT_KEYFRAME_RULE = 8;
......@@ -277,7 +277,7 @@ ProgressCenterPanel.getToggleAnimation_ = function(document) {
var styleSheet = document.styleSheets[i];
for (var j = 0; j < styleSheet.cssRules.length; j++) {
var rule = styleSheet.cssRules[j];
if (rule.type === CSSRule.WEBKIT_KEYFRAMES_RULE &&
if (rule.type === CSSRule.KEYFRAMES_RULE &&
rule.name === 'progress-center-toggle') {
return rule;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment