[LFC][Integration] Support the feature flag in DumpRenderTree
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2020 16:06:03 +0000 (16:06 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2020 16:06:03 +0000 (16:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=206218

Reviewed by Zalan Bujtas.

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences layoutFormattingContextIntegrationEnabled]):
(-[WebPreferences setLayoutFormattingContextIntegrationEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

This allows tests to turn off the feature in WK1 if needed.

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.cpp
Tools/DumpRenderTree/TestOptions.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm

index f0ebda0..5437baf 100644 (file)
@@ -1,3 +1,12 @@
+2020-01-14  Antti Koivisto  <antti@apple.com>
+
+        [LFC][Integration] Support the feature flag in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=206218
+
+        Reviewed by Zalan Bujtas.
+
+        * platform/mac-wk1/TestExpectations:
+
 2020-01-14  Carlos Alberto Lopez Perez  <clopez@igalia.com>
 
         [Freetype] Support for the -webkit-font-smoothing CSS property
index ebb581e..5e7e9a9 100644 (file)
@@ -846,9 +846,3 @@ webkit.org/b/205814 [ Catalina ] editing/mac/attributed-string/attributed-string
 webkit.org/b/206071 editing/spelling/grammar.html [ Skip ]
 webkit.org/b/206071 editing/spelling/markers.html [ Skip ]
 webkit.org/b/206071 editing/spelling/retro-correction-spelling-markers.html [ Failure ]
-
-# These simple line layout specific tests disable LFC in test header. This is not supported in DRT.
-webkit.org/b/206167 fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html [ ImageOnlyFailure ]
-webkit.org/b/206167 fast/text/simple-line-layout-leading-whitespace-with-soft-hard-linebreak.html [ ImageOnlyFailure ]
-webkit.org/b/206167 fast/text/simple-lines-float.html [ ImageOnlyFailure ]
-webkit.org/b/206167 fast/text/whitespace/pre-wrap-long-word-simple-lines.html [ ImageOnlyFailure ]
index 31d8224..1cf1943 100644 (file)
@@ -1,3 +1,19 @@
+2020-01-14  Antti Koivisto  <antti@apple.com>
+
+        [LFC][Integration] Support the feature flag in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=206218
+
+        Reviewed by Zalan Bujtas.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences layoutFormattingContextIntegrationEnabled]):
+        (-[WebPreferences setLayoutFormattingContextIntegrationEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2020-01-09  Tim Horton  <timothy_horton@apple.com>
 
         Adopt TARGET_OS_MACCATALYST in more places
index ac14aaf..f7a821c 100644 (file)
 #define WebKitFetchAPIKeepAliveEnabledPreferenceKey @"WebKitFetchAPIKeepAliveEnabled"
 #define WebKitWebAnimationsCSSIntegrationEnabledPreferenceKey @"WebKitWebAnimationsCSSIntegrationEnabled"
 #define WebKitCSSShadowPartsEnabledPreferenceKey @"WebKitCSSShadowPartsEnabled"
+#define WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey @"WebKitLayoutFormattingContextIntegrationEnabled"
 
 #if !TARGET_OS_IPHONE
 // These are private both because callers should be using the cover methods and because the
index 26bb72a..1534c27 100644 (file)
@@ -634,6 +634,7 @@ public:
         @NO, WebKitHighlightAPIEnabledPreferenceKey,
         @YES, WebKitModernMediaControlsEnabledPreferenceKey,
         @YES, WebKitWebAnimationsCSSIntegrationEnabledPreferenceKey,
+        @YES, WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey,
 
 #if ENABLE(WEBGL2)
         @NO, WebKitWebGL2EnabledPreferenceKey,
@@ -3593,6 +3594,16 @@ static NSString *classIBCreatorID = nil;
     [self _setBoolValue:flag forKey:WebKitCSSShadowPartsEnabledPreferenceKey];
 }
 
+- (BOOL)layoutFormattingContextIntegrationEnabled
+{
+    return [self _boolValueForKey:WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey];
+}
+
+- (void)setLayoutFormattingContextIntegrationEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey];
+}
+
 - (BOOL)remotePlaybackEnabled
 {
     return [self _boolValueForKey:WebKitRemotePlaybackEnabledPreferenceKey];
index d03fd75..b3258c0 100644 (file)
@@ -630,6 +630,9 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR
 - (void)setCSSShadowPartsEnabled:(BOOL)flag;
 - (BOOL)cssShadowPartsEnabled;
 
+- (void)setLayoutFormattingContextIntegrationEnabled:(BOOL)flag;
+- (BOOL)layoutFormattingContextIntegrationEnabled;
+
 - (BOOL)isInAppBrowserPrivacyEnabled;
 - (void)setInAppBrowserPrivacyEnabled:(BOOL)flag;
 
index 85474a8..bf9d25f 100644 (file)
@@ -3205,6 +3205,7 @@ static bool needsSelfRetainWhileLoadingQuirk()
     RuntimeEnabledFeatures::sharedFeatures().setDialogElementEnabled([preferences dialogElementEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setKeygenElementEnabled([preferences keygenElementEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setCSSShadowPartsEnabled([preferences cssShadowPartsEnabled]);
+    RuntimeEnabledFeatures::sharedFeatures().setLayoutFormattingContextIntegrationEnabled([preferences layoutFormattingContextIntegrationEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setIsInAppBrowserPrivacyEnabled([preferences isInAppBrowserPrivacyEnabled]);
 
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
index 18f1372..a8be8a0 100644 (file)
@@ -1,3 +1,18 @@
+2020-01-14  Antti Koivisto  <antti@apple.com>
+
+        [LFC][Integration] Support the feature flag in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=206218
+
+        Reviewed by Zalan Bujtas.
+
+        This allows tests to turn off the feature in WK1 if needed.
+
+        * DumpRenderTree/TestOptions.cpp:
+        (TestOptions::TestOptions):
+        * DumpRenderTree/TestOptions.h:
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (setWebPreferencesForTestOptions):
+
 2020-01-14  Alicia Boya GarcĂ­a  <aboya@igalia.com>
 
         [WTF] Make MediaTime constructor constexpr
index 7c9ae59..f17fa6a 100644 (file)
@@ -148,6 +148,8 @@ TestOptions::TestOptions(const std::string& pathOrURL, const std::string& absolu
             enableRequestIdleCallback = parseBooleanTestHeaderValue(value);
         else if (key == "experimental:AsyncClipboardAPIEnabled")
             enableAsyncClipboardAPI = parseBooleanTestHeaderValue(value);
+        else if (key == "internal:LayoutFormattingContextIntegrationEnabled")
+            layoutFormattingContextIntegrationEnabled = parseBooleanTestHeaderValue(value);
         pairStart = pairEnd + 1;
     }
 }
index e5335e8..b0c85bb 100644 (file)
@@ -53,6 +53,7 @@ struct TestOptions {
     bool enableCoreMathML { false };
     bool enableRequestIdleCallback { false };
     bool enableAsyncClipboardAPI { false };
+    bool layoutFormattingContextIntegrationEnabled { true };
     std::string jscOptions;
     std::string additionalSupportedImageTypes;
 
index 0902595..92542c6 100644 (file)
@@ -1035,6 +1035,7 @@ static void setWebPreferencesForTestOptions(const TestOptions& options)
     preferences.asyncClipboardAPIEnabled = options.enableAsyncClipboardAPI;
     preferences.privateBrowsingEnabled = options.useEphemeralSession;
     preferences.usesPageCache = options.enableBackForwardCache;
+    preferences.layoutFormattingContextIntegrationEnabled = options.layoutFormattingContextIntegrationEnabled;
 }
 
 // Called once on DumpRenderTree startup.