Bug 43606 - dump-as-markup should work in Firefox
Summary: dump-as-markup should work in Firefox
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
Depends on:
Reported: 2010-08-05 21:00 PDT by Adam Barth
Modified: 2010-08-06 20:30 PDT (History)
2 users (show)

See Also:

Patch (3.42 KB, patch)
2010-08-05 21:01 PDT, Adam Barth
ojan: review+
ojan: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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]

> +++ 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]

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>