Bug 13485 - -[WebHTMLView dataWithPDFInsideRect:] returns clipped results with -[WebHTMLView bounds]
Summary: -[WebHTMLView dataWithPDFInsideRect:] returns clipped results with -[WebHTMLV...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-25 09:43 PDT by Mohammad Tabbara
Modified: 2022-12-30 18:45 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammad Tabbara 2007-04-25 09:43:11 PDT
In WebKit (WebKit-SVN-r21081.dmg), the bug reappears for multicolumn layouts using the preliminary CSS3 functionality. Specifically, dataWithPDFInsideRect returns a PDF as if the multicolumn layout was not present. For example, http://webkit.org/blog/?p=88 would produce a PDF with a single column. This is also true when the same page is printed. 


+++ This bug was initially created as a clone of Bug #12419 +++

There appears to be no way for a user to render the current web page to a single PDF file *exactly* as it appears on screen.

The value of [[[[webView mainFrame] frameView] documentView] bounds] is incorrect when used to specify the bounds for a subsequent dataWithPDFInsideRect: call on the documentView. The resulting PDF file on pages with lots of text, such as the sample page loaded in this app, are clipped at the very end.

In addition, WebKit does not respect the user's media style preferences when calling dataWithPDFInsideRect:. Apparently, a different text layout engine is being used, which is why the bounds result is incorrect.

To see a graphic example, build and run the attached application, follow the instructions, and examine the results.
Comment 1 Mark Rowe (bdash) 2007-04-25 11:00:48 PDT
I think this is a known issue with the initial CSS3 column implementation.  Dave Hyatt will know more about this.
Comment 2 Ahmad Saleem 2022-12-30 16:34:11 PST
I only found one commit with this "dataWithPDFInsideRect":

https://github.com/WebKit/WebKit/commit/cf8ed2dc1b0ad52607036e2069f181affb29c951

and in current code base, only single reference in one comment here:

https://github.com/WebKit/WebKit/blob/c2f1bd3f763bca4b4b769f0dad4334ec28a25832/Tools/DumpRenderTree/mac/DumpRenderTree.mm#L1452

Do we need to track this any further? Thanks!
Comment 3 Alexey Proskuryakov 2022-12-30 18:45:35 PST
-dataWithPDFInsideRect is an AppKit method, which is implemented by WebKit indirectly.

Unsure if this is still an issue, but given that Legacy WebKit is deprecated, we will not be fixing it either way.