We shouldn't synchronously update styles on all documents after running script
Created attachment 123232 [details] Patch
I believe this patch should be safe, and it passes nearly all layout tests, but a few tests have a diff that I can't quite explain. Roughly a half dozen editing tests have diffs that look like this: --- editing/selection/caret-rtl-expected.txt +++ editing/selection/caret-rtl-actual.txt @@ -14,4 +14,5 @@ RenderText {#text} at (0,0) size 38x19 text run at (0,0) width 38: "PASS" RenderBR {BR} at (38,0) size 0x19 + RenderText {#text} at (0,0) size 0x0 caret: position 7 of child 0 {#text} of child 3 {DIV} of body on this test there's a 0x0 RenderText in the DRT-generated dump. Similarly, on a small number of dumpAsText() tests there's an extra newline at the end of the text dump. Oddly enough if I call Document::updateStylesForAllDocuments() immediately before dumping the final tree these persist.
Dup of bug 46761. Lots of discussion there about empty text nodes.
*** This bug has been marked as a duplicate of bug 46761 ***
Comment on attachment 123232 [details] Patch Cleared review? from attachment 123232 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).