Bug 207937 - [LFC][Floats] FloatingContext::constraints should be able to handle empty candidate ranges (points)
Summary: [LFC][Floats] FloatingContext::constraints should be able to handle empty can...
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: 2020-02-19 08:25 PST by zalan
Modified: 2020-02-19 11:30 PST (History)
6 users (show)

See Also:


Attachments
Patch (8.70 KB, patch)
2020-02-19 08:30 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (8.70 KB, patch)
2020-02-19 09:40 PST, 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 2020-02-19 08:25:11 PST
when the candidate range is empty.
Comment 1 Radar WebKit Bug Importer 2020-02-19 08:25:52 PST
<rdar://problem/59591109>
Comment 2 zalan 2020-02-19 08:30:32 PST
Created attachment 391165 [details]
Patch
Comment 3 Antti Koivisto 2020-02-19 08:46:11 PST
Comment on attachment 391165 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391165&action=review

> Source/WebCore/layout/floats/FloatingContext.cpp:308
> +                return floatBoxRect.top() <= adjustedCandidateTop && floatBoxRect.bottom() > adjustedCandidateTop;
> +            return !(floatBoxRect.top() >= adjustedCandidateBottom || floatBoxRect.bottom() <= adjustedCandidateTop);

The difference between these would be clearer if the logic was the same way round (that is no !)
Comment 4 zalan 2020-02-19 08:51:58 PST
(In reply to Antti Koivisto from comment #3)
> Comment on attachment 391165 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=391165&action=review
> 
> > Source/WebCore/layout/floats/FloatingContext.cpp:308
> > +                return floatBoxRect.top() <= adjustedCandidateTop && floatBoxRect.bottom() > adjustedCandidateTop;
> > +            return !(floatBoxRect.top() >= adjustedCandidateBottom || floatBoxRect.bottom() <= adjustedCandidateTop);
> 
> The difference between these would be clearer if the logic was the same way
> round (that is no !)
sure.
Comment 5 zalan 2020-02-19 09:40:00 PST
Created attachment 391173 [details]
Patch
Comment 6 WebKit Commit Bot 2020-02-19 11:30:25 PST
Comment on attachment 391173 [details]
Patch

Clearing flags on attachment: 391173

Committed r256928: <https://trac.webkit.org/changeset/256928>
Comment 7 WebKit Commit Bot 2020-02-19 11:30:27 PST
All reviewed patches have been landed.  Closing bug.