<!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>[193569] branches/safari-601-branch/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/193569">193569</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-05 23:27:45 -0800 (Sat, 05 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Roll out <a href="http://trac.webkit.org/projects/webkit/changeset/193475">r193475</a>. rdar://problem/23732400</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchSourceWebKit2ChangeLog">branches/safari-601-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessAPICocoaWKWebViewmm">branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessAPICocoaWKWebViewInternalh">branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh">branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessPageClienth">branches/safari-601-branch/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessWebPageProxymessagesin">branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessiosPageClientImplIOSh">branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessiosPageClientImplIOSmm">branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessiosSmartMagnificationControllerh">branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessiosSmartMagnificationControllermm">branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessiosWKContentViewInteractionh">branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessiosWKContentViewInteractionmm">branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessiosWebPageProxyIOSmm">branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorcpp">branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorh">branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm">branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/ChangeLog        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> 2015-12-05 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><ins>+ Rollout r193475. rdar://problem/23732400
+
+2015-12-05 Matthew Hanson <matthew_hanson@apple.com>
+
</ins><span class="cx"> Rollout r193476. rdar://problem/23732400
</span><span class="cx">
</span><span class="cx"> 2015-12-05 Matthew Hanson <matthew_hanson@apple.com>
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -1005,7 +1005,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- [_contentView _setDoubleTapGesturesEnabled:self._viewportIsUserScalable];
</del><ins>+ [_contentView _setDoubleTapGesturesEnabled:[_scrollView isZoomEnabled] && [_scrollView minimumZoomScale] < [_scrollView maximumZoomScale]];
</ins><span class="cx">
</span><span class="cx"> [self _updateScrollViewBackground];
</span><span class="cx">
</span><span class="lines">@@ -1392,13 +1392,12 @@
</span><span class="cx"> force:YES];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (CGFloat)_contentZoomScale
</del><ins>+- (BOOL)_zoomToRect:(WebCore::FloatRect)targetRect withOrigin:(WebCore::FloatPoint)origin fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale minimumScrollDistance:(float)minimumScrollDistance
</ins><span class="cx"> {
</span><del>- return contentZoomScale(self);
-}
</del><ins>+ const float maximumScaleFactorDeltaForPanScroll = 0.02;
</ins><span class="cx">
</span><del>-- (CGFloat)_targetContentZoomScaleForRect:(const WebCore::FloatRect&)targetRect currentScale:(double)currentScale fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale
-{
</del><ins>+ double currentScale = contentZoomScale(self);
+
</ins><span class="cx"> WebCore::FloatSize unobscuredContentSize([self _contentRectForUserInteraction].size);
</span><span class="cx"> double horizontalScale = unobscuredContentSize.width() * currentScale / targetRect.width();
</span><span class="cx"> double verticalScale = unobscuredContentSize.height() * currentScale / targetRect.height();
</span><span class="lines">@@ -1406,16 +1405,7 @@
</span><span class="cx"> horizontalScale = std::min(std::max(horizontalScale, minimumScale), maximumScale);
</span><span class="cx"> verticalScale = std::min(std::max(verticalScale, minimumScale), maximumScale);
</span><span class="cx">
</span><del>- return fitEntireRect ? std::min(horizontalScale, verticalScale) : horizontalScale;
-}
-
-- (BOOL)_zoomToRect:(WebCore::FloatRect)targetRect withOrigin:(WebCore::FloatPoint)origin fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale minimumScrollDistance:(float)minimumScrollDistance
-{
- const float maximumScaleFactorDeltaForPanScroll = 0.02;
-
- double currentScale = contentZoomScale(self);
- double targetScale = [self _targetContentZoomScaleForRect:targetRect currentScale:currentScale fitEntireRect:fitEntireRect minimumScale:minimumScale maximumScale:maximumScale];
-
</del><ins>+ double targetScale = fitEntireRect ? std::min(horizontalScale, verticalScale) : horizontalScale;
</ins><span class="cx"> if (fabs(targetScale - currentScale) < maximumScaleFactorDeltaForPanScroll) {
</span><span class="cx"> if ([self _scrollToRect:targetRect origin:origin minimumScrollDistance:minimumScrollDistance])
</span><span class="cx"> return true;
</span><span class="lines">@@ -3064,11 +3054,6 @@
</span><span class="cx"> return _viewportMetaTagWidth;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (BOOL)_viewportIsUserScalable
-{
- return [_scrollView isZoomEnabled] && [_scrollView minimumZoomScale] < [_scrollView maximumZoomScale];
-}
-
</del><span class="cx"> - (_WKWebViewPrintFormatter *)_webViewPrintFormatter
</span><span class="cx"> {
</span><span class="cx"> UIViewPrintFormatter *viewPrintFormatter = self.viewPrintFormatter;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessAPICocoaWKWebViewInternalh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -109,9 +109,6 @@
</span><span class="cx"> - (void)_navigationGestureDidBegin;
</span><span class="cx"> - (void)_navigationGestureDidEnd;
</span><span class="cx">
</span><del>-- (CGFloat)_contentZoomScale;
-- (CGFloat)_targetContentZoomScaleForRect:(const WebCore::FloatRect&)targetRect currentScale:(double)currentScale fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale;
-
</del><span class="cx"> @property (nonatomic, readonly) UIEdgeInsets _computedContentInset;
</span><span class="cx"> #else
</span><span class="cx"> @property (nonatomic, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -128,7 +128,6 @@
</span><span class="cx">
</span><span class="cx"> // The viewport meta tag width is negative if the value is not defined.
</span><span class="cx"> @property (nonatomic, readonly) CGFloat _viewportMetaTagWidth;
</span><del>-@property (nonatomic, readonly) BOOL _viewportIsUserScalable;
</del><span class="cx">
</span><span class="cx"> @property (nonatomic, readonly) _WKWebViewPrintFormatter *_webViewPrintFormatter;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/PageClient.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/PageClient.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/PageClient.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -278,7 +278,6 @@
</span><span class="cx"> virtual void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect) = 0;
</span><span class="cx"> virtual void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale) = 0;
</span><span class="cx"> virtual void didChangeViewportMetaTagWidth(float) = 0;
</span><del>- virtual void disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale) = 0;
</del><span class="cx"> virtual double minimumZoomScale() const = 0;
</span><span class="cx"> virtual WebCore::FloatRect documentRect() const = 0;
</span><span class="cx"> virtual void overflowScrollViewWillStartPanGesture() = 0;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -519,7 +519,6 @@
</span><span class="cx"> void commitPotentialTapFailed();
</span><span class="cx"> void didNotHandleTapAsClick(const WebCore::IntPoint&);
</span><span class="cx"> void viewportMetaTagWidthDidChange(float width);
</span><del>- void disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale);
</del><span class="cx"> void didFinishDrawingPagesToPDF(const IPC::DataReference&);
</span><span class="cx"> void contentSizeCategoryDidChange(const String& contentSizeCategory);
</span><span class="cx"> void getLookupContextAtPoint(const WebCore::IntPoint&, std::function<void(const String&, CallbackBase::Error)>);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -189,7 +189,6 @@
</span><span class="cx"> CommitPotentialTapFailed()
</span><span class="cx"> DidNotHandleTapAsClick(WebCore::IntPoint point)
</span><span class="cx"> ViewportMetaTagWidthDidChange(float width)
</span><del>- DisableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, WebCore::FloatRect targetRect, bool isReplacedElement, double minimumScale, double maximumScale)
</del><span class="cx"> DidFinishDrawingPagesToPDF(IPC::DataReference pdfData)
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -134,7 +134,6 @@
</span><span class="cx">
</span><span class="cx"> virtual bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
</span><span class="cx"> virtual void didChangeViewportMetaTagWidth(float) override;
</span><del>- virtual void disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale) override;
</del><span class="cx"> virtual double minimumZoomScale() const override;
</span><span class="cx"> virtual WebCore::FloatRect documentRect() const override;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -270,14 +270,6 @@
</span><span class="cx"> [m_webView _setViewportMetaTagWidth:newWidth];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale)
-{
- if (!m_webView._viewportIsUserScalable)
- return;
-
- [m_contentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:requestID allowsDoubleTapZoom:allowsDoubleTapZoom targetRect:targetRect isReplaced:isReplacedElement minimumScale:minimumScale maximumScale:maximumScale];
-}
-
</del><span class="cx"> double PageClientImpl::minimumZoomScale() const
</span><span class="cx"> {
</span><span class="cx"> if (UIScrollView *scroller = [m_webView scrollView])
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessiosSmartMagnificationControllerh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -48,7 +48,6 @@
</span><span class="cx">
</span><span class="cx"> void handleSmartMagnificationGesture(WebCore::FloatPoint origin);
</span><span class="cx"> void handleResetMagnificationGesture(WebCore::FloatPoint origin);
</span><del>- void adjustSmartMagnificationTargetRectAndZoomScales(bool addMagnificationPadding, WebCore::FloatRect& targetRect, double& minimumScale, double& maximumScale);
</del><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // IPC::MessageReceiver.
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessiosSmartMagnificationControllermm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -78,17 +78,6 @@
</span><span class="cx"> [m_contentView _zoomOutWithOrigin:origin];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SmartMagnificationController::adjustSmartMagnificationTargetRectAndZoomScales(bool addMagnificationPadding, WebCore::FloatRect& targetRect, double& minimumScale, double& maximumScale)
-{
- if (addMagnificationPadding) {
- targetRect.inflateX(smartMagnificationElementPadding * targetRect.width());
- targetRect.inflateY(smartMagnificationElementPadding * targetRect.height());
- }
-
- minimumScale = std::max(minimumScale, smartMagnificationMinimumScale);
- maximumScale = std::min(maximumScale, smartMagnificationMaximumScale);
-}
-
</del><span class="cx"> void SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale)
</span><span class="cx"> {
</span><span class="cx"> if (targetRect.isEmpty()) {
</span><span class="lines">@@ -96,10 +85,15 @@
</span><span class="cx"> [m_contentView _zoomOutWithOrigin:origin];
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- double minimumScale = viewportMinimumScale;
- double maximumScale = viewportMaximumScale;
- adjustSmartMagnificationTargetRectAndZoomScales(!isReplacedElement, targetRect, minimumScale, maximumScale);
</del><span class="cx">
</span><ins>+ if (!isReplacedElement) {
+ targetRect.inflateX(smartMagnificationElementPadding * targetRect.width());
+ targetRect.inflateY(smartMagnificationElementPadding * targetRect.height());
+ }
+
+ double maximumScale = std::min(viewportMaximumScale, smartMagnificationMaximumScale);
+ double minimumScale = std::max(viewportMinimumScale, smartMagnificationMinimumScale);
+
</ins><span class="cx"> // FIXME: Check if text selection wants to consume the double tap before we attempt magnification.
</span><span class="cx">
</span><span class="cx"> // If the content already fits in the scroll view and we're already zoomed in to the target scale,
</span><span class="lines">@@ -124,9 +118,12 @@
</span><span class="cx">
</span><span class="cx"> void SmartMagnificationController::magnify(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale)
</span><span class="cx"> {
</span><del>- double maximumScale = viewportMaximumScale;
- double minimumScale = viewportMinimumScale;
- adjustSmartMagnificationTargetRectAndZoomScales(true, targetRect, minimumScale, maximumScale);
</del><ins>+ targetRect.inflateX(smartMagnificationElementPadding * targetRect.width());
+ targetRect.inflateY(smartMagnificationElementPadding * targetRect.height());
+
+ double maximumScale = std::min(viewportMaximumScale, smartMagnificationMaximumScale);
+ double minimumScale = std::max(viewportMinimumScale, smartMagnificationMinimumScale);
+
</ins><span class="cx"> [m_contentView _zoomToRect:targetRect withOrigin:origin fitEntireRect:NO minimumScale:minimumScale maximumScale:maximumScale minimumScrollDistance:0];
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">
</span><span class="cx"> id <UITextInputDelegate> _inputDelegate;
</span><span class="cx">
</span><del>- uint64_t _latestTapID;
</del><ins>+ uint64_t _latestTapHighlightID;
</ins><span class="cx"> struct TapHighlightInformation {
</span><span class="cx"> WebCore::Color color;
</span><span class="cx"> Vector<WebCore::FloatQuad> quads;
</span><span class="lines">@@ -185,7 +185,6 @@
</span><span class="cx"> - (void)_commitPotentialTapFailed;
</span><span class="cx"> - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
</span><span class="cx">
</span><del>-- (void)_disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:(uint64_t)requestID allowsDoubleTapZoom:(bool)allowsDoubleTapZoom targetRect:(WebCore::FloatRect)targetRect isReplaced:(BOOL)isReplacedElement minimumScale:(double)minimumScale maximumScale:(double)maximumScale;
</del><span class="cx"> - (void)_startAssistingNode:(const WebKit::AssistedNodeInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode userObject:(NSObject <NSSecureCoding> *)userObject;
</span><span class="cx"> - (void)_stopAssistingNode;
</span><span class="cx"> - (void)_selectionChanged;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -739,7 +739,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius
</span><span class="cx"> {
</span><del>- if (!_isTapHighlightIDValid || _latestTapID != requestID)
</del><ins>+ if (!_isTapHighlightIDValid || _latestTapHighlightID != requestID)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> _isTapHighlightIDValid = NO;
</span><span class="lines">@@ -759,44 +759,6 @@
</span><span class="cx"> [self _showTapHighlight];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (CGFloat)_fastClickZoomThreshold
-{
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- if (![defaults boolForKey:@"WebKitFastClickingEnabled"])
- return 0;
-
- return [defaults floatForKey:@"WebKitFastClickZoomThreshold"];
-}
-
-- (BOOL)_allowDoubleTapToZoomForCurrentZoomScale:(CGFloat)currentZoomScale andTargetZoomScale:(CGFloat)targetZoomScale
-{
- CGFloat zoomThreshold = [self _fastClickZoomThreshold];
- if (!zoomThreshold)
- return YES;
-
- CGFloat minimumZoomRatioForDoubleTapToZoomIn = 1 + zoomThreshold;
- CGFloat maximumZoomRatioForDoubleTapToZoomOut = 1 / minimumZoomRatioForDoubleTapToZoomIn;
- CGFloat zoomRatio = targetZoomScale / currentZoomScale;
- return zoomRatio < maximumZoomRatioForDoubleTapToZoomOut || zoomRatio > minimumZoomRatioForDoubleTapToZoomIn;
-}
-
-- (void)_disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:(uint64_t)requestID allowsDoubleTapZoom:(bool)allowsDoubleTapZoom targetRect:(WebCore::FloatRect)targetRect isReplaced:(BOOL)isReplacedElement minimumScale:(double)minimumScale maximumScale:(double)maximumScale
-{
- if (!_potentialTapInProgress || _latestTapID != requestID)
- return;
-
- if (allowsDoubleTapZoom) {
- // Though the element allows us to zoom in on double tap, we avoid this behavior in favor of fast clicking if the difference in scale is insignificant.
- _smartMagnificationController->adjustSmartMagnificationTargetRectAndZoomScales(!isReplacedElement, targetRect, minimumScale, maximumScale);
- CGFloat currentZoomScale = [_webView _contentZoomScale];
- CGFloat targetZoomScale = [_webView _targetContentZoomScaleForRect:targetRect currentScale:currentZoomScale fitEntireRect:isReplacedElement minimumScale:minimumScale maximumScale:maximumScale];
- if ([self _allowDoubleTapToZoomForCurrentZoomScale:currentZoomScale andTargetZoomScale:targetZoomScale])
- return;
- }
-
- [self _setDoubleTapGesturesEnabled:NO];
-}
-
</del><span class="cx"> - (void)_cancelLongPressGestureRecognizer
</span><span class="cx"> {
</span><span class="cx"> [_highlightLongPressGestureRecognizer cancel];
</span><span class="lines">@@ -1095,7 +1057,7 @@
</span><span class="cx"> case UIGestureRecognizerStateBegan:
</span><span class="cx"> _highlightLongPressCanClick = YES;
</span><span class="cx"> cancelPotentialTapIfNecessary(self);
</span><del>- _page->tapHighlightAtPosition([gestureRecognizer startPoint], ++_latestTapID);
</del><ins>+ _page->tapHighlightAtPosition([gestureRecognizer startPoint], ++_latestTapHighlightID);
</ins><span class="cx"> _isTapHighlightIDValid = YES;
</span><span class="cx"> break;
</span><span class="cx"> case UIGestureRecognizerStateEnded:
</span><span class="lines">@@ -1136,20 +1098,12 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_endPotentialTapAndEnableDoubleTapGesturesIfNecessary
-{
- if (_webView._viewportIsUserScalable)
- [self _setDoubleTapGesturesEnabled:YES];
-
- _potentialTapInProgress = NO;
-}
-
</del><span class="cx"> - (void)_singleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><span class="cx"> ASSERT(gestureRecognizer == _singleTapGestureRecognizer);
</span><span class="cx"> ASSERT(!_potentialTapInProgress);
</span><span class="cx">
</span><del>- _page->potentialTapAtPosition(gestureRecognizer.location, ++_latestTapID);
</del><ins>+ _page->potentialTapAtPosition(gestureRecognizer.location, ++_latestTapHighlightID);
</ins><span class="cx"> _potentialTapInProgress = YES;
</span><span class="cx"> _isTapHighlightIDValid = YES;
</span><span class="cx"> }
</span><span class="lines">@@ -1157,7 +1111,7 @@
</span><span class="cx"> static void cancelPotentialTapIfNecessary(WKContentView* contentView)
</span><span class="cx"> {
</span><span class="cx"> if (contentView->_potentialTapInProgress) {
</span><del>- [contentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary];
</del><ins>+ contentView->_potentialTapInProgress = NO;
</ins><span class="cx"> [contentView _cancelInteraction];
</span><span class="cx"> contentView->_page->cancelPotentialTap();
</span><span class="cx"> }
</span><span class="lines">@@ -1196,7 +1150,7 @@
</span><span class="cx">
</span><span class="cx"> _lastInteractionLocation = gestureRecognizer.location;
</span><span class="cx">
</span><del>- [self _endPotentialTapAndEnableDoubleTapGesturesIfNecessary];
</del><ins>+ _potentialTapInProgress = NO;
</ins><span class="cx">
</span><span class="cx"> if (_hasTapHighlightForPotentialTap) {
</span><span class="cx"> [self _showTapHighlight];
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -905,11 +905,6 @@
</span><span class="cx"> m_pageClient.didChangeViewportMetaTagWidth(width);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale)
-{
- m_pageClient.disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(requestID, allowsDoubleTapZoom, targetRect, isReplacedElement, minimumScale, maximumScale);
-}
-
</del><span class="cx"> void WebPageProxy::didFinishDrawingPagesToPDF(const IPC::DataReference& pdfData)
</span><span class="cx"> {
</span><span class="cx"> m_pageClient.didFinishDrawingPagesToPDF(pdfData);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -86,45 +86,39 @@
</span><span class="cx"> HitTestResult hitTestResult = HitTestResult(originInContentsSpace);
</span><span class="cx">
</span><span class="cx"> m_webPage.mainFrameView()->renderView()->hitTest(HitTestRequest(), hitTestResult);
</span><del>- Node* node = hitTestResult.innerNode();
- if (!node) {
- dispatchDidCollectGeometryForSmartMagnificationGesture(FloatPoint(), FloatRect(), FloatRect(), false, 0, 0);
- return;
- }
</del><span class="cx">
</span><del>- bool isReplaced;
- FloatRect renderRect;
- double viewportMinimumScale;
- double viewportMaximumScale;
</del><ins>+ if (Node* node = hitTestResult.innerNode()) {
+ bool isReplaced;
+ FloatRect renderRect = node->renderRect(&isReplaced);
</ins><span class="cx">
</span><del>- computeZoomInformationForNode(*node, origin, renderRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
- dispatchDidCollectGeometryForSmartMagnificationGesture(origin, renderRect, visibleContentRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
-}
-
-void ViewGestureGeometryCollector::computeZoomInformationForNode(Node& node, FloatPoint& origin, FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale)
-{
- renderRect = node.renderRect(&isReplaced);
- if (node.document().isImageDocument()) {
- if (HTMLImageElement* imageElement = static_cast<ImageDocument&>(node.document()).imageElement()) {
- if (&node != imageElement) {
- renderRect = imageElement->renderRect(&isReplaced);
- FloatPoint newOrigin = origin;
- if (origin.x() < renderRect.x() || origin.x() > renderRect.maxX())
- newOrigin.setX(renderRect.x() + renderRect.width() / 2);
- if (origin.y() < renderRect.y() || origin.y() > renderRect.maxY())
- newOrigin.setY(renderRect.y() + renderRect.height() / 2);
- origin = newOrigin;
</del><ins>+ if (node->document().isImageDocument()) {
+ if (HTMLImageElement* imageElement = static_cast<ImageDocument&>(node->document()).imageElement()) {
+ if (node != imageElement) {
+ renderRect = imageElement->renderRect(&isReplaced);
+ FloatPoint newOrigin = origin;
+ if (origin.x() < renderRect.x() || origin.x() > renderRect.maxX())
+ newOrigin.setX(renderRect.x() + renderRect.width() / 2);
+ if (origin.y() < renderRect.y() || origin.y() > renderRect.maxY())
+ newOrigin.setY(renderRect.y() + renderRect.height() / 2);
+ origin = newOrigin;
+ }
+ isReplaced = true;
</ins><span class="cx"> }
</span><del>- isReplaced = true;
</del><span class="cx"> }
</span><del>- }
</del><ins>+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><del>- viewportMinimumScale = 0;
- viewportMaximumScale = std::numeric_limits<double>::max();
</del><ins>+ double viewportMinimumScale = 0;
+ double viewportMaximumScale = std::numeric_limits<double>::max();
</ins><span class="cx"> #else
</span><del>- viewportMinimumScale = m_webPage.minimumPageScaleFactor();
- viewportMaximumScale = m_webPage.maximumPageScaleFactor();
</del><ins>+ double viewportMinimumScale = m_webPage.minimumPageScaleFactor();
+ double viewportMaximumScale = m_webPage.maximumPageScaleFactor();
</ins><span class="cx"> #endif
</span><ins>+
+ dispatchDidCollectGeometryForSmartMagnificationGesture(origin, renderRect, visibleContentRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
+ return;
+ }
+
+ dispatchDidCollectGeometryForSmartMagnificationGesture(FloatPoint(), FloatRect(), FloatRect(), false, 0, 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class FloatPoint;
</span><span class="cx"> class FloatRect;
</span><del>-class Node;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -45,7 +44,6 @@
</span><span class="cx"> ~ViewGestureGeometryCollector();
</span><span class="cx">
</span><span class="cx"> void mainFrameDidLayout();
</span><del>- void computeZoomInformationForNode(WebCore::Node&, WebCore::FloatPoint& origin, WebCore::FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale);
</del><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // IPC::MessageReceiver.
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (193568 => 193569)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-12-06 07:27:37 UTC (rev 193568)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-12-06 07:27:45 UTC (rev 193569)
</span><span class="lines">@@ -662,16 +662,6 @@
</span><span class="cx"> {
</span><span class="cx"> m_potentialTapNode = m_page->mainFrame().nodeRespondingToClickEvents(position, m_potentialTapLocation);
</span><span class="cx"> sendTapHighlightForNodeIfNecessary(requestID, m_potentialTapNode.get());
</span><del>- if (m_potentialTapNode) {
- FloatPoint origin = position;
- FloatRect renderRect;
- bool isReplaced;
- double viewportMinimumScale;
- double viewportMaximumScale;
-
- m_viewGestureGeometryCollector.computeZoomInformationForNode(*m_potentialTapNode.get(), origin, renderRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
- send(Messages::WebPageProxy::DisableDoubleTapGesturesUntilTapIsFinishedIfNecessary(requestID, true, renderRect, isReplaced, viewportMinimumScale, viewportMaximumScale));
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::commitPotentialTap(uint64_t lastLayerTreeTransactionId)
</span></span></pre>
</div>
</div>
</body>
</html>