Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1354970 - Add @counter-style rules #16455

Merged
merged 26 commits into from Apr 26, 2017
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4993a80
Introduce a style::values::CustomIdent type
SimonSapin Apr 14, 2017
d9c2d1a
Use CustomIdent for animation-name and @keyframes
SimonSapin Apr 14, 2017
627c823
Use CustomIdent in counter-increment
SimonSapin Apr 14, 2017
71f9a0c
Fix up unit tests
SimonSapin Apr 14, 2017
5a8e330
Remove some intermediate conversions in style/properties/gecko.mako.rs
SimonSapin Apr 14, 2017
797f40b
Add initial style system support for @counter-style rules
SimonSapin Apr 14, 2017
4477a2d
Add the 'system' descriptor of @counter-style
SimonSapin Apr 14, 2017
d1558a2
Add 'negative' descriptor of @counter-style
SimonSapin Apr 14, 2017
29bcb5b
Add 'prefix' and 'suffix' descriptors for @counter-style
SimonSapin Apr 14, 2017
6f79684
Add 'range' descriptor to @counter-style
SimonSapin Apr 14, 2017
e27de38
Add 'pad' descritor of @counter-style
SimonSapin Apr 14, 2017
0ba5cae
Add 'fallback' descriptor to @counter-style
SimonSapin Apr 14, 2017
fe15663
Add the 'symbols' descriptor for @counter-style
SimonSapin Apr 14, 2017
617e8e9
CSSOM requires @counter-style to keep track of which descriptors were…
SimonSapin Apr 14, 2017
f93a9a4
Don’t make up initial values not in spec for @counter-style descriptors
SimonSapin Apr 14, 2017
62d261a
Add 'additive-symbols' descriptor for @counter-style
SimonSapin Apr 14, 2017
6dc317f
Add speak-as descriptor for @counter-style
SimonSapin Apr 14, 2017
331acfa
Check rule-level @counter-style validity
SimonSapin Apr 14, 2017
ade56bb
Add missing 'additive-symbols' validity checks
SimonSapin Apr 14, 2017
e7a2a98
Make the style::counter_style module a directory
SimonSapin Apr 24, 2017
82c0411
Make predefined counter style names ASCII-lowercase.
SimonSapin Apr 24, 2017
1146921
Keep custom-ident and string separate in animation/keyframes name.
SimonSapin Apr 25, 2017
0ff64bd
Allow 'decimal' and 'none' in `<counter-style-name>`
SimonSapin Apr 25, 2017
be38c9a
Consider `foo` and `"foo"` equal as keyframes/animation names.
SimonSapin Apr 26, 2017
029150c
Exclude 'none' from <counter-style-name> after all.
SimonSapin Apr 26, 2017
1b41900
CSSKeyframesRule::name setter doesn’t throw anymore
SimonSapin Apr 26, 2017
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

CSSKeyframesRule::name setter doesn’t throw anymore

  • Loading branch information
SimonSapin committed Apr 26, 2017
commit 1b419007d17ef8865b18f685f6a9e2ae3643c6fd
"testharness"
],
"cssom/CSSKeyframesRule.html": [
"3efb8e5cef257a0b433192742d526709357b24c7",
"bca997a63c1389ef6d14aac2f32ab770fbd15ec4",
"testharness"
],
"cssom/CSSNamespaceRule.html": [
@@ -10,6 +10,7 @@
0% { top: 0px; }
100% { top: 200px; }
}
@keyframes empty {}
</style>

<script>
@@ -54,16 +55,18 @@
assert_equals(keyframe.cssRules[2].cssText, "0% { top: 50px; }", "CSSKeyframesRule cssRule cssText attribute after deleteRule function");
assert_equals(keyframe.cssRules[3], undefined, "CSSKeyframesRule cssRule cssText attribute after deleteRule function");

keyframe.name = "bar";
assert_equals(keyframe.name, "bar", "CSSKeyframesRule name setter");
var empty = document.styleSheets[0].cssRules[1];
empty.name = "bar";
assert_equals(empty.name, "bar", "CSSKeyframesRule name setter");
assert_equals(empty.cssText.replace(/\s/g, ""), "@keyframesbar{}", "CSSKeyframesRule cssText attribute");

assert_throws("SyntaxError",
function () { keyframe.name = "initial"; },
"CSSKeyframesRule name setter on invalid keyword.");
empty.name = "initial";
assert_equals(empty.name, "initial", "CSSKeyframesRule name setter, CSS-wide keyword");
assert_equals(empty.cssText.replace(/\s/g, ""), "@keyframes\"initial\"{}", "CSSKeyframesRule cssText attribute with CSS-wide keyword name");

assert_throws("SyntaxError",
function () { keyframe.name = "none"; },
"CSSKeyframesRule name setter on invalid keyword.");
empty.name = "none";
assert_equals(empty.name, "none", "CSSKeyframesRule name setter, 'none'");
assert_equals(empty.cssText.replace(/\s/g, ""), "@keyframes\"none\"{}", "CSSKeyframesRule cssText attribute with 'none' name");
});
</script>
</head>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.