Bug 306383
| Summary: | [appearance: base] Shrink ComputedStyleBase to free some bits for form controls pseudo elements | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> |
| Component: | Forms | Assignee: | Said Abou-Hallawa <sabouhallawa> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | cdumez, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=306081 | ||
| Bug Depends on: | |||
| Bug Blocks: | 305601 | ||
Said Abou-Hallawa
ComputedStyleBase has m_nonInheritedData, which is DataRef, as its first member. m_nonInheritedData has to be aligned at 8 bytes boundary. Because the CheckedPtr uses a 4-bytes counter which comes the first thing, there are 4-bytes padding between this counter and m_inheritedRareData. Similarly there are 2-bytes padding between m_nonInheritedFlags and m_inheritedRareData.
To shrink this class by using the padding bytes, m_nonInheritedFlags and m_inheritedFlags should be the first members of ComputedStyleBase. If we reserve 22 unused bits for pseudo elements in m_nonInheritedFlags, moving the m_nonInheritedFlags and m_inheritedFlags the current padding will be reduced from
Total byte size: 64
Total pad bytes: 6
Padding percentage: 10.16%
To be
Total byte size: 64
Total pad bytes: 0
Padding percentage: 0.78 %
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/169048994>
Said Abou-Hallawa
Pull request: https://github.com/WebKit/WebKit/pull/57374
EWS
Committed 306352@main (653d8d23600e): <https://commits.webkit.org/306352@main>
Reviewed commits have been landed. Closing PR #57374 and removing active labels.