this is very similar to InlineDisplayContentBuilder::processNonBidiContent
Created attachment 445632 [details] Patch
Committed r286446 (244788@main): <https://commits.webkit.org/244788@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445632 [details].
<rdar://problem/85985463>