WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
16297
WebView must be contained in NSWindow for printing
https://bugs.webkit.org/show_bug.cgi?id=16297
Summary
WebView must be contained in NSWindow for printing
Christian Plessl
Reported
2007-12-04 13:52:03 PST
In the WebKit version shipped with Mac OS X 10.5.1 a WebView cannot be printed to PDF unless is are contained in an NSWindow. This is a problem for applications render WebViews offscreen, e.g. for my open-source command line tool wkpdf (
http://wkpdf.plesslweb.ch
) that renders a website to a PDF document. When trying to print a WebView that is not contained in a NSWindow runOperation (method of NSPrintOperation) fails with the assertion: *** Assertion failure in -[WebHTMLView lockFocusIfCanDraw], /SourceCache/AppKit/AppKit-949/AppKit.subproj/NSView.m:4776 The WebView in WebKit versions shipped with OS X 10.4.x did not have this dependency on NSWindow. A detailed problem description with relevant source code snippets is available in my posting to webkit-dev:
http://lists.webkit.org/pipermail/webkit-dev/2007-December/002946.html
I'm not sufficiently familiar with Cocoa to know, whether other NSView subclasses also depend on NSWindow. But Darin Adler suggested in his answer to my mailing list posting, that this behavior could be considered a bug.
Attachments
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2007-12-04 16:30:43 PST
Retitled the bug based on the description.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug