[webkit-reviews] review granted: [Bug 188188] [LFC] Add FormattingContext::mapToAncestor geometry mapping function : [Attachment 346251] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 1 13:52:20 PDT 2018
Antti Koivisto <koivisto at iki.fi> has granted zalan <zalan at apple.com>'s request
for review:
Bug 188188: [LFC] Add FormattingContext::mapToAncestor geometry mapping
function
https://bugs.webkit.org/show_bug.cgi?id=188188
Attachment 346251: Patch
https://bugs.webkit.org/attachment.cgi?id=346251&action=review
--- Comment #6 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 346251
--> https://bugs.webkit.org/attachment.cgi?id=346251
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=346251&action=review
> Source/WebCore/layout/displaytree/DisplayBox.cpp:142
> +Box Box::clone() const
> +{
> + Box box;
> + box.m_style = m_style;
> +
> + box.m_topLeft = m_topLeft;
> + box.m_contentWidth = m_contentWidth;
> + box.m_contentHeight = m_contentHeight;
> + box.m_verticalNonCollapsedMargin = m_verticalNonCollapsedMargin;
> + box.m_margin = m_margin;
> + box.m_border = m_border;
> + box.m_padding = m_padding;
> +
> +#if !ASSERT_DISABLED
> + box.m_hasValidHorizontalMargin = m_hasValidHorizontalMargin;
> + box.m_hasValidVerticalMargin = m_hasValidVerticalMargin;
> + box.m_hasValidVerticalNonCollapsedMargin =
m_hasValidVerticalNonCollapsedMargin;
> + box.m_hasValidBorder = m_hasValidBorder;
> + box.m_hasValidPadding = m_hasValidPadding;
> + box.m_hasValidContentHeight = m_hasValidContentHeight;
> + box.m_hasValidContentWidth = m_hasValidContentWidth;
> +#endif
> +
> + return box;
> +}
It might be nicer to add a constructor for this. If you don't want a public
copy constructor you can use an enum tag. See RenderStyle for an example.
> Source/WebCore/layout/displaytree/DisplayBox.h:206
> - const Style m_style;
> + Style m_style;
Then you could keep this const.
More information about the webkit-reviews
mailing list