Bug 232093

Summary: Two null box iterators from different paths fail to compare equal
Product: WebKit Reporter: Gabriel Nava Marino <gnavamarino>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Gabriel Nava Marino 2021-10-21 10:44:32 PDT
Two null box iterators from different paths fail to compare equal in BoxIterator::operator==(
Comment 1 Gabriel Nava Marino 2021-10-21 11:02:20 PDT
Per Antti's recommendation, we will compare equal in the case "both box and end get computed to null iterators (atEnd() is true)" as is currently happening in this loop:

        for (auto box = inlineBox->firstLeafBox(), end = inlineBox->endLeafBox(); box != end; box.traverseNextOnLine()) {
            if (!box->isText())
                continue;
Comment 2 Gabriel Nava Marino 2021-10-21 11:05:04 PDT
Created attachment 442047 [details]
Patch
Comment 3 Gabriel Nava Marino 2021-10-21 11:06:42 PDT
(In reply to Gabriel Nava Marino from comment #1)
> Per Antti's recommendation, we will compare equal in the case "both box and
> end get computed to null iterators (atEnd() is true)" as is currently
 as is *not* currently happening in this loop
> happening in this loop:
> 
>         for (auto box = inlineBox->firstLeafBox(), end =
> inlineBox->endLeafBox(); box != end; box.traverseNextOnLine()) {
>             if (!box->isText())
>                 continue;
Comment 4 EWS 2021-10-21 21:52:59 PDT
Committed r284665 (243385@main): <https://commits.webkit.org/243385@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442047 [details].
Comment 5 Radar WebKit Bug Importer 2021-10-21 21:53:14 PDT
<rdar://problem/84535523>