WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
306383
[appearance: base] Shrink ComputedStyleBase to free some bits for form controls pseudo elements
https://bugs.webkit.org/show_bug.cgi?id=306383
Summary
[appearance: base] Shrink ComputedStyleBase to free some bits for form contro...
Said Abou-Hallawa
Reported
2026-01-27 17:03:00 PST
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
Comment 1
2026-01-27 17:03:25 PST
<
rdar://problem/169048994
>
Said Abou-Hallawa
Comment 2
2026-01-27 17:14:00 PST
Pull request:
https://github.com/WebKit/WebKit/pull/57374
EWS
Comment 3
2026-01-28 09:32:21 PST
Committed
306352@main
(653d8d23600e): <
https://commits.webkit.org/306352@main
> Reviewed commits have been landed. Closing PR #57374 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug