[webkit-changes] [WebKit/WebKit] c56439: [Flex][Cleanup] Separate out preferred aspect rati...
Sammy Gill
noreply at github.com
Wed Feb 5 19:06:47 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c5643953e327ae9d28c402744862ea60a4f7ba16
https://github.com/WebKit/WebKit/commit/c5643953e327ae9d28c402744862ea60a4f7ba16
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2025-02-05 (Wed, 05 Feb 2025)
Changed paths:
M Source/WebCore/rendering/RenderFlexibleBox.cpp
Log Message:
-----------
[Flex][Cleanup] Separate out preferred aspect ratio computation in computeMainSizeFromAspectRatioUsing.
https://bugs.webkit.org/show_bug.cgi?id=286952
rdar://144110644
Reviewed by Alan Baradlay.
The code in computeMainSizeFromAspectRatioUsing implements the steps from
9.2.3B in the flex layout algorithm which computes the flex base size
from the used cross size and preferred aspect ratio. The code that is
used to determine the preferred aspect ratio is nested in with some
code that does something else and makes the whole chunk fairly hard
to parse. We can improve the readability of this section of the code by
factoring out the code that determines the preferred aspect ratio by
separating it out into its own lambda.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing const):
Canonical link: https://commits.webkit.org/289907@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