[webkit-changes] [WebKit/WebKit] 526be3: Optimize layout of StyleRareNonInheritedData to re...
Simon Fraser
noreply at github.com
Mon Feb 6 13:15:17 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 526be3b317c99d8a5c516914828a9cb96f32b954
https://github.com/WebKit/WebKit/commit/526be3b317c99d8a5c516914828a9cb96f32b954
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Source/WebCore/rendering/style/OffsetRotation.cpp
M Source/WebCore/rendering/style/OffsetRotation.h
M Source/WebCore/rendering/style/StyleContentAlignmentData.h
M Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
M Source/WebCore/rendering/style/StyleSelfAlignmentData.h
Log Message:
-----------
Optimize layout of StyleRareNonInheritedData to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=251761
<rdar://problem/105060445>
Reviewed by Cameron McCormack.
Re-order the data members and functions of StyleRareNonInheritedData to make future data member layout optimizations easier.
I ensured that StyleRareNonInheritedData::operator== and the copy constructor used all the data members in the
declared order.
Shrink StyleContentAlignmentData and StyleSelfAlignmentData by declaring their bitfields with the smallest
possible type.
* Source/WebCore/rendering/style/StyleContentAlignmentData.h:
(WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
(WebCore::StyleContentAlignmentData::setPosition):
(WebCore::StyleContentAlignmentData::setDistribution):
(WebCore::StyleContentAlignmentData::setOverflow):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/rendering/style/StyleSelfAlignmentData.h:
(WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
(WebCore::StyleSelfAlignmentData::setPosition):
(WebCore::StyleSelfAlignmentData::setPositionType):
(WebCore::StyleSelfAlignmentData::setOverflow):
Canonical link: https://commits.webkit.org/259911@main
More information about the webkit-changes
mailing list