[Webkit-unassigned] [Bug 234325] New: The render descendant iterator should work with const objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 14 16:11:14 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=234325

            Bug ID: 234325
           Summary: The render descendant iterator should work with const
                    objects
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gnavamarino at apple.com

Currently the following code in RenderBlockFlow.cpp:
```
for (auto& block : descendantsOfType<RenderBlock>(*this))
    ...
```

Will lead to the following compile-time error:
```
./rendering/RenderIterator.h:131:12: error: no matching function for call to 'nextAncestorSibling'
    return nextAncestorSibling(current, stayWithin);
```

It was mentioned this is due to a "constness issue; const_cast makes it work. We should teach the descendant iterator to work with const objects. childrenOfType works fine so it should be relatively easy."

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211215/5dc24eab/attachment.htm>


More information about the webkit-unassigned mailing list