There is a set of formatting changes such as text color that should not cause a break in runs when composing complex scripts. IE seems to do a good job here.
WebKit breaks the text runs on this color change and sends each one individually to the font system (ASTUI, etc.), so the context is lost and there is no shaping across the boundary. I suspect this drawing should happen more like selections, where it gives the entire run to the font system, but specifies a subset of the string to draw with specified style. This will allow the font system to do shaping and then just draw the subset of characters relating to the current style.
Created attachment 18816 [details]
*** This bug has been marked as a duplicate of 6148 ***