Bug 194479

Summary: [LFC][IFC] Add intrinsic width support for inline-block boxes
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 koivisto: review+

zalan
Reported 2019-02-09 22:52:17 PST
ssia
Attachments
Patch (6.44 KB, patch)
2019-02-09 22:59 PST, zalan
koivisto: review+
zalan
Comment 1 2019-02-09 22:59:34 PST
Antti Koivisto
Comment 2 2019-02-09 23:22:08 PST
Comment on attachment 361625 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=361625&action=review > Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp:160 > + auto usedValues = UsedHorizontalValues { { }, { }, { } }; Nice. Maybe give the fields = { } so you could just say UsedHorizontalValues { } here? > Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp:163 > + layoutState().createFormattingContext(layoutBox)->instrinsicWidthConstraints(); It looks weird that this calls instrinsicWidthConstraints() but doesn't do anything with the return value. It would be nice if functions with side effect wouldn't sound like accessors.
zalan
Comment 3 2019-02-10 09:48:29 PST
(In reply to Antti Koivisto from comment #2) > Comment on attachment 361625 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=361625&action=review > > > Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp:160 > > + auto usedValues = UsedHorizontalValues { { }, { }, { } }; > > Nice. Maybe give the fields = { } so you could just say UsedHorizontalValues > { } here? > > > Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp:163 > > + layoutState().createFormattingContext(layoutBox)->instrinsicWidthConstraints(); > > It looks weird that this calls instrinsicWidthConstraints() but doesn't do > anything with the return value. It would be nice if functions with side > effect wouldn't sound like accessors. Yeah, I need to fix this eventually. They are either accessor functions and the caller saves the return value to the state or rename them to computeInstrinsicWidthConstraints(). I'll get back to it once I am done with floats.
zalan
Comment 4 2019-02-10 10:03:59 PST
Radar WebKit Bug Importer
Comment 5 2019-02-10 10:04:27 PST
Note You need to log in before you can comment on or make changes to this bug.