As pointed out in https://bugs.webkit.org/show_bug.cgi?id=234018#c28: To avoid code duplication, we should find a way to share code between the non-inclusive and inclusive RenderDescendantIteratorAdapters, since the non-inclusive case is just like inclusive case, but just skipping the thing itself. We should also find a way to support a const reference for descendantsOfType, similarly in a way that avoids duplicating all the code twice, such as by using some const_cast in the implementation.
<rdar://problem/88407384>