Remove display:contents feature flag
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Dec 2019 20:38:26 +0000 (20:38 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Dec 2019 20:38:26 +0000 (20:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=205276

Reviewed by Ryosuke Niwa.

Source/WebCore:

The feature has been enabled for a while. There is no reason to have a flag for it anymore.

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setDisplayContentsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::displayContentsEnabled const): Deleted.
* style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjustDisplayContentsStyle const):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDisplayContentsEnabled): Deleted.
(WKPreferencesGetDisplayContentsEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences displayContentsEnabled]): Deleted.
(-[WebPreferences setDisplayContentsEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

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

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/style/StyleAdjuster.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
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

index 222c209..6fd941b 100644 (file)
@@ -1,3 +1,18 @@
+2019-12-16  Antti Koivisto  <antti@apple.com>
+
+        Remove display:contents feature flag
+        https://bugs.webkit.org/show_bug.cgi?id=205276
+
+        Reviewed by Ryosuke Niwa.
+
+        The feature has been enabled for a while. There is no reason to have a flag for it anymore.
+
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setDisplayContentsEnabled): Deleted.
+        (WebCore::RuntimeEnabledFeatures::displayContentsEnabled const): Deleted.
+        * style/StyleAdjuster.cpp:
+        (WebCore::Style::Adjuster::adjustDisplayContentsStyle const):
+
 2019-12-16  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html
index 49091ba..5ef85df 100644 (file)
@@ -47,9 +47,6 @@ public:
     void setBlankAnchorTargetImpliesNoOpenerEnabled(bool isEnabled) { m_blankAnchorTargetImpliesNoOpenerEnabled = isEnabled; }
     bool blankAnchorTargetImpliesNoOpenerEnabled() const { return m_blankAnchorTargetImpliesNoOpenerEnabled; }
 
-    void setDisplayContentsEnabled(bool isEnabled) { m_isDisplayContentsEnabled = isEnabled; }
-    bool displayContentsEnabled() const { return m_isDisplayContentsEnabled; }
-
     void setLinkPreloadEnabled(bool isEnabled) { m_isLinkPreloadEnabled = isEnabled; }
     bool linkPreloadEnabled() const { return m_isLinkPreloadEnabled; }
 
@@ -407,7 +404,6 @@ private:
     bool m_isWebAuthenticationEnabled { false };
     bool m_isWebAuthenticationLocalAuthenticatorEnabled { false };
     bool m_isSecureContextAttributeEnabled { false };
-    bool m_isDisplayContentsEnabled { true };
     bool m_isShadowDOMEnabled { true };
     bool m_areCustomElementsEnabled { true };
     bool m_isMenuItemElementEnabled { false };
index c525cbd..e5305a0 100644 (file)
@@ -493,12 +493,6 @@ static bool hasEffectiveDisplayNoneForDisplayContents(const Element& element)
 
 void Adjuster::adjustDisplayContentsStyle(RenderStyle& style) const
 {
-    bool displayContentsEnabled = is<HTMLSlotElement>(m_element) || RuntimeEnabledFeatures::sharedFeatures().displayContentsEnabled();
-    if (!displayContentsEnabled) {
-        style.setDisplay(DisplayType::Inline);
-        return;
-    }
-
     if (!m_element) {
         if (style.styleType() != PseudoId::Before && style.styleType() != PseudoId::After)
             style.setDisplay(DisplayType::None);
index 5e680bb..210aaa3 100644 (file)
@@ -1,3 +1,16 @@
+2019-12-16  Antti Koivisto  <antti@apple.com>
+
+        Remove display:contents feature flag
+        https://bugs.webkit.org/show_bug.cgi?id=205276
+
+        Reviewed by Ryosuke Niwa.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetDisplayContentsEnabled): Deleted.
+        (WKPreferencesGetDisplayContentsEnabled): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+
 2019-12-16  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Fix API availability for -_getResourceLoadStatisticsDataSummary: after r253484
index 2e7b4b4..b60a7e4 100644 (file)
@@ -879,13 +879,6 @@ ViewportFitEnabled:
   humanReadableName: "Viewport Fit"
   humanReadableDescription: "Enable viewport-fit viewport parameter"
 
-DisplayContentsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "CSS display: contents"
-  humanReadableDescription: "Enable CSS display: contents support"
-  webcoreBinding: RuntimeEnabledFeatures
-
 IncrementalRenderingSuppressionTimeout:
   type: double
   defaultValue: 5
index 585daac..88ca770 100644 (file)
@@ -1709,16 +1709,6 @@ bool WKPreferencesGetFetchAPIEnabled(WKPreferencesRef preferencesRef)
     return toImpl(preferencesRef)->fetchAPIEnabled();
 }
 
-void WKPreferencesSetDisplayContentsEnabled(WKPreferencesRef preferencesRef, bool flag)
-{
-    toImpl(preferencesRef)->setDisplayContentsEnabled(flag);
-}
-
-bool WKPreferencesGetDisplayContentsEnabled(WKPreferencesRef preferencesRef)
-{
-    return toImpl(preferencesRef)->displayContentsEnabled();
-}
-
 void WKPreferencesSetDataTransferItemsEnabled(WKPreferencesRef preferencesRef, bool flag)
 {
     toImpl(preferencesRef)->setDataTransferItemsEnabled(flag);
index 8c65c2e..80c16d4 100644 (file)
@@ -470,11 +470,7 @@ WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef);
 // Defaults to false
 WK_EXPORT void WKPreferencesSetMenuItemElementEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetMenuItemElementEnabled(WKPreferencesRef);
-    
-// Defaults to false
-WK_EXPORT void WKPreferencesSetDisplayContentsEnabled(WKPreferencesRef, bool flag);
-WK_EXPORT bool WKPreferencesGetDisplayContentsEnabled(WKPreferencesRef);
-    
+        
 // Defaults to false
 WK_EXPORT void WKPreferencesSetDataTransferItemsEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetDataTransferItemsEnabled(WKPreferencesRef);
index 560c32c..168167e 100644 (file)
@@ -1,3 +1,19 @@
+2019-12-16  Antti Koivisto  <antti@apple.com>
+
+        Remove display:contents feature flag
+        https://bugs.webkit.org/show_bug.cgi?id=205276
+
+        Reviewed by Ryosuke Niwa.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences displayContentsEnabled]): Deleted.
+        (-[WebPreferences setDisplayContentsEnabled:]): Deleted.
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2019-12-14  David Kilzer  <ddkilzer@apple.com>
 
         Add release assert for selectedIndex in WebKit::WebPopupMenu::show()
index 441b5a8..a3c0d1b 100644 (file)
 #define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled"
 #define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled"
 #define WebKitMenuItemElementEnabledPreferenceKey @"WebKitMenuItemElementEnabled"
-#define WebKitDisplayContentsEnabledPreferenceKey @"WebKitDisplayContentsEnabled"
 #define WebKitUserTimingEnabledPreferenceKey @"WebKitUserTimingEnabled"
 #define WebKitResourceTimingEnabledPreferenceKey @"WebKitResourceTimingEnabled"
 #define WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey @"WebKitMediaContentTypesRequiringHardwareSupport"
index 47f7c75..9b2ea16 100644 (file)
@@ -679,7 +679,6 @@ public:
 #if ENABLE(INTERSECTION_OBSERVER)
         @NO, WebKitIntersectionObserverEnabledPreferenceKey,
 #endif
-        @YES, WebKitDisplayContentsEnabledPreferenceKey,
         @NO, WebKitUserTimingEnabledPreferenceKey,
         @NO, WebKitResourceTimingEnabledPreferenceKey,
         @NO, WebKitMediaUserGestureInheritsFromDocument,
@@ -3271,16 +3270,6 @@ static NSString *classIBCreatorID = nil;
     [self _setBoolValue:flag forKey:WebKitMenuItemElementEnabledPreferenceKey];
 }
 
-- (BOOL)displayContentsEnabled
-{
-    return [self _boolValueForKey:WebKitDisplayContentsEnabledPreferenceKey];
-}
-
-- (void)setDisplayContentsEnabled:(BOOL)flag
-{
-    [self _setBoolValue:flag forKey:WebKitDisplayContentsEnabledPreferenceKey];
-}
-
 - (BOOL)userTimingEnabled
 {
     return [self _boolValueForKey:WebKitUserTimingEnabledPreferenceKey];
index 59758e2..0681d6b 100644 (file)
@@ -642,7 +642,6 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR
 @property (nonatomic) BOOL intersectionObserverEnabled;
 @property (nonatomic) BOOL menuItemElementEnabled;
 @property (nonatomic) BOOL keygenElementEnabled;
-@property (nonatomic) BOOL displayContentsEnabled;
 @property (nonatomic) BOOL userTimingEnabled;
 @property (nonatomic) BOOL resourceTimingEnabled;
 @property (nonatomic) BOOL linkPreloadEnabled;
index 961e05c..2945516 100644 (file)
@@ -3177,7 +3177,6 @@ static bool needsSelfRetainWhileLoadingQuirk()
 #if ENABLE(INTERSECTION_OBSERVER)
     RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(preferences.intersectionObserverEnabled);
 #endif
-    RuntimeEnabledFeatures::sharedFeatures().setDisplayContentsEnabled(preferences.displayContentsEnabled);
 
     RuntimeEnabledFeatures::sharedFeatures().setUserTimingEnabled(preferences.userTimingEnabled);
     RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(preferences.resourceTimingEnabled);