Bug 285453
| Summary: | Convert scroll-padding/scroll-margin types to strongly typed CSS/Style values | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sam Weinig <sam> |
| Component: | CSS | Assignee: | Sam Weinig <sam> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | koivisto, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 18 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=286004 | ||
Sam Weinig
Convert scroll-padding/scroll-margin types to strongly typed CSS/Style values.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sam Weinig
scroll-padding-* has the following grammar:
<'scroll-padding-*'> = auto | <length-percentage [0,∞]>
Historically this was represented in RenderStyle using a WebCore::Length, but we want something more strongly typed, that only includes `auto`, so we will need a new PrimitiveNumericOrKeyword<Numeric, Keywords...> to efficiently handle this.
scroll-margin-* has the following grammar:
// <'scroll-margin-*'> = <length>
Like above, this has historically been handled by WebCore::Length, but we can do better! We can cut the amount of space in half by using a quad or Style::Length<> values which are 4 bytes each instead of the 8 used by WebCore::Length!
Sam Weinig
Pull request: https://github.com/WebKit/WebKit/pull/38587
Radar WebKit Bug Importer
<rdar://problem/142830546>
EWS
Committed 288829@main (f15f5a852578): <https://commits.webkit.org/288829@main>
Reviewed commits have been landed. Closing PR #38587 and removing active labels.