WebKit needs (possibly private) XML/SVG innerText support (for DumpRenderTree) Currently DumpRenderTree uses the following code for dumping text from a document: if ([documentElement isKindOfClass:[DOMHTMLElement class]]) result = [[(DOMHTMLElement *)documentElement innerText] stringByAppendingString:@"\n"]; else result = [[documentElement valueForKey:@"textContent"] stringByAppendingString:@"\n"]; This results in pretty much totally broken text content for SVG or XML-based layout tests. The dumped content includes the contents of script tags, lacks newlines, and is generally bad. For an example, see the soon-to-be committed LayoutTests/svg/custom/stroke-width-click-expected.txt results.
Created attachment 11780 [details] First attempt This patch should fix the problem. Unfortunately some of the non-svg tests are messed up for me, even without this patch, so maybe someone else needs to check them for changed results (and eventually I need to fix my build ofcourse). Cheers, Rob.
Created attachment 11786 [details] Updated test result Now with updated test results. Cheers, Rob.
Comment on attachment 11786 [details] Updated test result >+ Updated testcases sue to: >+ http://bugs.webkit.org/show_bug.cgi?id=10996 >+ WebKit needs (possibly private) XML/SVG innerText support (for DumpRenderTree) >+ >+ [...] >+ * tables/mozilla/bugs/bug33855-expected.txt: This is a regression from Bug 10054 and should not be included in this patch.
Created attachment 11789 [details] Improved patch Weinig pointed out the innerTextInternal is not really needed. Since innerText is not exposed to js wrappers it is ok to have the method in Element. Also moved outerText there for symmetry. Cheers, Rob.
Hi David, (In reply to comment #3) > (From update of attachment 11786 [details] [edit]) > >+ Updated testcases sue to: > >+ http://bugs.webkit.org/show_bug.cgi?id=10996 > >+ WebKit needs (possibly private) XML/SVG innerText support (for DumpRenderTree) > >+ > >+ [...] > >+ * tables/mozilla/bugs/bug33855-expected.txt: > > This is a regression from Bug 10054 and should not be included in this patch. I was already doubting this one. Thnx for paying attention ;) I corrected it in latest patch. Cheers, Rob.
*** Bug 8474 has been marked as a duplicate of this bug. ***
Comment on attachment 11789 [details] Improved patch Looks fine, r=me.
This was landed by Rob in r18134.
Mass moving XML DOM bugs to the "DOM" Component.