Title: [232916] trunk
Revision
232916
Author
wenson_hs...@apple.com
Date
2018-06-17 11:37:09 -0700 (Sun, 17 Jun 2018)

Log Message

[WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=186442
<rdar://problem/40879364>

Reviewed by Darin Adler.

Source/WebCore:

Rename references to "Extra zoom mode". No change in behavior.

* page/DisabledAdaptations.cpp:
(WebCore::watchAdaptationName):
(WebCore::extraZoomModeAdaptationName): Deleted.
* page/DisabledAdaptations.h:
* page/ViewportConfiguration.cpp:
(WebCore::needsUpdateAfterChangingDisabledAdaptations):
(WebCore::ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit const):
* page/WindowFeatures.cpp:
(WebCore::parseDisabledAdaptations):
* testing/Internals.cpp:
(WebCore::Internals::extraZoomModeAdaptationName const): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Rename a category referencing "Extra zoom mode".

* UIProcess/ios/WKContentViewInteraction.mm:

LayoutTests:

Rename extrazoom layout test directories to watchos.

* TestExpectations:
* fast/css/watchos/viewport-units-shrink-to-fit-expected.txt: Renamed from LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit-expected.txt.
* fast/css/watchos/viewport-units-shrink-to-fit.html: Renamed from LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html.
* fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt: Renamed from LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions-expected.txt.
* fast/dom/Window/watchos/window-get-real-screen-dimensions.html: Renamed from LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions.html.
* fast/events/watchos/change-focus-during-change-event-expected.txt: Renamed from LayoutTests/fast/events/extrazoom/change-focus-during-change-event-expected.txt.
* fast/events/watchos/change-focus-during-change-event.html: Renamed from LayoutTests/fast/events/extrazoom/change-focus-during-change-event.html.
* fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text-expected.txt.
* fast/events/watchos/double-tap-to-zoom-on-full-width-text.html: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text.html.
* fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text-expected.txt.
* fast/events/watchos/double-tap-to-zoom-with-large-text.html: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text.html.
* fast/forms/watchos/delete-content-in-text-field-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/delete-content-in-text-field-expected.txt.
* fast/forms/watchos/delete-content-in-text-field.html: Renamed from LayoutTests/fast/forms/extrazoom/delete-content-in-text-field.html.
* fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle-expected.txt.
* fast/forms/watchos/edit-text-field-calls-injected-bundle.html: Renamed from LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle.html.
* fast/forms/watchos/form-control-label-text-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/form-control-label-text-expected.txt.
* fast/forms/watchos/form-control-label-text.html: Renamed from LayoutTests/fast/forms/extrazoom/form-control-label-text.html.
* fast/forms/watchos/time-picker-value-change-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/time-picker-value-change-expected.txt.
* fast/forms/watchos/time-picker-value-change.html: Renamed from LayoutTests/fast/forms/extrazoom/time-picker-value-change.html.
* fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation-expected.txt.
* fast/viewport/watchos/viewport-adaptations-after-navigation.html: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html.
* fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations-expected.txt.
* fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html.
* fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt: Renamed from LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing-expected.txt.
* fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html: Renamed from LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html.

Modified Paths

Added Paths

Removed Paths

  • trunk/LayoutTests/fast/css/extrazoom/
  • trunk/LayoutTests/fast/dom/Window/extrazoom/
  • trunk/LayoutTests/fast/events/extrazoom/
  • trunk/LayoutTests/fast/forms/extrazoom/
  • trunk/LayoutTests/fast/viewport/extrazoom/
  • trunk/LayoutTests/fast/visual-viewport/extrazoom/

Diff

Modified: trunk/LayoutTests/ChangeLog (232915 => 232916)


--- trunk/LayoutTests/ChangeLog	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/LayoutTests/ChangeLog	2018-06-17 18:37:09 UTC (rev 232916)
@@ -1,3 +1,39 @@
+2018-06-17  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 3)
+        https://bugs.webkit.org/show_bug.cgi?id=186442
+        <rdar://problem/40879364>
+
+        Reviewed by Darin Adler.
+
+        Rename extrazoom layout test directories to watchos.
+
+        * TestExpectations:
+        * fast/css/watchos/viewport-units-shrink-to-fit-expected.txt: Renamed from LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit-expected.txt.
+        * fast/css/watchos/viewport-units-shrink-to-fit.html: Renamed from LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html.
+        * fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt: Renamed from LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions-expected.txt.
+        * fast/dom/Window/watchos/window-get-real-screen-dimensions.html: Renamed from LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions.html.
+        * fast/events/watchos/change-focus-during-change-event-expected.txt: Renamed from LayoutTests/fast/events/extrazoom/change-focus-during-change-event-expected.txt.
+        * fast/events/watchos/change-focus-during-change-event.html: Renamed from LayoutTests/fast/events/extrazoom/change-focus-during-change-event.html.
+        * fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text-expected.txt.
+        * fast/events/watchos/double-tap-to-zoom-on-full-width-text.html: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text.html.
+        * fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text-expected.txt.
+        * fast/events/watchos/double-tap-to-zoom-with-large-text.html: Renamed from LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text.html.
+        * fast/forms/watchos/delete-content-in-text-field-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/delete-content-in-text-field-expected.txt.
+        * fast/forms/watchos/delete-content-in-text-field.html: Renamed from LayoutTests/fast/forms/extrazoom/delete-content-in-text-field.html.
+        * fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle-expected.txt.
+        * fast/forms/watchos/edit-text-field-calls-injected-bundle.html: Renamed from LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle.html.
+        * fast/forms/watchos/form-control-label-text-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/form-control-label-text-expected.txt.
+        * fast/forms/watchos/form-control-label-text.html: Renamed from LayoutTests/fast/forms/extrazoom/form-control-label-text.html.
+        * fast/forms/watchos/time-picker-value-change-expected.txt: Renamed from LayoutTests/fast/forms/extrazoom/time-picker-value-change-expected.txt.
+        * fast/forms/watchos/time-picker-value-change.html: Renamed from LayoutTests/fast/forms/extrazoom/time-picker-value-change.html.
+        * fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation-expected.txt.
+        * fast/viewport/watchos/viewport-adaptations-after-navigation.html: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html.
+        * fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations-expected.txt.
+        * fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html: Renamed from LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html.
+        * fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt: Renamed from LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing-expected.txt.
+        * fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html: Renamed from LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html.
+
 2018-06-17  Youenn Fablet  <you...@apple.com>
 
         Rename Document::hasHadActiveMediaStreamTrack to Document::hasHadCaptureMediaStreamTrack

Modified: trunk/LayoutTests/TestExpectations (232915 => 232916)


--- trunk/LayoutTests/TestExpectations	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/LayoutTests/TestExpectations	2018-06-17 18:37:09 UTC (rev 232916)
@@ -18,11 +18,11 @@
 editing/pasteboard/gtk [ Skip ]
 editing/selection/ios [ Skip ]
 tiled-drawing [ Skip ]
-fast/css/extrazoom [ Skip ]
-fast/dom/Window/extrazoom [ Skip ]
-fast/forms/extrazoom [ Skip ]
-fast/viewport/extrazoom [ Skip ]
-fast/visual-viewport/extrazoom [ Skip ]
+fast/css/watchos [ Skip ]
+fast/dom/Window/watchos [ Skip ]
+fast/forms/watchos [ Skip ]
+fast/viewport/watchos [ Skip ]
+fast/visual-viewport/watchos [ Skip ]
 fast/visual-viewport/tiled-drawing [ Skip ]
 swipe [ Skip ]
 fast/zooming/ios [ Skip ]
@@ -30,7 +30,7 @@
 fast/viewport/ios [ Skip ]
 fast/visual-viewport/ios/ [ Skip ]
 fast/events/ios [ Skip ]
-fast/events/extrazoom [ Skip ]
+fast/events/watchos [ Skip ]
 fast/events/touch/ios [ Skip ]
 fast/history/ios [ Skip ]
 fast/scrolling/ios [ Skip ]

Copied: trunk/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit-expected.txt (from rev 232915, trunk/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,14 @@
+PASS innerWidthBeforeRemoval is 512
+PASS Math.round(largeElementRectBeforeRemoval.width) is 512
+PASS Math.round(largeElementRectBeforeRemoval.height) is innerHeightBeforeRemoval
+PASS Math.round(mediumElementRectBeforeRemoval.width) is 320
+
+After removing large container:
+
+PASS innerWidthAfterRemoval is 320
+PASS Math.round(mediumElementRectAfterRemoval.width) is 320
+PASS Math.round(mediumElementRectAfterRemoval.height) is innerHeightAfterRemoval
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit.html (from rev 232915, trunk/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html) (0 => 232916)


--- trunk/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,53 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<head>
+    <style>
+        html, body {
+            width: 100%;
+            height: 100%;
+            margin: 0;
+        }
+
+        #large, #medium {
+            position: absolute;
+            top: 0;
+            left: 0;
+        }
+    </style>
+    <script src=""
+    <script src=""
+    <script>
+        jsTestIsAsync = true;
+
+        async function runTest() {
+            largeElementRectBeforeRemoval = large.getBoundingClientRect();
+            mediumElementRectBeforeRemoval = medium.getBoundingClientRect();
+            innerWidthBeforeRemoval = innerWidth;
+            innerHeightBeforeRemoval = innerHeight;
+
+            large.remove();
+
+            mediumElementRectAfterRemoval = medium.getBoundingClientRect();
+            innerWidthAfterRemoval = innerWidth;
+            innerHeightAfterRemoval = innerHeight;
+
+            shouldBe("innerWidthBeforeRemoval", "512");
+            shouldBe("Math.round(largeElementRectBeforeRemoval.width)", "512");
+            shouldBe("Math.round(largeElementRectBeforeRemoval.height)", "innerHeightBeforeRemoval");
+            shouldBe("Math.round(mediumElementRectBeforeRemoval.width)", "320");
+            debug("\nAfter removing large container:\n");
+            shouldBe("innerWidthAfterRemoval", "320");
+            shouldBe("Math.round(mediumElementRectAfterRemoval.width)", "320");
+            shouldBe("Math.round(mediumElementRectAfterRemoval.height)", "innerHeightAfterRemoval");
+
+            finishJSTest();
+        }
+    </script>
+</head>
+
+<body _onload_="runTest()">
+    <div id="large" style="width: 160vw; height: 160vh; background-color: blue;"></div>
+    <div id="medium" style="width: 100vw; height: 100vh; background-color: green;"></div>
+</body>
+</html>
\ No newline at end of file

Copied: trunk/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt (from rev 232915, trunk/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,6 @@
+PASS screen.width is 320
+PASS screen.height is 568
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions.html (from rev 232915, trunk/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions.html) (0 => 232916)


--- trunk/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body></body>
+<script>
+shouldBe("screen.width", "320");
+shouldBe("screen.height", "568");
+</script>
+</html>
\ No newline at end of file

Copied: trunk/LayoutTests/fast/events/watchos/change-focus-during-change-event-expected.txt (from rev 232915, trunk/LayoutTests/fast/events/extrazoom/change-focus-during-change-event-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/events/watchos/change-focus-during-change-event-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/events/watchos/change-focus-during-change-event-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,10 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+Choosing second option in top select...
+Option two should be selected: true
+Choosing second option in bottom select...
+Option four should be selected: true
+

Copied: trunk/LayoutTests/fast/events/watchos/change-focus-during-change-event.html (from rev 232915, trunk/LayoutTests/fast/events/extrazoom/change-focus-during-change-event.html) (0 => 232916)


--- trunk/LayoutTests/fast/events/watchos/change-focus-during-change-event.html	                        (rev 0)
+++ trunk/LayoutTests/fast/events/watchos/change-focus-during-change-event.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,60 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width">
+<head>
+    <script src=""
+    <script src=""
+    <style>
+        body, html {
+            margin: 0;
+            width: 100%;
+            height: 100%;
+            position: absolute;
+        }
+        select {
+            width: 100%;
+            height: 80px;
+            display: block;
+        }
+    </style>
+    <script>
+        jsTestIsAsync = true;
+
+        function selectOptionAtIndexAndWaitForKeyboardToHide(index) {
+            return new Promise(resolve => {
+                UIHelper.waitForKeyboardToHide().then(resolve);
+                UIHelper.selectFormAccessoryPickerRow(index);
+            });
+        }
+
+        async function runTest() {
+            // First, tap on the top select and choose the second option. Changing the value of the select causes the
+            // bottom select to be focused.
+            await UIHelper.activateAndWaitForInputSessionAt(50, 40);
+            output.innerHTML += "Choosing second option in top select...<br>";
+            await selectOptionAtIndexAndWaitForKeyboardToHide(1);
+            output.innerHTML += `Option two should be selected: ${two.selected}<br>`;
+
+            // Now tap on the bottom select and choose the second option. Changing the value of this select causes the
+            // select to blur, dismissing the input view.
+            await UIHelper.activateAndWaitForInputSessionAt(50, 120);
+            output.innerHTML += "Choosing second option in bottom select...<br>";
+            await selectOptionAtIndexAndWaitForKeyboardToHide(1);
+            output.innerHTML += `Option four should be selected: ${four.selected}<br>`;
+
+            finishJSTest();
+        }
+    </script>
+</head>
+<body _onload_="runTest()">
+<select id="top" _onchange_="document.getElementById('bottom').focus()">
+    <option selected>One</option>
+    <option id="two">Two</option>
+</select>
+<select id="bottom" _onchange_="this.blur()">
+    <option selected>Three</option>
+    <option id="four">Four</option>
+</select>
+<pre id="output"></pre>
+</body>
+</html>

Copied: trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt (from rev 232915, trunk/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,5 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Even though this text is laid out at the full document width, we should still be able to double tap to zoom in "extra zoom mode", such that the text becomes legible.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Copied: trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text.html (from rev 232915, trunk/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text.html) (0 => 232916)


--- trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text.html	                        (rev 0)
+++ trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,25 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<script src=""
+<script src=""
+<meta name="viewport" content="width=device-width">
+<body style="margin: 0; font-size: 10px;">
+    <div>
+        Even though this text is laid out at the full document width, we should still
+        be able to double tap to zoom in "extra zoom mode", such that the text becomes
+        legible.
+    </div>
+    <div>
+        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+        incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
+        nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+        fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
+        culpa qui officia deserunt mollit anim id est laborum.
+    </div>
+</body>
+<script>
+    jsTestIsAsync = true;
+    doubleTapToZoomAtPoint(75, 75).then(finishJSTest);
+</script>
+</html>

Copied: trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt (from rev 232915, trunk/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,4 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Even though this text is large enough to be legible at initial scale, we should still allow double tapping to zoom for consistent behavior.

Copied: trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text.html (from rev 232915, trunk/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text.html) (0 => 232916)


--- trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text.html	                        (rev 0)
+++ trunk/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,17 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<script src=""
+<script src=""
+<meta name="viewport" content="width=device-width">
+<body style="margin: 0;">
+    <div style="background-color: red; width: 150px; height: 150px;"></div>
+    <h1 style="font-size: 2em;">
+        Even though this text is large enough to be legible at initial scale, we should
+        still allow double tapping to zoom for consistent behavior.
+    </h1>
+</body>
+<script>
+    jsTestIsAsync = true;
+    doubleTapToZoomAtPoint(75, 75).then(finishJSTest);
+</script>
+</html>

Copied: trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field-expected.txt (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,12 @@
+PASS inputEventAfterInsertingText.type is 'input'
+PASS inputEventAfterInsertingText.inputType is 'insertText'
+PASS inputEventAfterInsertingText.data is 'testing'
+PASS valueAfterInsertingText is 'testing'
+PASS inputEventAfterDeletingText.type is 'input'
+PASS inputEventAfterDeletingText.inputType is 'deleteContent'
+PASS inputEventAfterDeletingText.data is null
+PASS valueAfterDeletingText is ''
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field.html) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,60 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width">
+<head>
+<script src=""
+<script src=""
+<script>
+doneCount = 0;
+lastInputEvent = null;
+jsTestIsAsync = true;
+
+function enterTextAndWaitForKeyboardToHide(text) {
+    return new Promise(async resolve => {
+        await UIHelper.activateAndWaitForInputSessionAt(100, 100);
+        UIHelper.waitForKeyboardToHide().then(resolve);
+        UIHelper.enterText(text);
+    });
+}
+
+async function runTest() {
+    if (!window.testRunner) {
+        description(`This test requires WebKitTestRunner.`);
+        return;
+    }
+
+    await enterTextAndWaitForKeyboardToHide("testing");
+    inputEventAfterInsertingText = lastInputEvent;
+    valueAfterInsertingText = field.value;
+
+    await enterTextAndWaitForKeyboardToHide("");
+    inputEventAfterDeletingText = lastInputEvent;
+    valueAfterDeletingText = field.value;
+
+    shouldBe("inputEventAfterInsertingText.type", "'input'");
+    shouldBe("inputEventAfterInsertingText.inputType", "'insertText'");
+    shouldBe("inputEventAfterInsertingText.data", "'testing'");
+    shouldBe("valueAfterInsertingText", "'testing'");
+
+    shouldBe("inputEventAfterDeletingText.type", "'input'");
+    shouldBe("inputEventAfterDeletingText.inputType", "'deleteContent'");
+    shouldBe("inputEventAfterDeletingText.data", "null");
+    shouldBe("valueAfterDeletingText", "''");
+
+    checkDone();
+}
+
+function handleInput(event) {
+    lastInputEvent = event;
+}
+
+function checkDone() {
+    if (++doneCount === 3)
+        finishJSTest();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<input id="field" style="width: 320px; height: 568px;" _oninput_="handleInput(event)" _onblur_="checkDone()"></input>
+</body>
+</html>

Copied: trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,7 @@
+TextFieldDidBeginEditing ('')
+TextDidChangeInTextField ('Hello world')
+TextFieldDidEndEditing ('Hello world')
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle.html) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,37 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width">
+<head>
+<script src=""
+<script src=""
+<script>
+doneCount = 0;
+jsTestIsAsync = true;
+
+async function runTest() {
+    if (!window.testRunner) {
+        description(`This test requires WebKitTestRunner.`);
+        return;
+    }
+
+    testRunner.installTextFieldDidBeginEditingCallback(() => debug(`TextFieldDidBeginEditing ('${field.value}')`));
+    testRunner.installTextDidChangeInTextFieldCallback(() => debug(`TextDidChangeInTextField ('${field.value}')`));
+    testRunner.installTextFieldDidEndEditingCallback(() => debug(`TextFieldDidEndEditing ('${field.value}')`));
+
+    await UIHelper.activateAndWaitForInputSessionAt(75, 75);
+    UIHelper.waitForKeyboardToHide().then(checkDone);
+    UIHelper.enterText("Hello world");
+}
+
+function checkDone() {
+    doneCount++;
+    if (doneCount == 3)
+        finishJSTest();
+}
+</script>
+</head>
+
+<body _onload_="runTest()">
+<input id="field" style="width: 320px; height: 568px;" _onchange_="checkDone()" _onblur_="checkDone()"></input>
+</body>
+</html>

Copied: trunk/LayoutTests/fast/forms/watchos/form-control-label-text-expected.txt (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/form-control-label-text-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/form-control-label-text-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/form-control-label-text-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,9 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+test label 4
+Label text should be missing: ""
+Label text should use the placeholder: "test label 1"
+Label text should use the title: "test label 2"
+Label text should use the accessibility label: "test label 3"
+Label text should use the associated label: "test label 4"

Copied: trunk/LayoutTests/fast/forms/watchos/form-control-label-text.html (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/form-control-label-text.html) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/form-control-label-text.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/form-control-label-text.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,54 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width">
+<head>
+<script src=""
+<script src=""
+<script>
+jsTestIsAsync = true;
+
+function getLabelTextAfterFocusingInput() {
+    return new Promise(async (resolve) => {
+        await UIHelper.activateAndWaitForInputSessionAt(75, 75);
+        const labelText = await UIHelper.formInputLabel();
+        field.blur();
+        await UIHelper.waitForKeyboardToHide();
+        resolve(labelText);
+    });
+}
+
+async function runTest() {
+    if (!window.testRunner) {
+        description(`This test requires WebKitTestRunner.`);
+        return;
+    }
+
+    missingLabel.textContent = await getLabelTextAfterFocusingInput();
+
+    field.setAttribute("placeholder", "test label 1");
+    labelFromPlaceholder.textContent = await getLabelTextAfterFocusingInput();
+
+    field.setAttribute("title", "test label 2");
+    labelFromTitle.textContent = await getLabelTextAfterFocusingInput();
+
+    field.setAttribute("aria-label", "test label 3");
+    labelFromAriaLabel.textContent = await getLabelTextAfterFocusingInput();
+
+    label.setAttribute("for", "field");
+    labelFromLabelElement.textContent = await getLabelTextAfterFocusingInput();
+
+    finishJSTest();
+}
+</script>
+</head>
+
+<body _onload_="runTest()">
+<input id="field" style="width: 320px; height: 568px;"></input>
+<label id="label">test label 4</label>
+<div>Label text should be missing: "<code id="missingLabel"></code>"</div>
+<div>Label text should use the placeholder: "<code id="labelFromPlaceholder"></code>"</div>
+<div>Label text should use the title: "<code id="labelFromTitle"></code>"</div>
+<div>Label text should use the accessibility label: "<code id="labelFromAriaLabel"></code>"</div>
+<div>Label text should use the associated label: "<code id="labelFromLabelElement"></code>"</div>
+</body>
+</html>
\ No newline at end of file

Copied: trunk/LayoutTests/fast/forms/watchos/time-picker-value-change-expected.txt (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/time-picker-value-change-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/time-picker-value-change-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/time-picker-value-change-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,5 @@
+PASS time.value is '09:41'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/fast/forms/watchos/time-picker-value-change.html (from rev 232915, trunk/LayoutTests/fast/forms/extrazoom/time-picker-value-change.html) (0 => 232916)


--- trunk/LayoutTests/fast/forms/watchos/time-picker-value-change.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/time-picker-value-change.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,38 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width">
+<head>
+<script src=""
+<script src=""
+<script>
+doneCount = 0;
+jsTestIsAsync = true;
+
+async function runTest() {
+    if (!window.testRunner) {
+        description(`This test requires WebKitTestRunner.`);
+        return;
+    }
+
+    time = document.querySelector("input");
+    time.addEventListener("change", checkDone);
+    time.addEventListener("blur", checkDone);
+
+    await UIHelper.activateAndWaitForInputSessionAt(75, 75);
+    UIHelper.waitForKeyboardToHide().then(checkDone)
+    UIHelper.setTimePickerValue(9, 41);
+}
+
+function checkDone() {
+    if (++doneCount < 3)
+        return;
+
+    shouldBe("time.value", "'09:41'");
+    finishJSTest();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<input type="time" value="04:01" style="width: 320px; height: 568px;"></input>
+</body>
+</html>

Copied: trunk/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt (from rev 232915, trunk/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1 @@
+previous size: (156, 175); current size: (320, 359)

Copied: trunk/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation.html (from rev 232915, trunk/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html) (0 => 232916)


--- trunk/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation.html	                        (rev 0)
+++ trunk/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,41 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<head>
+    <script src=""
+    <style>
+        body, html {
+            margin: 0;
+            width: 100%;
+            height: 100%;
+        }
+    </style>
+    <script>
+        async function runTest() {
+            if (!window.testRunner) {
+                description("Please use WebKitTestRunner to run this test.");
+                return;
+            }
+
+            const matches = location.search.match(/previousSize=([0-9]+),([0-9]+)/);
+            if (matches) {
+                document.write(`previous size: (${parseInt(matches[1])}, ${parseInt(matches[2])}); current size: (${innerWidth}, ${innerHeight})`);
+                testRunner.notifyDone();
+                return;
+            }
+
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+
+            const meta = document.createElement("meta");
+            meta.setAttribute("name", "disabled-adaptations");
+            meta.setAttribute("content", "watch");
+            document.head.appendChild(meta);
+            await UIHelper.ensureVisibleContentRectUpdate();
+
+            location.href += `?previousSize=${innerWidth},${innerHeight}`;
+        }
+    </script>
+</head>
+<body _onload_="runTest()"></body>
+</html>

Copied: trunk/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt (from rev 232915, trunk/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,22 @@
+PASS scaleAtDeviceWidthWithDefaultAdaptations is '0.488'
+PASS scaleAtDeviceWidthWithAdaptationDisabled is '1.000'
+PASS scaleAtDeviceWidthWithShrinkToFitDisabled is '0.488'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+1. Default viewport
+[width=150] (150, 168)
+[width=device-width] (320, 359)
+[width=600] (600, 673)
+
+2. extra zoom mode adaptations disabled
+[width=150; one,	watch   ,two] (150, 168)
+[width=device-width; watch, three, four, watch] (156, 175)
+[width=600; five, watch] (600, 673)
+
+3. shrink-to-fit disabled
+[width=150, shrink-to-fit=no; ] (150, 168)
+[width=device-width, shrink-to-fit=0; bogus, values] (320, 359)
+[width=600, shrink-to-fit=-0.5; ,,,] (600, 673)

Copied: trunk/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html (from rev 232915, trunk/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html) (0 => 232916)


--- trunk/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html	                        (rev 0)
+++ trunk/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,107 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport">
+<head>
+    <script src=""
+    <script src=""
+    <style>
+        body, html {
+            margin: 0;
+            width: 100%;
+            height: 100%;
+        }
+
+        #output {
+            width: 100%;
+            height: 100%;
+            overflow: scroll;
+        }
+    </style>
+    <script>
+        jsTestIsAsync = true;
+
+        function appendOutput(text) {
+            const span = document.createElement("span");
+            span.textContent = text;
+            output.appendChild(document.createElement("br"));
+            output.appendChild(span);
+        }
+
+        function logWindowDimensionsAfterSettingMetaContent(metaNameToContentMap) {
+            return new Promise(async resolve => {
+                for (const name in metaNameToContentMap)
+                    document.querySelector(`meta[name='${name}']`).content = metaNameToContentMap[name];
+
+                await UIHelper.ensureVisibleContentRectUpdate();
+                appendOutput(`[${Object.values(metaNameToContentMap).join("; ")}] (${innerWidth}, ${innerHeight})`);
+                resolve();
+            });
+        }
+
+        async function runTest() {
+            if (!window.testRunner) {
+                description("Please use WebKitTestRunner to run this test.");
+                return;
+            }
+
+            appendOutput();
+            appendOutput("1. Default viewport");
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=150"
+            });
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=device-width"
+            });
+            scaleAtDeviceWidthWithDefaultAdaptations = parseFloat(await UIHelper.zoomScale()).toFixed(3);
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=600"
+            });
+
+            const disabledAdaptationsMeta = document.createElement("meta");
+            disabledAdaptationsMeta.setAttribute("name", "disabled-adaptations");
+            document.head.appendChild(disabledAdaptationsMeta);
+
+            appendOutput();
+            appendOutput("2. extra zoom mode adaptations disabled");
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=150",
+                "disabled-adaptations" : `one,\twatch   ,two`
+            });
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=device-width",
+                "disabled-adaptations" : `watch, three, four, watch`
+            });
+            scaleAtDeviceWidthWithAdaptationDisabled = parseFloat(await UIHelper.zoomScale()).toFixed(3);
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=600",
+                "disabled-adaptations" : `five, watch`
+            });
+
+            appendOutput();
+            appendOutput("3. shrink-to-fit disabled");
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=150, shrink-to-fit=no",
+                "disabled-adaptations" : ""
+            });
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=device-width, shrink-to-fit=0",
+                "disabled-adaptations" : "bogus, values"
+            });
+            scaleAtDeviceWidthWithShrinkToFitDisabled = parseFloat(await UIHelper.zoomScale()).toFixed(3);
+            await logWindowDimensionsAfterSettingMetaContent({
+                "viewport" : "width=600, shrink-to-fit=-0.5",
+                "disabled-adaptations" : ",,,"
+            });
+
+            shouldBe("scaleAtDeviceWidthWithDefaultAdaptations", "'0.488'");
+            shouldBe("scaleAtDeviceWidthWithAdaptationDisabled", "'1.000'");
+            shouldBe("scaleAtDeviceWidthWithShrinkToFitDisabled", "'0.488'");
+
+            finishJSTest();
+        }
+    </script>
+</head>
+<body _onload_="runTest()">
+<pre id="output"></pre>
+</body>
+</html>

Copied: trunk/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt (from rev 232915, trunk/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing-expected.txt) (0 => 232916)


--- trunk/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,62 @@
+
+Before scrolling.
+PASS topRectBeforeScrolling.top is 0
+PASS topRectBeforeScrolling.left is 0
+PASS topRectBeforeScrolling.width is innerWidth
+PASS topRectBeforeScrolling.height is 50
+PASS bottomRectBeforeScrolling.top is >= innerHeight
+PASS bottomRectBeforeScrolling.left is 0
+PASS bottomRectBeforeScrolling.width is innerWidth
+PASS bottomRectBeforeScrolling.height is 50
+PASS layoutViewportBeforeScrolling.top is 0
+PASS layoutViewportBeforeScrolling.left is 0
+PASS layoutViewportBeforeScrolling.width is innerWidth
+PASS layoutViewportBeforeScrolling.height is >= innerHeight
+
+After scrolling 2500px down.
+PASS 0 is >= topRectAfterScrolling.bottom
+PASS topRectAfterScrolling.left is 0
+PASS topRectAfterScrolling.width is innerWidth
+PASS topRectAfterScrolling.height is 50
+PASS bottomRectAfterScrolling.bottom is innerHeight
+PASS bottomRectAfterScrolling.left is 0
+PASS bottomRectAfterScrolling.width is innerWidth
+PASS bottomRectAfterScrolling.height is 50
+PASS layoutViewportAfterScrolling.bottom is 2500 + innerHeight
+PASS layoutViewportAfterScrolling.left is 0
+PASS layoutViewportAfterScrolling.width is innerWidth
+PASS layoutViewportAfterScrolling.height is >= innerHeight
+
+After shortening document height to 100px.
+PASS topRectAfterShorteningBody.top is 0
+PASS topRectAfterShorteningBody.left is 0
+PASS topRectAfterShorteningBody.width is innerWidth
+PASS topRectAfterShorteningBody.height is 50
+PASS bottomRectAfterShorteningBody.bottom is innerHeight
+PASS bottomRectAfterShorteningBody.left is 0
+PASS bottomRectAfterShorteningBody.width is innerWidth
+PASS bottomRectAfterShorteningBody.height is 50
+PASS layoutViewportAfterShorteningBody.top is 0
+PASS layoutViewportAfterShorteningBody.left is 0
+PASS layoutViewportAfterShorteningBody.width is innerWidth
+PASS layoutViewportAfterShorteningBody.height is innerHeight
+
+After extending document height to 1.5x innerHeight.
+PASS topRectAfterExtendingBody.top is 0
+PASS topRectAfterExtendingBody.left is 0
+PASS topRectAfterExtendingBody.width is innerWidth
+PASS topRectAfterExtendingBody.height is 50
+PASS bottomRectAfterExtendingBody.top is >= innerHeight
+PASS bottomRectAfterExtendingBody.left is 0
+PASS bottomRectAfterExtendingBody.width is innerWidth
+PASS bottomRectAfterExtendingBody.height is 50
+PASS layoutViewportAfterExtendingBody.top is 0
+PASS layoutViewportAfterExtendingBody.left is 0
+PASS layoutViewportAfterExtendingBody.width is innerWidth
+PASS layoutViewportAfterExtendingBody.height is >= innerHeight
+PASS layoutViewportAfterExtendingBody.height < layoutViewportBeforeScrolling.height is true
+PASS finalDocumentHeight is layoutViewportAfterExtendingBody.height
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: trunk/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html (from rev 232915, trunk/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html) (0 => 232916)


--- trunk/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html	                        (rev 0)
+++ trunk/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html	2018-06-17 18:37:09 UTC (rev 232916)
@@ -0,0 +1,137 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width">
+<head>
+    <script src=""
+    <script src=""
+    <style>
+        body, html {
+            margin: 0;
+            width: 100%;
+        }
+
+        body {
+            height: 5000px;
+        }
+
+        .fixed {
+            width: 100%;
+            height: 50px;
+            background-color: green;
+            position: fixed;
+            left: 0;
+        }
+
+        #top {
+            top: 0;
+            background-color: green;
+        }
+
+        #bottom {
+            bottom: 0;
+            background-color: blue;
+        }
+    </style>
+    <script>
+        async function runTest() {
+            jsTestIsAsync = true;
+
+            await UIHelper.ensureVisibleContentRectUpdate();
+
+            topRectBeforeScrolling = document.getElementById("top").getBoundingClientRect();
+            bottomRectBeforeScrolling = document.getElementById("bottom").getBoundingClientRect();
+            layoutViewportBeforeScrolling = internals.layoutViewportRect();
+
+            const verticalScrollAmount = 2500;
+            scrollBy(0, verticalScrollAmount);
+
+            topRectAfterScrolling = document.getElementById("top").getBoundingClientRect();
+            bottomRectAfterScrolling = document.getElementById("bottom").getBoundingClientRect();
+            layoutViewportAfterScrolling = internals.layoutViewportRect();
+
+            document.body.style.height = "100px";
+            await UIHelper.ensureVisibleContentRectUpdate();
+
+            topRectAfterShorteningBody = document.getElementById("top").getBoundingClientRect();
+            bottomRectAfterShorteningBody = document.getElementById("bottom").getBoundingClientRect();
+            layoutViewportAfterShorteningBody = internals.layoutViewportRect();
+
+            finalDocumentHeight = Math.round(innerHeight * 1.5);
+            document.body.style.height = `${finalDocumentHeight}px`;
+            await UIHelper.ensureVisibleContentRectUpdate();
+
+            topRectAfterExtendingBody = document.getElementById("top").getBoundingClientRect();
+            bottomRectAfterExtendingBody = document.getElementById("bottom").getBoundingClientRect();
+            layoutViewportAfterExtendingBody = internals.layoutViewportRect();
+
+            debug("\nBefore scrolling.")
+            shouldBe("topRectBeforeScrolling.top", "0");
+            shouldBe("topRectBeforeScrolling.left", "0");
+            shouldBe("topRectBeforeScrolling.width", "innerWidth");
+            shouldBe("topRectBeforeScrolling.height", "50");
+            shouldBeGreaterThanOrEqual("bottomRectBeforeScrolling.top", "innerHeight");
+            shouldBe("bottomRectBeforeScrolling.left", "0");
+            shouldBe("bottomRectBeforeScrolling.width", "innerWidth");
+            shouldBe("bottomRectBeforeScrolling.height", "50");
+            shouldBe("layoutViewportBeforeScrolling.top", "0");
+            shouldBe("layoutViewportBeforeScrolling.left", "0");
+            shouldBe("layoutViewportBeforeScrolling.width", "innerWidth");
+            shouldBeGreaterThanOrEqual("layoutViewportBeforeScrolling.height", "innerHeight");
+
+            debug(`\nAfter scrolling ${verticalScrollAmount}px down.`);
+            shouldBeGreaterThanOrEqual("0", "topRectAfterScrolling.bottom");
+            shouldBe("topRectAfterScrolling.left", "0");
+            shouldBe("topRectAfterScrolling.width", "innerWidth");
+            shouldBe("topRectAfterScrolling.height", "50");
+            shouldBe("bottomRectAfterScrolling.bottom", "innerHeight");
+            shouldBe("bottomRectAfterScrolling.left", "0");
+            shouldBe("bottomRectAfterScrolling.width", "innerWidth");
+            shouldBe("bottomRectAfterScrolling.height", "50");
+            shouldBe("layoutViewportAfterScrolling.bottom", `${verticalScrollAmount} + innerHeight`);
+            shouldBe("layoutViewportAfterScrolling.left", "0");
+            shouldBe("layoutViewportAfterScrolling.width", "innerWidth");
+            shouldBeGreaterThanOrEqual("layoutViewportAfterScrolling.height", "innerHeight");
+
+            debug("\nAfter shortening document height to 100px.");
+            shouldBe("topRectAfterShorteningBody.top", "0");
+            shouldBe("topRectAfterShorteningBody.left", "0");
+            shouldBe("topRectAfterShorteningBody.width", "innerWidth");
+            shouldBe("topRectAfterShorteningBody.height", "50");
+            shouldBe("bottomRectAfterShorteningBody.bottom", "innerHeight");
+            shouldBe("bottomRectAfterShorteningBody.left", "0");
+            shouldBe("bottomRectAfterShorteningBody.width", "innerWidth");
+            shouldBe("bottomRectAfterShorteningBody.height", "50");
+            shouldBe("layoutViewportAfterShorteningBody.top", "0");
+            shouldBe("layoutViewportAfterShorteningBody.left", "0");
+            shouldBe("layoutViewportAfterShorteningBody.width", "innerWidth");
+            shouldBe("layoutViewportAfterShorteningBody.height", "innerHeight");
+
+            debug("\nAfter extending document height to 1.5x innerHeight.")
+            shouldBe("topRectAfterExtendingBody.top", "0");
+            shouldBe("topRectAfterExtendingBody.left", "0");
+            shouldBe("topRectAfterExtendingBody.width", "innerWidth");
+            shouldBe("topRectAfterExtendingBody.height", "50");
+            shouldBeGreaterThanOrEqual("bottomRectAfterExtendingBody.top", "innerHeight");
+            shouldBe("bottomRectAfterExtendingBody.left", "0");
+            shouldBe("bottomRectAfterExtendingBody.width", "innerWidth");
+            shouldBe("bottomRectAfterExtendingBody.height", "50");
+            shouldBe("layoutViewportAfterExtendingBody.top", "0");
+            shouldBe("layoutViewportAfterExtendingBody.left", "0");
+            shouldBe("layoutViewportAfterExtendingBody.width", "innerWidth");
+            shouldBeGreaterThanOrEqual("layoutViewportAfterExtendingBody.height", "innerHeight");
+
+            // The layout viewport should not be expanded past document bounds. Before scrolling, the document height
+            // was much taller than the window height, but afterwards, the document height is short enough that we
+            // should clamp the extended layout viewport to its bounds.
+            shouldBeTrue("layoutViewportAfterExtendingBody.height < layoutViewportBeforeScrolling.height");
+            shouldBe("finalDocumentHeight", "layoutViewportAfterExtendingBody.height");
+
+            finishJSTest();
+        }
+    </script>
+</head>
+<body _onload_="runTest()">
+    <div class="fixed" id="top"></div>
+    <div class="fixed" id="bottom"></div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (232915 => 232916)


--- trunk/Source/WebCore/ChangeLog	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/ChangeLog	2018-06-17 18:37:09 UTC (rev 232916)
@@ -1,3 +1,27 @@
+2018-06-17  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 3)
+        https://bugs.webkit.org/show_bug.cgi?id=186442
+        <rdar://problem/40879364>
+
+        Reviewed by Darin Adler.
+
+        Rename references to "Extra zoom mode". No change in behavior.
+
+        * page/DisabledAdaptations.cpp:
+        (WebCore::watchAdaptationName):
+        (WebCore::extraZoomModeAdaptationName): Deleted.
+        * page/DisabledAdaptations.h:
+        * page/ViewportConfiguration.cpp:
+        (WebCore::needsUpdateAfterChangingDisabledAdaptations):
+        (WebCore::ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit const):
+        * page/WindowFeatures.cpp:
+        (WebCore::parseDisabledAdaptations):
+        * testing/Internals.cpp:
+        (WebCore::Internals::extraZoomModeAdaptationName const): Deleted.
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2018-06-17  Youenn Fablet  <you...@apple.com>
 
         Rename Document::hasHadActiveMediaStreamTrack to Document::hasHadCaptureMediaStreamTrack

Modified: trunk/Source/WebCore/page/DisabledAdaptations.cpp (232915 => 232916)


--- trunk/Source/WebCore/page/DisabledAdaptations.cpp	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/page/DisabledAdaptations.cpp	2018-06-17 18:37:09 UTC (rev 232916)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-String extraZoomModeAdaptationName()
+String watchAdaptationName()
 {
     return ASCIILiteral("watch");
 }

Modified: trunk/Source/WebCore/page/DisabledAdaptations.h (232915 => 232916)


--- trunk/Source/WebCore/page/DisabledAdaptations.h	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/page/DisabledAdaptations.h	2018-06-17 18:37:09 UTC (rev 232916)
@@ -29,10 +29,10 @@
 
 namespace WebCore {
 
-WEBCORE_EXPORT String extraZoomModeAdaptationName();
+WEBCORE_EXPORT String watchAdaptationName();
 
 enum class DisabledAdaptations {
-    ExtraZoomMode = 1 << 0,
+    Watch = 1 << 0,
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/ViewportConfiguration.cpp (232915 => 232916)


--- trunk/Source/WebCore/page/ViewportConfiguration.cpp	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/page/ViewportConfiguration.cpp	2018-06-17 18:37:09 UTC (rev 232916)
@@ -69,7 +69,7 @@
         return false;
 
 #if PLATFORM(WATCHOS)
-    if (oldDisabledAdaptations.contains(DisabledAdaptations::ExtraZoomMode) != newDisabledAdaptations.contains(DisabledAdaptations::ExtraZoomMode))
+    if (oldDisabledAdaptations.contains(DisabledAdaptations::Watch) != newDisabledAdaptations.contains(DisabledAdaptations::Watch))
         return true;
 #endif
 
@@ -169,7 +169,7 @@
 
 bool ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit() const
 {
-    if (m_disabledAdaptations.contains(DisabledAdaptations::ExtraZoomMode))
+    if (m_disabledAdaptations.contains(DisabledAdaptations::Watch))
         return false;
 
     auto viewWidth = m_viewLayoutSize.width();

Modified: trunk/Source/WebCore/page/WindowFeatures.cpp (232915 => 232916)


--- trunk/Source/WebCore/page/WindowFeatures.cpp	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/page/WindowFeatures.cpp	2018-06-17 18:37:09 UTC (rev 232916)
@@ -121,8 +121,8 @@
     disabledAdaptationsString.split(',', false, disabledAdaptationNames);
     for (auto& name : disabledAdaptationNames) {
         auto normalizedName = name.stripWhiteSpace().convertToASCIILowercase();
-        if (normalizedName == extraZoomModeAdaptationName())
-            disabledAdaptations |= DisabledAdaptations::ExtraZoomMode;
+        if (normalizedName == watchAdaptationName())
+            disabledAdaptations |= DisabledAdaptations::Watch;
     }
     return disabledAdaptations;
 }

Modified: trunk/Source/WebCore/testing/Internals.cpp (232915 => 232916)


--- trunk/Source/WebCore/testing/Internals.cpp	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/testing/Internals.cpp	2018-06-17 18:37:09 UTC (rev 232916)
@@ -4551,11 +4551,6 @@
 #endif
 }
 
-String Internals::extraZoomModeAdaptationName() const
-{
-    return WebCore::extraZoomModeAdaptationName();
-}
-
 bool Internals::usingAppleInternalSDK() const
 {
 #if USE(APPLE_INTERNAL_SDK)

Modified: trunk/Source/WebCore/testing/Internals.h (232915 => 232916)


--- trunk/Source/WebCore/testing/Internals.h	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/testing/Internals.h	2018-06-17 18:37:09 UTC (rev 232916)
@@ -679,8 +679,6 @@
     bool isSystemPreviewLink(Element&) const;
     bool isSystemPreviewImage(Element&) const;
 
-    String extraZoomModeAdaptationName() const;
-
     bool usingAppleInternalSDK() const;
 
     struct NowPlayingState {

Modified: trunk/Source/WebCore/testing/Internals.idl (232915 => 232916)


--- trunk/Source/WebCore/testing/Internals.idl	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebCore/testing/Internals.idl	2018-06-17 18:37:09 UTC (rev 232916)
@@ -618,8 +618,6 @@
     boolean isSystemPreviewLink(Element element);
     boolean isSystemPreviewImage(Element element);
 
-    DOMString extraZoomModeAdaptationName();
-
     boolean usingAppleInternalSDK();
 
     [Conditional=VIDEO, MayThrowException] readonly attribute NowPlayingState nowPlayingState;

Modified: trunk/Source/WebKit/ChangeLog (232915 => 232916)


--- trunk/Source/WebKit/ChangeLog	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebKit/ChangeLog	2018-06-17 18:37:09 UTC (rev 232916)
@@ -1,3 +1,15 @@
+2018-06-17  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 3)
+        https://bugs.webkit.org/show_bug.cgi?id=186442
+        <rdar://problem/40879364>
+
+        Reviewed by Darin Adler.
+
+        Rename a category referencing "Extra zoom mode".
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+
 2018-06-12  Darin Adler  <da...@apple.com>
 
         [Cocoa] Make some RetainPtr refinements to get more ready for ARC

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (232915 => 232916)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-06-17 18:03:01 UTC (rev 232915)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-06-17 18:37:09 UTC (rev 232916)
@@ -129,7 +129,7 @@
 
 #if PLATFORM(WATCHOS)
 
-@interface WKContentView (ExtraZoomMode) <WKFocusedFormControlViewDelegate, WKSelectMenuListViewControllerDelegate, WKTextInputListViewControllerDelegate>
+@interface WKContentView (WatchSupport) <WKFocusedFormControlViewDelegate, WKSelectMenuListViewControllerDelegate, WKTextInputListViewControllerDelegate>
 @end
 
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to