Bug 189141

Summary: [LFC][Margins] Add non-computed horizontal margins to DisplayBox
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch koivisto: review+

Description zalan 2018-08-29 19:54:21 PDT
in-flow block boxes' horizontal margin extends to the containing block's content box. In some cases (float avoiding) we need the non-extended, original values.
Comment 1 zalan 2018-08-29 20:00:34 PDT
Created attachment 348473 [details]
Patch
Comment 2 zalan 2018-08-29 21:15:35 PDT
Created attachment 348482 [details]
Patch
Comment 3 Antti Koivisto 2018-08-30 06:42:54 PDT
Comment on attachment 348482 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=348482&action=review

> Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp:241
> +        return WidthAndMargin { *width, { *marginLeft, *marginRight }, { nonComputedMarginLeft, nonComputedMarginRight } };

return { *width, { *marginLeft, *marginRight }, { nonComputedMarginLeft, nonComputedMarginRight } } ;

should work too?
Comment 4 Antti Koivisto 2018-08-30 06:45:35 PDT
Comment on attachment 348482 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=348482&action=review

> Source/WebCore/layout/FormattingContextGeometry.cpp:420
> +    return { *left, *right, { *width, { *marginLeft, *marginRight }, {nonComputedMarginLeft, nonComputedMarginRight } } };

Missing space before nonComputedMarginLeft
Comment 5 zalan 2018-08-30 07:25:59 PDT
Committed r235501: <https://trac.webkit.org/changeset/235501>
Comment 6 Radar WebKit Bug Importer 2018-08-30 07:26:14 PDT
<rdar://problem/43884877>