Nightly Back/Forward no longer calls plug-in's NPP_NewStream
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 21:02:49 +0000 (21:02 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 21:02:49 +0000 (21:02 +0000)
commit4c9bbea03508009017b44a5a6f4388f1a6130e44
tree29ab21025c5ac8e64e373a94a87705afc5b83db9
parent648be3870d64dfad16085991b01dd3ad7dfddf94
Nightly Back/Forward no longer calls plug-in's NPP_NewStream
https://bugs.webkit.org/show_bug.cgi?id=83805
<rdar://problem/11238748>

Reviewed by Simon Fraser.

When a page with a full-frame plug-in is restored from the page cache, it needs to re-fetch the plug-in stream.

Fix this by breaking the assumption that a plug-in will always get its data from WebCore if it's a full-frame plug-in;
instead it only get its data from WebCore if it's a full-frame plug-in that's not being restored from the page cache.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Rename m_loadManually to m_shouldUseManualLoader.

(WebKit::NetscapePlugin::initialize):
Get the mode from parameters.isFullFramePlugin instead.

(WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
(WebKit::NetscapePlugin::manualStreamDidReceiveData):
(WebKit::NetscapePlugin::manualStreamDidFinishLoading):
(WebKit::NetscapePlugin::manualStreamDidFail):
Rename m_loadManually to m_shouldUseManualLoader.

* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Rename m_loadManually to m_shouldUseManualLoader.

* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::encode):
(WebKit::Plugin::Parameters::decode):
* WebProcess/Plugins/Plugin.h:
(Parameters):
Add an extra isFullFramePlugin parameter, and rename loadManually to shouldUseManualLoader.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
Initialize m_frameCameFromPageCache.

(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
Set m_frameCameFromPageCache to true.

(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Set m_frameCameFromPageCache to false.

(WebKit::WebFrameLoaderClient::createPlugin):
Initialize isFullFramePlugin and shouldUseManualLoader.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp
Source/WebKit2/WebProcess/Plugins/Plugin.cpp
Source/WebKit2/WebProcess/Plugins/Plugin.h
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h