| Summary: | [LFC] Add support for width: min/max-content | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | zalan <zalan> | ||||||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | bfulgham, koivisto, sam, simon.fraser, webkit-bug-importer, zalan | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
zalan
2020-06-06 09:11:31 PDT
Created attachment 401263 [details]
Patch
Comment on attachment 401263 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401263&action=review > Source/WebCore/layout/FormattingContextGeometry.cpp:107 > + auto width = widthType == WidthType::Normal ? style.logicalWidth() : widthType == WidthType::Min ? style.logicalMinWidth() : style.logicalMaxWidth(); a lambda might be more readable Comment on attachment 401263 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401263&action=review >> Source/WebCore/layout/FormattingContextGeometry.cpp:107 >> + auto width = widthType == WidthType::Normal ? style.logicalWidth() : widthType == WidthType::Min ? style.logicalMinWidth() : style.logicalMaxWidth(); > > a lambda might be more readable with a switch Created attachment 401265 [details]
Patch
Created attachment 401267 [details]
Patch
Committed r262690: <https://trac.webkit.org/changeset/262690> All reviewed patches have been landed. Closing bug and clearing flags on attachment 401267 [details]. Comment on attachment 401267 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401267&action=review > Source/WebCore/layout/FormattingContextGeometry.cpp:113 > + auto width = style.logicalWidth(); > + > + switch (widthType) { > + case WidthType::Normal: > + width = style.logicalWidth(); Is it necessary to compute call style.logicalWidth() twice here? (In reply to Sam Weinig from comment #8) > Comment on attachment 401267 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=401267&action=review > > > Source/WebCore/layout/FormattingContextGeometry.cpp:113 > > + auto width = style.logicalWidth(); > > + > > + switch (widthType) { > > + case WidthType::Normal: > > + width = style.logicalWidth(); > > Is it necessary to compute call style.logicalWidth() twice here? Haha, yeah absolutely not. Thanks. |