Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1bfbb7f77cea7b92aec4ba98b64a9b2eb8d6d7d9
https://github.com/WebKit/WebKit/commit/1bfbb7f77cea7b92aec4ba98b64a9b2eb8d6d7d9
Author: Ahmad Saleem <[email protected]>
Date: 2026-10-01 (Thu, 01 Oct 2026)
Changed paths:
M Source/WebCore/rendering/RenderLayer.h
Log Message:
-----------
Reduce sizeof(RenderLayer) by 8 bytes by eliminating padding
https://bugs.webkit.org/show_bug.cgi?id=325918
rdar://188887494
Reviewed by Simon Fraser.
m_anchorScrollAdjustment (std::optional<LayoutSize>, 12 bytes, 4-byte aligned)
sat between 8-byte aligned members, leaving 4 bytes of padding after it. There
were also 4 bytes of padding after m_layerSize. Moving m_anchorScrollAdjustment
next to m_layerSize fills the first gap and removes the second.
Also give LayerPositionUpdates and Compositing explicit underlying types
(uint8_t and uint16_t) so their OptionSets no longer take 4 bytes each. This
does not change the size on 64-bit targets. It keeps the reordering from
growing the class on 32-bit targets where 64-bit integers are 8-byte aligned.
sizeof(RenderLayer):
Apple arm64 / x86_64 (Clang): 312 -> 304
Linux x86_64 / aarch64 (GCC/Clang): 312 -> 304
Windows x64 (Clang, MSVC ABI): 320 -> 312
No change in behavior.
* Source/WebCore/rendering/RenderLayer.h:
Canonical link: https://commits.webkit.org/322434@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications