[webkit-changes] [WebKit/WebKit] 86436a: Reduce the size of, and padding in, StyleRareNonIn...
Aditya Keerthi
noreply at github.com
Wed Jan 1 17:49:55 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 86436a5e3a230a9fed8b1d1b358f856dcac2ea3c
https://github.com/WebKit/WebKit/commit/86436a5e3a230a9fed8b1d1b358f856dcac2ea3c
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2025-01-01 (Wed, 01 Jan 2025)
Changed paths:
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/RenderStyleInlines.h
M Source/WebCore/rendering/style/RenderStyleSetters.h
M Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
Log Message:
-----------
Reduce the size of, and padding in, StyleRareNonInheritedData
https://bugs.webkit.org/show_bug.cgi?id=285248
rdar://142187043
Reviewed by Richard Robinson.
Reduce the size of `StyleRareNonInheritedData` from 720 to 712 bytes, and
reduce the number of padding bytes from 60 to 53.
- Make `FieldSizing` and `ScrollbarWidth` part of the bitfield
- Move members to reduce padding
- Keep related scroll snap properties next to each other
After these changes, 18 more bits can easily be added to the bitfield without
affecting the size of `StyleRareNonInheritedData`.
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::fieldSizing const): Deleted.
(WebCore::RenderStyle::initialFieldSizing): Deleted.
(WebCore::RenderStyle::setFieldSizing): Deleted.
(WebCore::RenderStyle::initialScrollbarWidth): Deleted.
(WebCore::RenderStyle::scrollbarWidth const): Deleted.
(WebCore::RenderStyle::setScrollbarWidth): Deleted.
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::fieldSizing const):
(WebCore::RenderStyle::initialFieldSizing):
(WebCore::RenderStyle::initialScrollbarWidth):
(WebCore::RenderStyle::scrollbarWidth const):
* Source/WebCore/rendering/style/RenderStyleSetters.h:
(WebCore::RenderStyle::setFieldSizing):
(WebCore::RenderStyle::setScrollbarWidth):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
(WebCore::StyleRareNonInheritedData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
Canonical link: https://commits.webkit.org/288356@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list