Bug 248659
| Summary: | auto-functions is useless if the parser doesn't accept `auto` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Oriol Brufau <obrufau> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | sam, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=248638 | ||
Oriol Brufau
In CSSProperties.json, properties can be defined with "auto-functions":true, this generates a style builder like
static void applyValueOrphans(BuilderState& builderState, CSSValue& value)
{
if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) {
builderState.style().setHasAutoOrphans();
return;
}
builderState.style().setOrphans(downcast<CSSPrimitiveValue>(value));
}
However, this is useless if the parser doesn't accept `auto` as a valid keyword!
So I think that an error should be reported if parser-grammar doesn't contain "auto", or something like that.
Or maybe don't require that but let auto-functions automatically imply that `auto` is a valid keyword.
But the current state is bad, it means that orphans:initial doesn't map to any value of its grammar, and getComputedStyle().orphans can return "auto" which is not a supported value.
Both `orphans` and `widows` are affected.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/103180481>