WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 234325
The render descendant iterator should work with const objects
https://bugs.webkit.org/show_bug.cgi?id=234325
Summary
The render descendant iterator should work with const objects
Gabriel Nava Marino
Reported
2021-12-14 16:11:14 PST
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."
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-12-21 16:12:28 PST
<
rdar://problem/86787920
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug