REGRESSION: Inline PDF that are cached fail to appear in iframe.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 15:46:54 +0000 (15:46 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 15:46:54 +0000 (15:46 +0000)
commit22e5064aef0dc4dacc099082722376efdb19c2c9
tree88a8dd2f9923280b16f28d6a984b377bb5fbded0
parent9f8e3c7bb35312b42c261c545c612b1225ec76c5
REGRESSION: Inline PDF that are cached fail to appear in iframe.
https://bugs.webkit.org/show_bug.cgi?id=75449

Reviewed by Darin Adler.

Make sure 'frame is from page cache' flag is set for subframes too.

WebFrameLoaderClient::m_frameCameFromPageCache == true forces plugins
to be loaded manually. It ensures that the plugin raw data is fetched again
while the containing frame is being restored from the page cache.
(Plugins get destroyed when the frame goes to page cache.)

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
This gets called only on the frame where the actual history navigation happens.
(WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
This gets called for all the restored frames.

LayoutTests:

* fast/history/history-back-while-pdf-in-pagecache-expected.html: Added.
* fast/history/history-back-while-pdf-in-pagecache.html: Added.
* fast/history/resources/history-back-for-pfd-test.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/history/history-back-while-pdf-in-pagecache-expected.html [new file with mode: 0644]
LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html [new file with mode: 0644]
LayoutTests/fast/history/resources/history-back-for-pfd-test.html [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp