| Summary: | Line clamp specific line-count code should be in RenderDeprecatedFlexibleBox | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | zalan <zalan> | ||||||||||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | bfulgham, changseok, darin, esprehn+autocc, ews-watchlist, glenn, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
zalan
2022-04-09 06:54:17 PDT
Created attachment 457162 [details]
Patch
Created attachment 457163 [details]
Patch
Created attachment 457167 [details]
Patch
Created attachment 457187 [details]
Patch
Created attachment 457199 [details]
Patch
Committed r292689 (249481@main): <https://commits.webkit.org/249481@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457199 [details]. Comment on attachment 457199 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457199&action=review > Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:1035 > + maxLineCount = std::max<int>(maxLineCount, lineCountFor(downcast<RenderBlockFlow>(*child))); Chopping the size_t down to int; what makes that safe? Should the function check for overflow and return an int? > Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:1050 > + int lineCount = lineCountFor(blockChild); Ditto. (In reply to Darin Adler from comment #8) > Comment on attachment 457199 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=457199&action=review > > > Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:1035 > > + maxLineCount = std::max<int>(maxLineCount, lineCountFor(downcast<RenderBlockFlow>(*child))); > > Chopping the size_t down to int; what makes that safe? Should the function > check for overflow and return an int? > > > Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:1050 > > + int lineCount = lineCountFor(blockChild); > > Ditto. bug 239389 |