| Summary: | The render descendant iterator should work with const objects | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Gabriel Nava Marino <gnavamarino> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 234326 | ||
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."