<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[200611] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/200611">200611</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2016-05-09 20:40:58 -0700 (Mon, 09 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/191922">r191922</a>): Zoom in/Zoom Out is not working for PDFs
https://bugs.webkit.org/show_bug.cgi?id=157503
<rdar://problem/23736297>
Reviewed by Anders Carlsson.
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
Restore a requiresUnifiedScaleFactor that was lost in <a href="http://trac.webkit.org/projects/webkit/changeset/191922">r191922</a>.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Separate mainFramePluginHandlesPageScaleGesture changes out from didCommitLoadForFrame,
because the PluginView doesn't exist at this point, so it can't answer
the handlesPageScaleGesture question correctly (or at all).
Instead, we'll send the message when the main-frame PluginView is initialized.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFDeprecatedPDFPluginh">trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (200610 => 200611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-05-10 03:22:39 UTC (rev 200610)
+++ trunk/Source/WebKit2/ChangeLog        2016-05-10 03:40:58 UTC (rev 200611)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-05-09 Tim Horton <timothy_horton@apple.com>
+
+ REGRESSION (r191922): Zoom in/Zoom Out is not working for PDFs
+ https://bugs.webkit.org/show_bug.cgi?id=157503
+ <rdar://problem/23736297>
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
+ Restore a requiresUnifiedScaleFactor that was lost in r191922.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didCommitLoadForFrame):
+ (WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::didInitializePlugin):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
+ Separate mainFramePluginHandlesPageScaleGesture changes out from didCommitLoadForFrame,
+ because the PluginView doesn't exist at this point, so it can't answer
+ the handlesPageScaleGesture question correctly (or at all).
+ Instead, we'll send the message when the main-frame PluginView is initialized.
+
</ins><span class="cx"> 2016-05-09 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] visibility:hidden -webkit-overflow-scrolling: touch divs can interfere with page scrolling
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (200610 => 200611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-05-10 03:22:39 UTC (rev 200610)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-05-10 03:40:58 UTC (rev 200611)
</span><span class="lines">@@ -3036,7 +3036,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, bool pluginHandlesPageScaleGesture, uint32_t opaqueFrameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, const UserData& userData)
</del><ins>+void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t opaqueFrameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, const UserData& userData)
</ins><span class="cx"> {
</span><span class="cx"> PageClientProtector protector(m_pageClient);
</span><span class="cx">
</span><span class="lines">@@ -3096,11 +3096,10 @@
</span><span class="cx"> // plugin is handling page scaling itself) so we should reset it to the default
</span><span class="cx"> // for standard main frame loads.
</span><span class="cx"> if (frame->isMainFrame()) {
</span><del>- m_mainFramePluginHandlesPageScaleGesture = pluginHandlesPageScaleGesture;
-
</del><span class="cx"> if (static_cast<FrameLoadType>(opaqueFrameLoadType) == FrameLoadType::Standard) {
</span><span class="cx"> m_pageScaleFactor = 1;
</span><span class="cx"> m_pluginScaleFactor = 1;
</span><ins>+ m_mainFramePluginHandlesPageScaleGesture = false;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3342,6 +3341,11 @@
</span><span class="cx"> m_loaderClient->didDetectXSSForFrame(*this, *frame, m_process->transformHandlesToObjects(userData.object()).get());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture)
+{
+ m_mainFramePluginHandlesPageScaleGesture = mainFramePluginHandlesPageScaleGesture;
+}
+
</ins><span class="cx"> void WebPageProxy::frameDidBecomeFrameSet(uint64_t frameID, bool value)
</span><span class="cx"> {
</span><span class="cx"> PageClientProtector protector(m_pageClient);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (200610 => 200611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-05-10 03:22:39 UTC (rev 200610)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-05-10 03:40:58 UTC (rev 200611)
</span><span class="lines">@@ -1150,7 +1150,7 @@
</span><span class="cx"> void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&, const UserData&);
</span><span class="cx"> void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, const String& url);
</span><span class="cx"> void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
</span><del>- void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, bool mainFramePluginHandlesPageScaleGesture, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, const UserData&);
</del><ins>+ void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, const UserData&);
</ins><span class="cx"> void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
</span><span class="cx"> void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
</span><span class="cx"> void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, const UserData&);
</span><span class="lines">@@ -1161,6 +1161,7 @@
</span><span class="cx"> void didDisplayInsecureContentForFrame(uint64_t frameID, const UserData&);
</span><span class="cx"> void didRunInsecureContentForFrame(uint64_t frameID, const UserData&);
</span><span class="cx"> void didDetectXSSForFrame(uint64_t frameID, const UserData&);
</span><ins>+ void mainFramePluginHandlesPageScaleGestureDidChange(bool);
</ins><span class="cx"> void frameDidBecomeFrameSet(uint64_t frameID, bool);
</span><span class="cx"> void didStartProgress();
</span><span class="cx"> void didChangeProgress(double);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (200610 => 200611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-05-10 03:22:39 UTC (rev 200610)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-05-10 03:40:58 UTC (rev 200611)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx"> DidReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, String url, WebKit::UserData userData)
</span><span class="cx"> DidChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, String url)
</span><span class="cx"> DidFailProvisionalLoadForFrame(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, String provisionalURL, WebCore::ResourceError error, WebKit::UserData userData)
</span><del>- DidCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, bool pluginHandlesPageScaleGesture, uint32_t loadType, WebCore::CertificateInfo certificateInfo, bool containsPluginDocument, WebKit::UserData userData)
</del><ins>+ DidCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, uint32_t loadType, WebCore::CertificateInfo certificateInfo, bool containsPluginDocument, WebKit::UserData userData)
</ins><span class="cx"> DidFailLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::UserData userData)
</span><span class="cx"> DidFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, WebKit::UserData userData)
</span><span class="cx"> DidFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, WebKit::UserData userData)
</span><span class="lines">@@ -140,6 +140,8 @@
</span><span class="cx"> DidSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t type, String url, WebKit::UserData userData)
</span><span class="cx"> DidDestroyNavigation(uint64_t navigationID)
</span><span class="cx">
</span><ins>+ MainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture)
+
</ins><span class="cx"> FrameDidBecomeFrameSet(uint64_t frameID, bool value)
</span><span class="cx">
</span><span class="cx"> # History client messages.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFDeprecatedPDFPluginh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h (200610 => 200611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h        2016-05-10 03:22:39 UTC (rev 200610)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h        2016-05-10 03:40:58 UTC (rev 200611)
</span><span class="lines">@@ -150,6 +150,7 @@
</span><span class="cx"> bool handleEditingCommand(const String& commandName, const String& argument) override;
</span><span class="cx"> bool isEditingCommandEnabled(const String&) override;
</span><span class="cx"> bool handlesPageScaleFactor() const override;
</span><ins>+ bool requiresUnifiedScaleFactor() const override { return true; }
</ins><span class="cx"> void setFocus(bool) override { }
</span><span class="cx"> NPObject* pluginScriptableNPObject() override { return 0; }
</span><span class="cx"> void windowFocusChanged(bool) override { }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (200610 => 200611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2016-05-10 03:22:39 UTC (rev 200610)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2016-05-10 03:40:58 UTC (rev 200611)
</span><span class="lines">@@ -689,6 +689,12 @@
</span><span class="cx"> frameView->setNeedsLayout();
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+ if (Frame* frame = m_pluginElement->document().frame()) {
+ auto* webFrame = WebFrame::fromCoreFrame(*frame);
+ if (webFrame->isMainFrame())
+ webFrame->page()->send(Messages::WebPageProxy::MainFramePluginHandlesPageScaleGestureDidChange(handlesPageScaleFactor()));
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (200610 => 200611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-05-10 03:22:39 UTC (rev 200610)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-05-10 03:40:58 UTC (rev 200611)
</span><span class="lines">@@ -468,7 +468,7 @@
</span><span class="cx">
</span><span class="cx"> // Notify the UIProcess.
</span><span class="cx">
</span><del>- webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), documentLoader.navigationID(), documentLoader.response().mimeType(), m_frameHasCustomContentProvider, m_frame->handlesPageScaleGesture(), static_cast<uint32_t>(m_frame->coreFrame()->loader().loadType()), documentLoader.response().certificateInfo(), m_frame->coreFrame()->document()->isPluginDocument(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</del><ins>+ webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), documentLoader.navigationID(), documentLoader.response().mimeType(), m_frameHasCustomContentProvider, static_cast<uint32_t>(m_frame->coreFrame()->loader().loadType()), documentLoader.response().certificateInfo(), m_frame->coreFrame()->document()->isPluginDocument(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</ins><span class="cx"> webPage->didCommitLoad(m_frame);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>