[webkit-reviews] review granted: [Bug 207438] Optimize Style::determineChange() : [Attachment 390194] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Feb 9 05:50:31 PST 2020
Antti Koivisto <koivisto at iki.fi> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 207438: Optimize Style::determineChange()
https://bugs.webkit.org/show_bug.cgi?id=207438
Attachment 390194: Patch
https://bugs.webkit.org/attachment.cgi?id=390194&action=review
--- Comment #2 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 390194
--> https://bugs.webkit.org/attachment.cgi?id=390194
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=390194&action=review
> Source/WebCore/rendering/style/RenderStyle.cpp:451
> +bool RenderStyle::alignItemsEqual(const RenderStyle& other) const
> +{
> + return m_rareNonInheritedData.ptr() ==
other.m_rareNonInheritedData.ptr()
> + || m_rareNonInheritedData->alignItems ==
other.m_rareNonInheritedData->alignItems;
> +}
> +
> +bool RenderStyle::justifyItemsEqual(const RenderStyle& other) const
> +{
> + return m_rareNonInheritedData.ptr() ==
other.m_rareNonInheritedData.ptr()
> + || m_rareNonInheritedData->justifyItems ==
other.m_rareNonInheritedData->justifyItems;
> +}
Combining these ("alignAndJustifyItemsEqual") would eliminate one
m_rareNonInheritedData comparison.
More information about the webkit-reviews
mailing list