Bug 250282 - [Multicolumn] Guard against zero or negative space shortage
Summary: [Multicolumn] Guard against zero or negative space shortage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ahmad Saleem
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-07 15:50 PST by Ahmad Saleem
Modified: 2023-01-08 16:40 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-01-07 15:50:19 PST
Hi Team,

Just going through Blink's commit, which would be good to add:

Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=174088

WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderMultiColumnFlow.cpp#185

Adding following early return (by following WebKit Coding Style - https://webkit.org/code-style-guidelines/#null-false-and-zero):

if (!spaceShortage)
return;

___

Just wanted to raise so this can be fixed for any potential debug issue. I also checked that we never imported these blink test cases etc.

Thanks!
Comment 1 Tim Nguyen (:ntim) 2023-01-07 16:45:29 PST
> Adding following early return (by following WebKit Coding Style - https://webkit.org/code-style-guidelines/#null-false-and-zero):

> if (!spaceShortage)
> return;

(Note that negative values are truthy, so `spaceShortage <= 0` is correct)
Comment 2 Ahmad Saleem 2023-01-08 04:16:48 PST
PR - https://github.com/WebKit/WebKit/pull/8373
Comment 3 zalan 2023-01-08 15:28:36 PST
(In reply to Tim Nguyen (:ntim) from comment #1)
> > Adding following early return (by following WebKit Coding Style - https://webkit.org/code-style-guidelines/#null-false-and-zero):
> 
> > if (!spaceShortage)
> > return;
> 
> (Note that negative values are truthy, so `spaceShortage <= 0` is correct)
truth!
Comment 4 EWS 2023-01-08 16:39:16 PST
Committed 258647@main (783df4eb9096): <https://commits.webkit.org/258647@main>

Reviewed commits have been landed. Closing PR #8373 and removing active labels.
Comment 5 Radar WebKit Bug Importer 2023-01-08 16:40:17 PST
<rdar://problem/104011828>