Unreviewed, rolling out r202179.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jun 2016 20:40:03 +0000 (20:40 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jun 2016 20:40:03 +0000 (20:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158946

The test either fails or times out 100% of the time (Requested
by ap on #webkit).

Reverted changeset:

"REGRESSION: Double tap to zoom does not work on yahoo
finance"
https://bugs.webkit.org/show_bug.cgi?id=158886
http://trac.webkit.org/changeset/202179

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-20

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@202239 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/events/ios/viewport-shrink-to-fit-allows-double-tap-expected.txt [deleted file]
LayoutTests/fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html [deleted file]
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

index a91f3ae..1f4a34b 100644 (file)
@@ -1,3 +1,18 @@
+2016-06-20  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r202179.
+        https://bugs.webkit.org/show_bug.cgi?id=158946
+
+        The test either fails or times out 100% of the time (Requested
+        by ap on #webkit).
+
+        Reverted changeset:
+
+        "REGRESSION: Double tap to zoom does not work on yahoo
+        finance"
+        https://bugs.webkit.org/show_bug.cgi?id=158886
+        http://trac.webkit.org/changeset/202179
+
 2016-06-20  Alexey Proskuryakov  <ap@apple.com>
 
         Fix a run-webkit-tests --lint warning.
diff --git a/LayoutTests/fast/events/ios/viewport-shrink-to-fit-allows-double-tap-expected.txt b/LayoutTests/fast/events/ios/viewport-shrink-to-fit-allows-double-tap-expected.txt
deleted file mode 100644 (file)
index 1230273..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-The viewport zoomed to scale: 1.6
-This test ensures that a page with width=device-width but content that causes a shrink-to-fit will not block double-tap-to-zoom. It runs automatically in WebKit tests. If you're viewing this manually, double tap on this text and the page should zoom in.
-
-This is an element that will cause shrinkage.
diff --git a/LayoutTests/fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html b/LayoutTests/fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html
deleted file mode 100644 (file)
index efcb0f0..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-
-<html>
-<meta name="viewport" content="width=device-width">
-<head>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-
-        function getUIScript()
-        {
-            return `
-                (function() {
-                    uiController.didEndZoomingCallback = function() {
-                        uiController.uiScriptComplete(uiController.zoomScale);
-                    };
-                    uiController.doubleTapAtPoint(15, 15, function() {});
-                })();`;
-        }
-
-        function runTest()
-        {
-            if (!window.eventSender || !testRunner.runUIScript)
-                return;
-
-            testRunner.runUIScript(getUIScript(), function(result) {
-                document.getElementById("target").innerText = "The viewport zoomed to scale: " + result;
-                testRunner.notifyDone();
-            });
-        }
-    </script>
-    <style>
-        body {
-            margin: 0;
-            min-width: 800px;
-        }
-        p {
-            width: 300px;
-        }
-        #target {
-            height: 100px;
-            width: 100px;
-            background-color: silver;
-        }
-    </style>
-</head>
-<body onload="runTest()">
-<div id="target"></div>
-<p>
-    This test ensures that a page with width=device-width but content that
-    causes a shrink-to-fit will not block double-tap-to-zoom. It runs automatically
-    in WebKit tests. If you're viewing this manually, double tap on this text and
-    the page should zoom in.
-</p>
-<p style="height: 3000px; background-color: #f0e0f0">
-    This is an element that will cause shrinkage.
-</p>
-</body>
-</html>
index 87344e8..8c00ab7 100644 (file)
@@ -1,3 +1,18 @@
+2016-06-20  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r202179.
+        https://bugs.webkit.org/show_bug.cgi?id=158946
+
+        The test either fails or times out 100% of the time (Requested
+        by ap on #webkit).
+
+        Reverted changeset:
+
+        "REGRESSION: Double tap to zoom does not work on yahoo
+        finance"
+        https://bugs.webkit.org/show_bug.cgi?id=158886
+        http://trac.webkit.org/changeset/202179
+
 2016-06-20  Tim Horton  <timothy_horton@apple.com>
 
         REGRESSION (r191499): Tab content "jumps" down when focusing tabs that load in the background
index b8a8b2e..d6baf85 100644 (file)
@@ -1736,16 +1736,11 @@ static WebCore::FloatPoint constrainContentOffset(WebCore::FloatPoint contentOff
     if (!_viewportMetaTagWidthWasExplicit || _viewportMetaTagCameFromImageDocument)
         return YES;
 
-    // If the page set a viewport width that wasn't the device width, then it was
-    // scaled and thus will probably need to zoom.
+    // For scalable viewports, only disable double tap gestures if the viewport width is device width.
     if (_viewportMetaTagWidth != WebCore::ViewportArguments::ValueDeviceWidth)
         return YES;
 
-    // At this point, we have a page that asked for width = device-width. However,
-    // if the content's width and height were large, we might have had to shrink it.
-    // Since we'll enable double tap zoom whenever we're not at the actual
-    // initial scale, this simply becomes a test of the current scale against 1.
-    return !areEssentiallyEqualAsFloat(contentZoomScale(self), 1);
+    return !areEssentiallyEqualAsFloat(contentZoomScale(self), _initialScaleFactor);
 }
 
 #pragma mark - UIScrollViewDelegate