Bug 239029 - Line clamp specific line-count code should be in RenderDeprecatedFlexibleBox
Summary: Line clamp specific line-count code should be in RenderDeprecatedFlexibleBox
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-09 06:54 PDT by zalan
Modified: 2022-04-15 09:19 PDT (History)
12 users (show)

See Also:


Attachments
Patch (2.93 KB, patch)
2022-04-09 06:58 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.79 KB, patch)
2022-04-09 07:08 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.82 KB, patch)
2022-04-09 09:23 PDT, zalan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (4.76 KB, patch)
2022-04-09 21:15 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (5.29 KB, patch)
2022-04-10 06:59 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2022-04-09 06:54:17 PDT
ssia
Comment 1 zalan 2022-04-09 06:58:27 PDT
Created attachment 457162 [details]
Patch
Comment 2 zalan 2022-04-09 07:08:40 PDT
Created attachment 457163 [details]
Patch
Comment 3 zalan 2022-04-09 09:23:21 PDT
Created attachment 457167 [details]
Patch
Comment 4 zalan 2022-04-09 21:15:08 PDT
Created attachment 457187 [details]
Patch
Comment 5 zalan 2022-04-10 06:59:41 PDT
Created attachment 457199 [details]
Patch
Comment 6 EWS 2022-04-10 14:57:30 PDT
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 7 Radar WebKit Bug Importer 2022-04-10 14:58:16 PDT
<rdar://problem/91539294>
Comment 8 Darin Adler 2022-04-11 10:17:23 PDT
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.
Comment 9 zalan 2022-04-15 09:19:06 PDT
(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