Source/WebCore: WebCore change for <rdar://problem/10463059> Cannot print USPS shippi...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Dec 2011 20:58:39 +0000 (20:58 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Dec 2011 20:58:39 +0000 (20:58 +0000)
commit6b9eb295b11547be914f73e14c5f3f38a2097158
tree2ad313a3d0940a711796ba5eeb260e0efc772fac
parentf48863945d78c1afbbc2aeb5182880cffec283c6
Source/WebCore: WebCore change for <rdar://problem/10463059> Cannot print USPS shipping labels
http://webkit.org/b/72801

Reviewed by Anders Carlsson and Alexey Proskuryakov.

* WebCore.exp.in: Exported Chrome::print().

Source/WebKit2: <rdar://problem/10463059> Cannot print USPS shipping labels
http://webkit.org/b/72801

Reviewed by Anders Carlsson and Alexey Proskuryakov.

* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(appendValuesInPDFNameSubtreeToVector): Copied from WebKit/mac/WebView/WebPDFDocumentExtras.mm.
(getAllValuesInPDFNameTree): Ditto.
(getAllScriptsInPDFDocument): Copied allScriptsInPDFDocument() from WebPDFDocumentExtras.mm
and changed it to append to a Vector<RetainPtr<CFStringRef> >.
(WebKit::BuiltInPDFView::create): Changed to take a WebFrame* rather than a Page*.
(WebKit::BuiltInPDFView::BuiltInPDFView): Ditto. Updated initializer accordingly.
(WebKit::BuiltInPDFView::pdfDocumentDidLoad): Copied and adapted code from
-[WebPDFRepresentation finishedLoadingWithDataSource:] to run scripts from the PDF with a
Doc object as the this object.
(WebKit::BuiltInPDFView::initialize): Adapted for the change from having a Page* to having
a WebFrame*.
(WebKit::BuiltInPDFView::destroy): Ditto.
(WebKit::BuiltInPDFView::isActive): Ditto.
(WebKit::jsPDFDocInitialize): Added. Refs the BuiltInPDFView which is the private object for
this Doc.
(WebKit::jsPDFDocFinalize): Added. Derefs the BuiltInPDFView for this Doc.
(WebKit::BuiltInPDFView::jsPDFDocPrint): Added. Calls WebCore::Chrome::print().
(WebKit::BuiltInPDFView::makeJSPDFDoc): Copied from WebKit/mac/WebView/WebJSPDFDoc.mm and
modified to use this BuiltInPDFView as the private object of the Doc being made.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(WebKit::BuiltInPDFView::disconnectFromPage): Adapted for the change from having a Page* to
having a WebFrame*.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin): Pass the WebFrame to WebPage::createPlugin().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin): Added a WebFrame* parameter, which is used when creating
a BuiltInPDFView.
* WebProcess/WebPage/WebPage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp
Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h