WebKit Bugzilla
Attachment 342908 Details for
Bug 186442
: [WebKit on watchOS] Upstream watchOS source additions to OpenSource
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Rename more references to extra zoom
bug-186442-20180616230047.patch (text/plain), 93.00 KB, created by
Wenson Hsieh
on 2018-06-16 23:00:48 PDT
(
hide
)
Description:
Rename more references to extra zoom
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-06-16 23:00:48 PDT
Size:
93.00 KB
patch
obsolete
>Subversion Revision: 232866 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ab0a735457f4f250926d91fdd1bf62bf2215b8e4..ab162fbc425631bf138ddca10a4e9a57a985c126 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,27 @@ >+2018-06-16 Wenson Hsieh <wenson_hsieh@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 NOBODY (OOPS!). >+ >+ 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-14 Youenn Fablet <youenn@apple.com> > > Make NetworkProcess get cache storage parameters at creation of the CacheStorage engine >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a8877685739076ee70fdf83555a26adcbb8ab07e..d5c51803ffc39f0ad8b9aeb54e9b6ccab1a7e6ed 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-16 Wenson Hsieh <wenson_hsieh@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 NOBODY (OOPS!). >+ >+ Rename a category referencing "Extra zoom mode". >+ >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ > 2018-06-14 Youenn Fablet <youenn@apple.com> > > Make NetworkProcess get cache storage parameters at creation of the CacheStorage engine >diff --git a/Source/WebCore/page/DisabledAdaptations.cpp b/Source/WebCore/page/DisabledAdaptations.cpp >index 71bd522a1f5ef4ba372c7c59fda49b97df5fd364..a65b0092005dea5f1578328a1853ee39200ef33b 100644 >--- a/Source/WebCore/page/DisabledAdaptations.cpp >+++ b/Source/WebCore/page/DisabledAdaptations.cpp >@@ -30,7 +30,7 @@ > > namespace WebCore { > >-String extraZoomModeAdaptationName() >+String watchAdaptationName() > { > return ASCIILiteral("watch"); > } >diff --git a/Source/WebCore/page/DisabledAdaptations.h b/Source/WebCore/page/DisabledAdaptations.h >index 27ce06bb5e45669b4697787d042abad4c253c156..18e53f5768bfa88015bf708e6f9d807cd1b37f56 100644 >--- a/Source/WebCore/page/DisabledAdaptations.h >+++ b/Source/WebCore/page/DisabledAdaptations.h >@@ -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 >diff --git a/Source/WebCore/page/ViewportConfiguration.cpp b/Source/WebCore/page/ViewportConfiguration.cpp >index acf61cb7c27c3e243e111851e2052061b294a778..1c4502adbe79820f4b6278392938ae3c4c04cd90 100644 >--- a/Source/WebCore/page/ViewportConfiguration.cpp >+++ b/Source/WebCore/page/ViewportConfiguration.cpp >@@ -69,7 +69,7 @@ static bool needsUpdateAfterChangingDisabledAdaptations(const OptionSet<Disabled > 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 @@ IntSize ViewportConfiguration::layoutSize() const > > bool ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit() const > { >- if (m_disabledAdaptations.contains(DisabledAdaptations::ExtraZoomMode)) >+ if (m_disabledAdaptations.contains(DisabledAdaptations::Watch)) > return false; > > auto viewWidth = m_viewLayoutSize.width(); >diff --git a/Source/WebCore/page/WindowFeatures.cpp b/Source/WebCore/page/WindowFeatures.cpp >index 11d0efa09c6e00ad31bbedc9ecaf60bea93f0322..c3fc993fd225b8c67f6df9140ee70c6592a91093 100644 >--- a/Source/WebCore/page/WindowFeatures.cpp >+++ b/Source/WebCore/page/WindowFeatures.cpp >@@ -121,8 +121,8 @@ OptionSet<DisabledAdaptations> parseDisabledAdaptations(const String& disabledAd > 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; > } >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 58261eda23db6bd60e15be376cd1b0a295a454bf..94fd8e3500f5c42797d8bdc7bec41784097f4908 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -4551,11 +4551,6 @@ bool Internals::isSystemPreviewImage(Element& element) const > #endif > } > >-String Internals::extraZoomModeAdaptationName() const >-{ >- return WebCore::extraZoomModeAdaptationName(); >-} >- > bool Internals::usingAppleInternalSDK() const > { > #if USE(APPLE_INTERNAL_SDK) >diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h >index 93a7463464e0e99dceb801ce55ffd10d7e8a7a6e..c977ea7caa78af894d26565077f14b4f18530cd1 100644 >--- a/Source/WebCore/testing/Internals.h >+++ b/Source/WebCore/testing/Internals.h >@@ -679,8 +679,6 @@ public: > bool isSystemPreviewLink(Element&) const; > bool isSystemPreviewImage(Element&) const; > >- String extraZoomModeAdaptationName() const; >- > bool usingAppleInternalSDK() const; > > struct NowPlayingState { >diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl >index 4073a04820df567b9f63dcfd2cfe24ece958ceac..1f359ccec87481816834401a6352909437345ba9 100644 >--- a/Source/WebCore/testing/Internals.idl >+++ b/Source/WebCore/testing/Internals.idl >@@ -618,8 +618,6 @@ enum EventThrottlingBehavior { > boolean isSystemPreviewLink(Element element); > boolean isSystemPreviewImage(Element element); > >- DOMString extraZoomModeAdaptationName(); >- > boolean usingAppleInternalSDK(); > > [Conditional=VIDEO, MayThrowException] readonly attribute NowPlayingState nowPlayingState; >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 049006f98858c222e9506b260a8f2a4f14bbe2d0..9246146b4df86356f21cf2dd6acc334896137342 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -129,7 +129,7 @@ @end > > #if PLATFORM(WATCHOS) > >-@interface WKContentView (ExtraZoomMode) <WKFocusedFormControlViewDelegate, WKSelectMenuListViewControllerDelegate, WKTextInputListViewControllerDelegate> >+@interface WKContentView (WatchSupport) <WKFocusedFormControlViewDelegate, WKSelectMenuListViewControllerDelegate, WKTextInputListViewControllerDelegate> > @end > > #endif >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e582558f8ebf747a8252c16e1bbb6ace302b9d49..bd54dbd57e7d1cd132b4b0fff8b5fb8f60d331b8 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,39 @@ >+2018-06-16 Wenson Hsieh <wenson_hsieh@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 NOBODY (OOPS!). >+ >+ 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-14 Carlos Alberto Lopez Perez <clopez@igalia.com> > > [GTK] Mark tests that are failing on the EWS test queue (v2) >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 5af77d935b832fffe0845b76dbbfc512c9c86b67..f6bf992d43d5e3a05ab794fc3f696178f17a110f 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -18,11 +18,11 @@ editing/caret/ios [ Skip ] > 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/forms/ios [ Skip ] > 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 ] >diff --git a/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit-expected.txt b/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit-expected.txt >deleted file mode 100644 >index 7fea310927edcd3496d85dafe925ce2462bfe0fe..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit-expected.txt >+++ /dev/null >@@ -1,14 +0,0 @@ >-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 >- >diff --git a/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html b/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html >deleted file mode 100644 >index 3f308a518f33dbc7a7adf8ea4b5a93491df9c84a..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html >+++ /dev/null >@@ -1,53 +0,0 @@ >-<!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="../../../resources/ui-helper.js"></script> >- <script src="../../../resources/js-test.js"></script> >- <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 >diff --git a/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit-expected.txt b/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7fea310927edcd3496d85dafe925ce2462bfe0fe >--- /dev/null >+++ b/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit-expected.txt >@@ -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 >+ >diff --git a/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit.html b/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3f308a518f33dbc7a7adf8ea4b5a93491df9c84a >--- /dev/null >+++ b/LayoutTests/fast/css/watchos/viewport-units-shrink-to-fit.html >@@ -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="../../../resources/ui-helper.js"></script> >+ <script src="../../../resources/js-test.js"></script> >+ <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 >diff --git a/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions-expected.txt b/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions-expected.txt >deleted file mode 100644 >index ad6a59dff9b806080b2e4fc9a858d92399500633..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions-expected.txt >+++ /dev/null >@@ -1,6 +0,0 @@ >-PASS screen.width is 320 >-PASS screen.height is 568 >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions.html b/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions.html >deleted file mode 100644 >index ad0a870db9c8a60fd910d8797e3c10a06a539ca5..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/dom/Window/extrazoom/window-get-real-screen-dimensions.html >+++ /dev/null >@@ -1,11 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<script src="../../../../resources/js-test.js"></script> >-</head> >-<body></body> >-<script> >-shouldBe("screen.width", "320"); >-shouldBe("screen.height", "568"); >-</script> >-</html> >\ No newline at end of file >diff --git a/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt b/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ad6a59dff9b806080b2e4fc9a858d92399500633 >--- /dev/null >+++ b/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions-expected.txt >@@ -0,0 +1,6 @@ >+PASS screen.width is 320 >+PASS screen.height is 568 >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions.html b/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ad0a870db9c8a60fd910d8797e3c10a06a539ca5 >--- /dev/null >+++ b/LayoutTests/fast/dom/Window/watchos/window-get-real-screen-dimensions.html >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../../../resources/js-test.js"></script> >+</head> >+<body></body> >+<script> >+shouldBe("screen.width", "320"); >+shouldBe("screen.height", "568"); >+</script> >+</html> >\ No newline at end of file >diff --git a/LayoutTests/fast/events/extrazoom/change-focus-during-change-event-expected.txt b/LayoutTests/fast/events/extrazoom/change-focus-during-change-event-expected.txt >deleted file mode 100644 >index 2c81fdf17fbef9728f2fd5d27994c4cda1818a88..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/events/extrazoom/change-focus-during-change-event-expected.txt >+++ /dev/null >@@ -1,10 +0,0 @@ >-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 >- >diff --git a/LayoutTests/fast/events/extrazoom/change-focus-during-change-event.html b/LayoutTests/fast/events/extrazoom/change-focus-during-change-event.html >deleted file mode 100644 >index 8eb820ff2439963c3a0736beff2db36140d60dce..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/events/extrazoom/change-focus-during-change-event.html >+++ /dev/null >@@ -1,60 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport" content="width=device-width"> >-<head> >- <script src="../../../resources/js-test.js"></script> >- <script src="../../../resources/ui-helper.js"></script> >- <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> >diff --git a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text-expected.txt b/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text-expected.txt >deleted file mode 100644 >index a2b242d5f5839530d8754d653233fcc6ee20da0a..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text-expected.txt >+++ /dev/null >@@ -1,5 +0,0 @@ >-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. >diff --git a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text.html b/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text.html >deleted file mode 100644 >index 0e17b86db794225ae7adeb2ce85fe51287f484dc..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-on-full-width-text.html >+++ /dev/null >@@ -1,25 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<script src="../../../resources/js-test.js"></script> >-<script src="../../../resources/basic-gestures.js"></script> >-<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> >diff --git a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text-expected.txt b/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text-expected.txt >deleted file mode 100644 >index 6d16bd5fb00f2fe1cf81cb6d685e193afc7615aa..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text-expected.txt >+++ /dev/null >@@ -1,4 +0,0 @@ >-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. >diff --git a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text.html b/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text.html >deleted file mode 100644 >index 260df70dcf7c89b2bdc7691406c59cbcf0ddbf7e..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/events/extrazoom/double-tap-to-zoom-with-large-text.html >+++ /dev/null >@@ -1,17 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<script src="../../../resources/js-test.js"></script> >-<script src="../../../resources/basic-gestures.js"></script> >-<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> >diff --git a/LayoutTests/fast/events/watchos/change-focus-during-change-event-expected.txt b/LayoutTests/fast/events/watchos/change-focus-during-change-event-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..2c81fdf17fbef9728f2fd5d27994c4cda1818a88 >--- /dev/null >+++ b/LayoutTests/fast/events/watchos/change-focus-during-change-event-expected.txt >@@ -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 >+ >diff --git a/LayoutTests/fast/events/watchos/change-focus-during-change-event.html b/LayoutTests/fast/events/watchos/change-focus-during-change-event.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8eb820ff2439963c3a0736beff2db36140d60dce >--- /dev/null >+++ b/LayoutTests/fast/events/watchos/change-focus-during-change-event.html >@@ -0,0 +1,60 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport" content="width=device-width"> >+<head> >+ <script src="../../../resources/js-test.js"></script> >+ <script src="../../../resources/ui-helper.js"></script> >+ <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> >diff --git a/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt b/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..a2b242d5f5839530d8754d653233fcc6ee20da0a >--- /dev/null >+++ b/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text-expected.txt >@@ -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. >diff --git a/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text.html b/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0e17b86db794225ae7adeb2ce85fe51287f484dc >--- /dev/null >+++ b/LayoutTests/fast/events/watchos/double-tap-to-zoom-on-full-width-text.html >@@ -0,0 +1,25 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/basic-gestures.js"></script> >+<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> >diff --git a/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt b/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..6d16bd5fb00f2fe1cf81cb6d685e193afc7615aa >--- /dev/null >+++ b/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text-expected.txt >@@ -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. >diff --git a/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text.html b/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text.html >new file mode 100644 >index 0000000000000000000000000000000000000000..260df70dcf7c89b2bdc7691406c59cbcf0ddbf7e >--- /dev/null >+++ b/LayoutTests/fast/events/watchos/double-tap-to-zoom-with-large-text.html >@@ -0,0 +1,17 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/basic-gestures.js"></script> >+<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> >diff --git a/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field-expected.txt b/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field-expected.txt >deleted file mode 100644 >index 81740e43e847790c60b7afcaa312ac72143aabf7..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field-expected.txt >+++ /dev/null >@@ -1,12 +0,0 @@ >-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 >- >diff --git a/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field.html b/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field.html >deleted file mode 100644 >index a00a9c06cb6347a386ff06fcffb2ec4f436b4d42..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/delete-content-in-text-field.html >+++ /dev/null >@@ -1,60 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport" content="width=device-width"> >-<head> >-<script src="../../../resources/js-test.js"></script> >-<script src="../../../resources/ui-helper.js"></script> >-<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> >diff --git a/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle-expected.txt b/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle-expected.txt >deleted file mode 100644 >index 1b86503c019d8dffebf060f6d6d4171932df37bb..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle-expected.txt >+++ /dev/null >@@ -1,7 +0,0 @@ >-TextFieldDidBeginEditing ('') >-TextDidChangeInTextField ('Hello world') >-TextFieldDidEndEditing ('Hello world') >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle.html b/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle.html >deleted file mode 100644 >index 122ee0e997348c9a80ddf4bd92a0bdc10f61fba7..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/edit-text-field-calls-injected-bundle.html >+++ /dev/null >@@ -1,37 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport" content="width=device-width"> >-<head> >-<script src="../../../resources/js-test.js"></script> >-<script src="../../../resources/ui-helper.js"></script> >-<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> >diff --git a/LayoutTests/fast/forms/extrazoom/form-control-label-text-expected.txt b/LayoutTests/fast/forms/extrazoom/form-control-label-text-expected.txt >deleted file mode 100644 >index 25240d3db966f287370badc86cb9ea5bfaa31474..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/form-control-label-text-expected.txt >+++ /dev/null >@@ -1,9 +0,0 @@ >-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" >diff --git a/LayoutTests/fast/forms/extrazoom/form-control-label-text.html b/LayoutTests/fast/forms/extrazoom/form-control-label-text.html >deleted file mode 100644 >index 808a32f9ad25ea92cd939f5957eeee188be78398..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/form-control-label-text.html >+++ /dev/null >@@ -1,54 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport" content="width=device-width"> >-<head> >-<script src="../../../resources/js-test.js"></script> >-<script src="../../../resources/ui-helper.js"></script> >-<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 >diff --git a/LayoutTests/fast/forms/extrazoom/time-picker-value-change-expected.txt b/LayoutTests/fast/forms/extrazoom/time-picker-value-change-expected.txt >deleted file mode 100644 >index abc14cda0bd935b0b9be0130817a8c429bdae2dc..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/time-picker-value-change-expected.txt >+++ /dev/null >@@ -1,5 +0,0 @@ >-PASS time.value is '09:41' >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/fast/forms/extrazoom/time-picker-value-change.html b/LayoutTests/fast/forms/extrazoom/time-picker-value-change.html >deleted file mode 100644 >index 3ffe4e90ebf88e646c46da57c8d74b299e1d3cb1..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/extrazoom/time-picker-value-change.html >+++ /dev/null >@@ -1,38 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport" content="width=device-width"> >-<head> >-<script src="../../../resources/js-test.js"></script> >-<script src="../../../resources/ui-helper.js"></script> >-<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> >diff --git a/LayoutTests/fast/forms/watchos/delete-content-in-text-field-expected.txt b/LayoutTests/fast/forms/watchos/delete-content-in-text-field-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..81740e43e847790c60b7afcaa312ac72143aabf7 >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/delete-content-in-text-field-expected.txt >@@ -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 >+ >diff --git a/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html b/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html >new file mode 100644 >index 0000000000000000000000000000000000000000..a00a9c06cb6347a386ff06fcffb2ec4f436b4d42 >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html >@@ -0,0 +1,60 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport" content="width=device-width"> >+<head> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+<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> >diff --git a/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt b/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..1b86503c019d8dffebf060f6d6d4171932df37bb >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle-expected.txt >@@ -0,0 +1,7 @@ >+TextFieldDidBeginEditing ('') >+TextDidChangeInTextField ('Hello world') >+TextFieldDidEndEditing ('Hello world') >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html b/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html >new file mode 100644 >index 0000000000000000000000000000000000000000..122ee0e997348c9a80ddf4bd92a0bdc10f61fba7 >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html >@@ -0,0 +1,37 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport" content="width=device-width"> >+<head> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+<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> >diff --git a/LayoutTests/fast/forms/watchos/form-control-label-text-expected.txt b/LayoutTests/fast/forms/watchos/form-control-label-text-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..25240d3db966f287370badc86cb9ea5bfaa31474 >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/form-control-label-text-expected.txt >@@ -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" >diff --git a/LayoutTests/fast/forms/watchos/form-control-label-text.html b/LayoutTests/fast/forms/watchos/form-control-label-text.html >new file mode 100644 >index 0000000000000000000000000000000000000000..808a32f9ad25ea92cd939f5957eeee188be78398 >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/form-control-label-text.html >@@ -0,0 +1,54 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport" content="width=device-width"> >+<head> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+<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 >diff --git a/LayoutTests/fast/forms/watchos/time-picker-value-change-expected.txt b/LayoutTests/fast/forms/watchos/time-picker-value-change-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..abc14cda0bd935b0b9be0130817a8c429bdae2dc >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/time-picker-value-change-expected.txt >@@ -0,0 +1,5 @@ >+PASS time.value is '09:41' >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/watchos/time-picker-value-change.html b/LayoutTests/fast/forms/watchos/time-picker-value-change.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3ffe4e90ebf88e646c46da57c8d74b299e1d3cb1 >--- /dev/null >+++ b/LayoutTests/fast/forms/watchos/time-picker-value-change.html >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport" content="width=device-width"> >+<head> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+<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> >diff --git a/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation-expected.txt b/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation-expected.txt >deleted file mode 100644 >index 7fba6dc6417cc67f2054976e0c43dd5caa3073f3..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation-expected.txt >+++ /dev/null >@@ -1 +0,0 @@ >-previous size: (156, 175); current size: (320, 359) >diff --git a/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html b/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html >deleted file mode 100644 >index 5845eba03ab2f2c69ed65308bedfb23ebf486fae..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html >+++ /dev/null >@@ -1,41 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport" content="width=device-width, initial-scale=1"> >-<head> >- <script src="../../../resources/ui-helper.js"></script> >- <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", internals.extraZoomModeAdaptationName()); >- document.head.appendChild(meta); >- await UIHelper.ensureVisibleContentRectUpdate(); >- >- location.href += `?previousSize=${innerWidth},${innerHeight}`; >- } >- </script> >-</head> >-<body onload="runTest()"></body> >-</html> >diff --git a/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations-expected.txt b/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations-expected.txt >deleted file mode 100644 >index 21eb6116c49a24fae6b8cef5086ad8f3bbc3a912..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations-expected.txt >+++ /dev/null >@@ -1,22 +0,0 @@ >-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) >diff --git a/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html b/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html >deleted file mode 100644 >index 54e29a2d49f1708132daa9a815bb053c1350d0a0..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html >+++ /dev/null >@@ -1,107 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport"> >-<head> >- <script src="../../../resources/js-test.js"></script> >- <script src="../../../resources/ui-helper.js"></script> >- <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,\t${internals.extraZoomModeAdaptationName()} ,two` >- }); >- await logWindowDimensionsAfterSettingMetaContent({ >- "viewport" : "width=device-width", >- "disabled-adaptations" : `${internals.extraZoomModeAdaptationName()}, three, four, ${internals.extraZoomModeAdaptationName()}` >- }); >- scaleAtDeviceWidthWithAdaptationDisabled = parseFloat(await UIHelper.zoomScale()).toFixed(3); >- await logWindowDimensionsAfterSettingMetaContent({ >- "viewport" : "width=600", >- "disabled-adaptations" : `five, ${internals.extraZoomModeAdaptationName()}` >- }); >- >- 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> >diff --git a/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt b/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7fba6dc6417cc67f2054976e0c43dd5caa3073f3 >--- /dev/null >+++ b/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt >@@ -0,0 +1 @@ >+previous size: (156, 175); current size: (320, 359) >diff --git a/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation.html b/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation.html >new file mode 100644 >index 0000000000000000000000000000000000000000..bc41a22341c0de462c1c0683de55c33836f22285 >--- /dev/null >+++ b/LayoutTests/fast/viewport/watchos/viewport-adaptations-after-navigation.html >@@ -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="../../../resources/ui-helper.js"></script> >+ <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> >diff --git a/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt b/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..21eb6116c49a24fae6b8cef5086ad8f3bbc3a912 >--- /dev/null >+++ b/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations-expected.txt >@@ -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) >diff --git a/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html b/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2eb21b65bb28f780ecadddc7aa4fe8f8e44b27e4 >--- /dev/null >+++ b/LayoutTests/fast/viewport/watchos/viewport-disable-extra-zoom-adaptations.html >@@ -0,0 +1,107 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport"> >+<head> >+ <script src="../../../resources/js-test.js"></script> >+ <script src="../../../resources/ui-helper.js"></script> >+ <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> >diff --git a/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing-expected.txt b/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing-expected.txt >deleted file mode 100644 >index 312595729666983c7c47c1f2172048edded4af09..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing-expected.txt >+++ /dev/null >@@ -1,62 +0,0 @@ >- >-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 >- >diff --git a/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html b/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html >deleted file mode 100644 >index 6b57555e916cb75750f259f244ac689884d01eb7..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html >+++ /dev/null >@@ -1,137 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<html> >-<meta name="viewport" content="width=device-width"> >-<head> >- <script src="../../../resources/js-test.js"></script> >- <script src="../../../resources/ui-helper.js"></script> >- <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> >diff --git a/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt b/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..312595729666983c7c47c1f2172048edded4af09 >--- /dev/null >+++ b/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing-expected.txt >@@ -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 >+ >diff --git a/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html b/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6b57555e916cb75750f259f244ac689884d01eb7 >--- /dev/null >+++ b/LayoutTests/fast/visual-viewport/watchos/layout-viewport-after-scrolling-and-resizing.html >@@ -0,0 +1,137 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport" content="width=device-width"> >+<head> >+ <script src="../../../resources/js-test.js"></script> >+ <script src="../../../resources/ui-helper.js"></script> >+ <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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186442
:
342317
|
342355
|
342357
|
342570
|
342581
| 342908