Bug 10996 - WebKit needs (possibly private) XML/SVG innerText support (for DumpRenderTree)
Summary: WebKit needs (possibly private) XML/SVG innerText support (for DumpRenderTree)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Nobody
URL:
Keywords:
: 8474 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-23 04:37 PDT by Eric Seidel (no email)
Modified: 2019-02-06 09:03 PST (History)
3 users (show)

See Also:


Attachments
First attempt (11.23 KB, patch)
2006-12-08 14:39 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Updated test result (91.92 KB, patch)
2006-12-09 07:26 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Improved patch (92.57 KB, patch)
2006-12-09 10:29 PST, Rob Buis
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2006-09-23 04:37:04 PDT
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.
Comment 1 Rob Buis 2006-12-08 14:39:17 PST
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.
Comment 2 Rob Buis 2006-12-09 07:26:58 PST
Created attachment 11786 [details]
Updated test result

Now with updated test results.
Cheers,

Rob.
Comment 3 David Kilzer (:ddkilzer) 2006-12-09 09:58:14 PST
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.
Comment 4 Rob Buis 2006-12-09 10:29:32 PST
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.
Comment 5 Rob Buis 2006-12-09 11:24:04 PST
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.
Comment 6 Rob Buis 2006-12-09 12:05:55 PST
*** Bug 8474 has been marked as a duplicate of this bug. ***
Comment 7 Darin Adler 2006-12-09 14:45:59 PST
Comment on attachment 11789 [details]
Improved patch

Looks fine, r=me.
Comment 8 Mark Rowe (bdash) 2006-12-11 15:01:48 PST
This was landed by Rob in r18134.
Comment 9 Lucas Forschler 2019-02-06 09:03:49 PST
Mass moving XML DOM bugs to the "DOM" Component.