[Webkit-unassigned] [Bug 35130] New: importNode fails on document.head and document.documentElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 18 14:10:19 PST 2010


           Summary: importNode fails on document.head and
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Accessibility
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bugs at m8y.org

BTW, this used to work at some point in the past, I just noticed webkit based
browsers failing recently, so is probably a regression.

Also works perfectly in Firefox.

The reason for this is for a print popup that shows a view of the page w/ the
print stylesheet applied (also erases all display: none nodes for easy user
copying of the visible data w/o display: none junk).

In Firefox (and older Webkit), I simply do a window.open('',params); then
document.write/document.close a blank document, then, in my new blank document
I do:
        var x  = printPopup.document.importNode(document.body,true);
        var n  = printPopup.document.body;
        var np = n.parentNode;
        np.removeChild(n);  /* using replaceChild is sometimes buggy in some
browsers when replacing entire doc */

On my new clone of the parent page I then busy myself cleaning up the dom and
changing this and that.

In release and nightly  versions of Safari and Chromium I now get: Error:
I thought I'd work around that by importing document.body and document.head
separately (the only two parts I really care about) but no, I get the same
error on import of document.head.  

I'm going to try shunting Safari and Chromium into my IE workaround, but it is
not as good a copy and will require adding non-IE variants of things.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list