Bug 43606

Summary: dump-as-markup should work in Firefox
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch ojan: review+, ojan: commit-queue-

Description Adam Barth 2010-08-05 21:00:45 PDT
dump-as-markup should work in Firefox
Comment 1 Adam Barth 2010-08-05 21:01:41 PDT
Created attachment 63687 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-08-06 13:17:43 PDT
Seems ojan is your man here.
Comment 3 Ojan Vafai 2010-08-06 13:22:17 PDT
Comment on attachment 63687 [details]
Patch

> +++ b/LayoutTests/ChangeLog
> +        Apparently Firefox lacks this API.

I think something else is going wrong here. document.body.ownerDocument.defaultView.getSelection() returns a selection object in Firefox. Does this fail for all dump-as-markup tests? Does it throw an exception?
Comment 4 Adam Barth 2010-08-06 14:34:32 PDT
I ran into the problem trying to run runner.html in Firefox.  That dumps all kinds of crazy DOMs.
Comment 5 Ojan Vafai 2010-08-06 17:18:08 PDT
Comment on attachment 63687 [details]
Patch

You learn something new everyday. :) 

Filed https://bugs.webkit.org/show_bug.cgi?id=43655 for the difference in behavior.

Mind just adding a comment to _getSelectionFromNode about the case where it returns null? i.e. when the selection is inside a display:none iframe in Firefox.
Comment 6 Adam Barth 2010-08-06 20:30:39 PDT
Committed r64892: <http://trac.webkit.org/changeset/64892>