Title: [293903] trunk
Revision
293903
Author
[email protected]
Date
2022-05-06 10:32:45 -0700 (Fri, 06 May 2022)

Log Message

Remove the viewportFitEnabled WKPreference now that it is always on
https://bugs.webkit.org/show_bug.cgi?id=240147

Reviewed by Tim Horton.

Remove the WKPreference 'ViewportFitEnabled' now that it is always enabled on all platforms, and
we do not wish to turn it off in testing or in other debugging circumstances.

Source/WebCore:

* dom/ViewportArguments.cpp:
(WebCore::setViewportFeature):
* dom/ViewportArguments.h:

Source/WebKit:

* UIProcess/API/ios/WKWebViewIOS.mm:
(viewportArgumentsFromDictionary):
(-[WKWebView _overrideViewportWithArguments:]):

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences viewportFitEnabled]): Deleted.
(-[WebPreferences setViewportFitEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:

Source/WTF:

* Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

* fast/css/variables/env/ios/safe-area-inset-env-set-expected.html:
* fast/css/variables/env/ios/safe-area-inset-env-set.html:
* fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html:
* fast/viewport/ios/viewport-fit-auto.html:
* fast/viewport/ios/viewport-fit-contain.html:
* fast/viewport/ios/viewport-fit-cover.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (293902 => 293903)


--- trunk/LayoutTests/ChangeLog	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/LayoutTests/ChangeLog	2022-05-06 17:32:45 UTC (rev 293903)
@@ -1,3 +1,20 @@
+2022-05-06  Brent Fulgham  <[email protected]>
+
+        Remove the viewportFitEnabled WKPreference now that it is always on 
+        https://bugs.webkit.org/show_bug.cgi?id=240147
+
+        Reviewed by Tim Horton.
+
+        Remove the WKPreference 'ViewportFitEnabled' now that it is always enabled on all platforms, and
+        we do not wish to turn it off in testing or in other debugging circumstances.
+
+        * fast/css/variables/env/ios/safe-area-inset-env-set-expected.html:
+        * fast/css/variables/env/ios/safe-area-inset-env-set.html:
+        * fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html:
+        * fast/viewport/ios/viewport-fit-auto.html:
+        * fast/viewport/ios/viewport-fit-contain.html:
+        * fast/viewport/ios/viewport-fit-cover.html:
+
 2022-05-06  Jer Noble  <[email protected]>
 
         [Cocoa] Seeking into a xHE-AAC track backed by a SourceBuffer can stall playback

Modified: trunk/LayoutTests/fast/css/variables/env/ios/safe-area-inset-env-set-expected.html (293902 => 293903)


--- trunk/LayoutTests/fast/css/variables/env/ios/safe-area-inset-env-set-expected.html	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/LayoutTests/fast/css/variables/env/ios/safe-area-inset-env-set-expected.html	2022-05-06 17:32:45 UTC (rev 293903)
@@ -1,9 +1,5 @@
 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
 <head>
-    <script>
-    if (window.internals)
-        internals.settings.setViewportFitEnabled(true);
-    </script>
     <meta name="viewport" content="initial-scale=1, viewport-fit=cover">
     <style>
     #a {

Modified: trunk/LayoutTests/fast/css/variables/env/ios/safe-area-inset-env-set.html (293902 => 293903)


--- trunk/LayoutTests/fast/css/variables/env/ios/safe-area-inset-env-set.html	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/LayoutTests/fast/css/variables/env/ios/safe-area-inset-env-set.html	2022-05-06 17:32:45 UTC (rev 293903)
@@ -2,7 +2,6 @@
 <script>
 if (window.internals) {
     internals.settings.setConstantPropertiesEnabled(true);
-    internals.settings.setViewportFitEnabled(true);
 }
 </script>
 <head>

Modified: trunk/LayoutTests/fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html (293902 => 293903)


--- trunk/LayoutTests/fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/LayoutTests/fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html	2022-05-06 17:32:45 UTC (rev 293903)
@@ -22,7 +22,6 @@
     <script>
         if (window.internals) {
             internals.settings.setConstantPropertiesEnabled(true);
-            internals.settings.setViewportFitEnabled(true);
         }
 
         function getRotationUIScript()

Modified: trunk/LayoutTests/fast/viewport/ios/viewport-fit-auto.html (293902 => 293903)


--- trunk/LayoutTests/fast/viewport/ios/viewport-fit-auto.html	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/LayoutTests/fast/viewport/ios/viewport-fit-auto.html	2022-05-06 17:32:45 UTC (rev 293903)
@@ -2,10 +2,6 @@
 
 <html>
 <head>
-    <script>
-    if (window.internals)
-        internals.settings.setViewportFitEnabled(true);
-    </script>
     <meta name="viewport" content="initial-scale=1, viewport-fit=auto">
     <script src=""
     <script>

Modified: trunk/LayoutTests/fast/viewport/ios/viewport-fit-contain.html (293902 => 293903)


--- trunk/LayoutTests/fast/viewport/ios/viewport-fit-contain.html	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/LayoutTests/fast/viewport/ios/viewport-fit-contain.html	2022-05-06 17:32:45 UTC (rev 293903)
@@ -2,10 +2,6 @@
 
 <html>
 <head>
-    <script>
-    if (window.internals)
-        internals.settings.setViewportFitEnabled(true);
-    </script>
     <meta name="viewport" content="initial-scale=1, viewport-fit=contain">
     <script src=""
     <script>

Modified: trunk/LayoutTests/fast/viewport/ios/viewport-fit-cover.html (293902 => 293903)


--- trunk/LayoutTests/fast/viewport/ios/viewport-fit-cover.html	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/LayoutTests/fast/viewport/ios/viewport-fit-cover.html	2022-05-06 17:32:45 UTC (rev 293903)
@@ -2,10 +2,6 @@
 
 <html>
 <head>
-    <script>
-    if (window.internals)
-        internals.settings.setViewportFitEnabled(true);
-    </script>
     <meta name="viewport" content="initial-scale=1, viewport-fit=cover">
     <script src=""
     <script>

Modified: trunk/Source/WTF/ChangeLog (293902 => 293903)


--- trunk/Source/WTF/ChangeLog	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WTF/ChangeLog	2022-05-06 17:32:45 UTC (rev 293903)
@@ -1,3 +1,15 @@
+2022-05-06  Brent Fulgham  <[email protected]>
+
+        Remove the viewportFitEnabled WKPreference now that it is always on 
+        https://bugs.webkit.org/show_bug.cgi?id=240147
+
+        Reviewed by Tim Horton.
+
+        Remove the WKPreference 'ViewportFitEnabled' now that it is always enabled on all platforms, and
+        we do not wish to turn it off in testing or in other debugging circumstances.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+
 2022-05-05  Chris Dumez  <[email protected]>
 
         Identifier::string() should return an AtomString

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (293902 => 293903)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2022-05-06 17:32:45 UTC (rev 293903)
@@ -2455,18 +2455,6 @@
     WebKit:
       default: false
 
-ViewportFitEnabled:
-  type: bool
-  humanReadableName: "Viewport Fit"
-  humanReadableDescription: "Enable viewport-fit viewport parameter"
-  defaultValue:
-    WebKitLegacy:
-      default: true
-    WebKit:
-      default: true
-    WebCore:
-      default: false
-
 VisualViewportEnabled:
   type: bool
   webcoreOnChange: setNeedsRecalcStyleInAllFrames

Modified: trunk/Source/WebCore/ChangeLog (293902 => 293903)


--- trunk/Source/WebCore/ChangeLog	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebCore/ChangeLog	2022-05-06 17:32:45 UTC (rev 293903)
@@ -1,3 +1,17 @@
+2022-05-06  Brent Fulgham  <[email protected]>
+
+        Remove the viewportFitEnabled WKPreference now that it is always on 
+        https://bugs.webkit.org/show_bug.cgi?id=240147
+
+        Reviewed by Tim Horton.
+
+        Remove the WKPreference 'ViewportFitEnabled' now that it is always enabled on all platforms, and
+        we do not wish to turn it off in testing or in other debugging circumstances.
+
+        * dom/ViewportArguments.cpp:
+        (WebCore::setViewportFeature):
+        * dom/ViewportArguments.h:
+
 2022-05-06  Simon Fraser  <[email protected]>
 
         Make the various shouldApplyContainment() functions member functions on RenderElement

Modified: trunk/Source/WebCore/dom/ViewportArguments.cpp (293902 => 293903)


--- trunk/Source/WebCore/dom/ViewportArguments.cpp	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebCore/dom/ViewportArguments.cpp	2022-05-06 17:32:45 UTC (rev 293903)
@@ -448,7 +448,7 @@
     document.addConsoleMessage(MessageSource::Rendering, viewportErrorMessageLevel(errorCode), message);
 }
 
-void setViewportFeature(ViewportArguments& arguments, StringView key, StringView value, bool viewportFitEnabled, const ViewportErrorHandler& errorHandler)
+void setViewportFeature(ViewportArguments& arguments, StringView key, StringView value, const ViewportErrorHandler& errorHandler)
 {
     InternalViewportErrorHandler internalErrorHandler = [&errorHandler] (ViewportErrorCode errorCode, StringView replacement1, StringView replacement2) {
         errorHandler(errorCode, viewportErrorMessage(errorCode, replacement1, replacement2));
@@ -474,7 +474,7 @@
 #endif
     else if (equalLettersIgnoringASCIICase(key, "shrink-to-fit"_s))
         arguments.shrinkToFit = findBooleanValue(key, value, internalErrorHandler);
-    else if (equalLettersIgnoringASCIICase(key, "viewport-fit"_s) && viewportFitEnabled)
+    else if (equalLettersIgnoringASCIICase(key, "viewport-fit"_s))
         arguments.viewportFit = parseViewportFitValue(key, value, internalErrorHandler);
     else
         internalErrorHandler(UnrecognizedViewportArgumentKeyError, key, { });
@@ -482,7 +482,7 @@
 
 void setViewportFeature(ViewportArguments& arguments, Document& document, StringView key, StringView value)
 {
-    setViewportFeature(arguments, key, value, document.settings().viewportFitEnabled(), [&](ViewportErrorCode errorCode, const String& message) {
+    setViewportFeature(arguments, key, value, [&](ViewportErrorCode errorCode, const String& message) {
         reportViewportWarning(document, errorCode, message);
     });
 }

Modified: trunk/Source/WebCore/dom/ViewportArguments.h (293902 => 293903)


--- trunk/Source/WebCore/dom/ViewportArguments.h	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebCore/dom/ViewportArguments.h	2022-05-06 17:32:45 UTC (rev 293903)
@@ -143,7 +143,7 @@
 
 typedef Function<void(ViewportErrorCode, const String&)> ViewportErrorHandler;
 void setViewportFeature(ViewportArguments&, Document&, StringView key, StringView value);
-WEBCORE_EXPORT void setViewportFeature(ViewportArguments&, StringView key, StringView value, bool viewportFitEnabled, const ViewportErrorHandler&);
+WEBCORE_EXPORT void setViewportFeature(ViewportArguments&, StringView key, StringView value, const ViewportErrorHandler&);
 
 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const ViewportArguments&);
 

Modified: trunk/Source/WebKit/ChangeLog (293902 => 293903)


--- trunk/Source/WebKit/ChangeLog	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebKit/ChangeLog	2022-05-06 17:32:45 UTC (rev 293903)
@@ -1,3 +1,17 @@
+2022-05-06  Brent Fulgham  <[email protected]>
+
+        Remove the viewportFitEnabled WKPreference now that it is always on 
+        https://bugs.webkit.org/show_bug.cgi?id=240147
+
+        Reviewed by Tim Horton.
+
+        Remove the WKPreference 'ViewportFitEnabled' now that it is always enabled on all platforms, and
+        we do not wish to turn it off in testing or in other debugging circumstances.
+
+        * UIProcess/API/ios/WKWebViewIOS.mm:
+        (viewportArgumentsFromDictionary):
+        (-[WKWebView _overrideViewportWithArguments:]):
+
 2022-05-06  Jer Noble  <[email protected]>
 
         [iOS] Infinite recursion at -[WKFullScreenWindowController _exitFullscreenImmediately]

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (293902 => 293903)


--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-05-06 17:32:45 UTC (rev 293903)
@@ -3406,7 +3406,7 @@
     _maximumUnobscuredSizeOverride = std::nullopt;
 }
 
-static std::optional<WebCore::ViewportArguments> viewportArgumentsFromDictionary(NSDictionary<NSString *, NSString *> *viewportArgumentPairs, bool viewportFitEnabled)
+static std::optional<WebCore::ViewportArguments> viewportArgumentsFromDictionary(NSDictionary<NSString *, NSString *> *viewportArgumentPairs)
 {
     if (!viewportArgumentPairs)
         return std::nullopt;
@@ -3418,7 +3418,7 @@
             [NSException raise:NSInvalidArgumentException format:@"-[WKWebView _overrideViewportWithArguments:]: Keys and values must all be NSStrings."];
         String keyString = key;
         String valueString = value;
-        WebCore::setViewportFeature(viewportArguments, keyString, valueString, viewportFitEnabled, [] (WebCore::ViewportErrorCode, const String& errorMessage) {
+        WebCore::setViewportFeature(viewportArguments, keyString, valueString, [] (WebCore::ViewportErrorCode, const String& errorMessage) {
             NSLog(@"-[WKWebView _overrideViewportWithArguments:]: Error parsing viewport argument: %s", errorMessage.utf8().data());
         });
     }).get()];
@@ -3431,7 +3431,7 @@
     if (!_page)
         return;
 
-    _page->setOverrideViewportArguments(viewportArgumentsFromDictionary(arguments, _page->preferences().viewportFitEnabled()));
+    _page->setOverrideViewportArguments(viewportArgumentsFromDictionary(arguments));
 }
 
 - (UIView *)_viewForFindUI

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (293902 => 293903)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2022-05-06 17:32:45 UTC (rev 293903)
@@ -1,3 +1,19 @@
+2022-05-06  Brent Fulgham  <[email protected]>
+
+        Remove the viewportFitEnabled WKPreference now that it is always on 
+        https://bugs.webkit.org/show_bug.cgi?id=240147
+
+        Reviewed by Tim Horton.
+
+        Remove the WKPreference 'ViewportFitEnabled' now that it is always enabled on all platforms, and
+        we do not wish to turn it off in testing or in other debugging circumstances.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences viewportFitEnabled]): Deleted.
+        (-[WebPreferences setViewportFitEnabled:]): Deleted.
+        * WebView/WebPreferencesPrivate.h:
+
 2022-05-05  Brent Fulgham  <[email protected]>
 
         Remove abandoned WKPreference for AlwaysUseAcceleratedOverflowScroll

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (293902 => 293903)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2022-05-06 17:32:45 UTC (rev 293903)
@@ -174,7 +174,6 @@
 #define WebKitLinkPreloadEnabledPreferenceKey @"WebKitLinkPreloadEnabled"
 #define WebKitMediaPreloadingEnabledPreferenceKey @"WebKitMediaPreloadingEnabled"
 #define WebKitMediaUserGestureInheritsFromDocument @"WebKitMediaUserGestureInheritsFromDocument"
-#define WebKitViewportFitEnabledPreferenceKey @"WebKitViewportFitEnabled"
 #define WebKitConstantPropertiesEnabledPreferenceKey @"WebKitConstantPropertiesEnabled"
 #define WebKitColorFilterEnabledPreferenceKey @"WebKitColorFilterEnabled"
 #define WebKitPunchOutWhiteBackgroundsInDarkModePreferenceKey @"WebKitPunchOutWhiteBackgroundsInDarkMode"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (293902 => 293903)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2022-05-06 17:32:45 UTC (rev 293903)
@@ -2769,16 +2769,6 @@
     [self _setBoolValue:flag forKey:WebKitPictureInPictureAPIEnabledKey];
 }
 
-- (BOOL)viewportFitEnabled
-{
-    return [self _boolValueForKey:WebKitViewportFitEnabledPreferenceKey];
-}
-
-- (void)setViewportFitEnabled:(BOOL)flag
-{
-    [self _setBoolValue:flag forKey:WebKitViewportFitEnabledPreferenceKey];
-}
-
 - (BOOL)constantPropertiesEnabled
 {
     return [self _boolValueForKey:WebKitConstantPropertiesEnabledPreferenceKey];

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (293902 => 293903)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2022-05-06 17:25:02 UTC (rev 293902)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2022-05-06 17:32:45 UTC (rev 293903)
@@ -244,7 +244,6 @@
 @property (nonatomic) BOOL legacyEncryptedMediaAPIEnabled;
 @property (nonatomic) BOOL encryptedMediaAPIEnabled;
 @property (nonatomic) BOOL pictureInPictureAPIEnabled;
-@property (nonatomic) BOOL viewportFitEnabled;
 @property (nonatomic) BOOL constantPropertiesEnabled;
 @property (nonatomic) BOOL colorFilterEnabled;
 @property (nonatomic) BOOL punchOutWhiteBackgroundsInDarkMode;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to