Bug 232093 - Two null box iterators from different paths fail to compare equal
Summary: Two null box iterators from different paths fail to compare equal
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-21 10:44 PDT by Gabriel Nava Marino
Modified: 2021-10-22 01:10 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.08 KB, patch)
2021-10-21 11:05 PDT, Gabriel Nava Marino
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>