WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
186337
[LFC] Add margin computation for floating, replaced elements.
https://bugs.webkit.org/show_bug.cgi?id=186337
Summary
[LFC] Add margin computation for floating, replaced elements.
zalan
Reported
2018-06-05 21:46:28 PDT
If 'margin-left' or 'margin-right' are computed as 'auto', their used value is '0'.
Attachments
Patch
(5.28 KB, patch)
2018-06-05 22:09 PDT
,
zalan
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2018-06-05 22:09:47 PDT
Created
attachment 342033
[details]
Patch
Antti Koivisto
Comment 2
2018-06-06 07:50:20 PDT
Comment on
attachment 342033
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=342033&action=review
> Source/WebCore/layout/FormattingContext.h:98 > + static WidthAndMargin inlineReplacedWidthAndMargin(LayoutContext&, const Box&, std::optional<LayoutUnit> precomputedMarginLeft = std::nullopt,
I think you can do { } instead of std::nullopt if you want to be more compact.
> Source/WebCore/layout/FormattingContextGeometry.cpp:557 > LayoutUnit computedMarginRightValue;
Maybe this stuff would look nicer as a lambda? auto computedMarginRightValue = computeMarginRight(); You would avoid else branches.
> Source/WebCore/layout/FormattingContextGeometry.cpp:572 > + computedMarginRightValue = marginRight.isAuto() ? LayoutUnit { 0 }: valueForLength(marginRight, containingBlockWidth);
Missing space before :
zalan
Comment 3
2018-06-06 08:52:22 PDT
Committed
r232541
: <
https://trac.webkit.org/changeset/232541
>
Radar WebKit Bug Importer
Comment 4
2018-06-06 08:53:22 PDT
<
rdar://problem/40853067
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug