Bug 188188

Summary: [LFC] Add FormattingContext::mapToAncestor geometry mapping function
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, ews-watchlist, koivisto, simon.fraser, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
koivisto: review+
Archive of layout-test-results from ews205 for win-future none

Description zalan 2018-07-30 21:28:18 PDT
ssia
Comment 1 zalan 2018-07-30 21:30:28 PDT
Created attachment 346142 [details]
Patch
Comment 2 zalan 2018-07-30 21:33:28 PDT
Created attachment 346143 [details]
Patch
Comment 3 zalan 2018-07-31 20:38:28 PDT
Created attachment 346251 [details]
Patch
Comment 4 EWS Watchlist 2018-08-01 08:20:28 PDT
Comment on attachment 346251 [details]
Patch

Attachment 346251 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8723424

New failing tests:
imported/blink/transitions/unprefixed-transform.html
Comment 5 EWS Watchlist 2018-08-01 08:20:39 PDT
Created attachment 346277 [details]
Archive of layout-test-results from ews205 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews205  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 6 Antti Koivisto 2018-08-01 13:52:20 PDT
Comment on attachment 346251 [details]
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.
Comment 7 zalan 2018-08-01 13:53:00 PDT
(In reply to Antti Koivisto from comment #6)
> Comment on attachment 346251 [details]
> 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.
oh right!
Comment 8 zalan 2018-08-01 14:20:15 PDT
Committed r234476: <https://trac.webkit.org/changeset/234476>
Comment 9 Radar WebKit Bug Importer 2018-08-01 20:31:36 PDT
<rdar://problem/42840430>