Also you don't handle Shadow DOM here, you need to iterate the ShadowRoots first, see how ::recalcStyle does this:
for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
Actually I think this entire side of the branch is unreachable because you only call this inside recalcOwnStyle right now right after calling setNeedsReattachLayoutTree() we always take the needsReattachLayoutTree().
Maybe we remove this side of the if statement and make it NOTREACHED() for this patch. The next patch that move rebuildLayoutTree to be it's own step in updateStyle() will fill it in.
I think this would be better separated into its own method nextTextSibling(), possibly on Node, which can return null if the next sibling is not an Element or doesn't have a layout object. In future once Text mirrors Element this could even be called from within reattachWhitespaceSiblings itself instead of being passed here.
This introduced an n^2 looking for the next text sibling which makes me a little nervous but I say let's go for it and figure out it later. Speaking of there's n^2 protection in the form of needsAttach() getter that's used during layout tree construction. We need to figure out how to make that work in the next patch by looking at the bits you added here.