PDFPlugin should take advantage of threaded scrolling
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 00:25:04 +0000 (00:25 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 00:25:04 +0000 (00:25 +0000)
commitcc5f17ae5e92837ca77acb836527311d38d9c3d0
treeb4ae1f05e43b88bbebff8a9e055a95a25ab918e0
parenta188f93ca160fd716b12374c4213ec350bbd1a97
PDFPlugin should take advantage of threaded scrolling
https://bugs.webkit.org/show_bug.cgi?id=150037

Reviewed by Anders Carlsson.

Duplicate PDFPlugin, creating PDFPlugin (the modern version), and
DeprecatedPDFPlugin (containing the code that used to be in PDFPlugin
prior to this patch).

The new PDFPlugin differs from the old one in a few significant ways,
and we need to keep both alive for the time being. Significant differences
include:

- PDFPlugin is no longer a ScrollableArea
- PDFPlugin no longer hosts layers owned by PDFKit; instead, it draws
  into the page tiles, allowing WebCore's threaded scrolling to do its job
- PDFPlugin now resizes itself to the size of the document
- PDFPlugin doesn't handle zooming itself, it just delegates to the page
- PDFLayerController has large and incompatible API changes
- PDFPlugin now implements more of the HUD behavior, but it's still
  painted by PDFLayerController (into a view-relative PageOverlay)

[ File list elided because it's long and useless. ]

* page/PageOverlay.cpp:
(WebCore::PageOverlay::PageOverlay):
(WebCore::PageOverlay::setNeedsDisplay):
Don't reset the overlay layer's opacity if we're not animating,
because it's possible the client wants to manage it.

* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
Let the overlay itself determine whether it needes synchronous scrolling,
and let PageOverlay clients override the default.

* platform/Widget.h:
(WebCore::Widget::boundsRect):
Export a few useful things.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/PageOverlay.cpp
Source/WebCore/page/PageOverlay.h
Source/WebCore/page/PageOverlayController.cpp
Source/WebCore/platform/Widget.h
Source/WebKit2/ChangeLog
Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
Source/WebKit2/PluginProcess/PluginControllerProxy.h
Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
Source/WebKit2/Shared/mac/PDFKitImports.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFLayerControllerSPI.h [moved from Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerDetails.h with 93% similarity]
Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h [new file with mode: 0644]
Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm [new file with mode: 0644]
Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h [new file with mode: 0644]
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginPasswordField.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm
Source/WebKit2/WebProcess/Plugins/Plugin.h
Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
Source/WebKit2/WebProcess/Plugins/PluginProxy.h
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.h
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm