Title: [267172] trunk
Revision
267172
Author
wei...@apple.com
Date
2020-09-16 16:56:04 -0700 (Wed, 16 Sep 2020)

Log Message

Remove runtime setting for enabling/disabling CSS shadow parts
https://bugs.webkit.org/show_bug.cgi?id=216567

Reviewed by Tim Horton.

Remove runtime setting for enabling/disabling CSS shadow parts. It is
on by default and there is no known reason one would need to disable it.

Source/WebCore:

* css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoElementType):
* dom/Element.cpp:
(WebCore::Element::partAttributeChanged):
* dom/Element.idl:
* dom/ShadowRoot.cpp:
(WebCore::parsePartMappingsList):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSShadowPartsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::cssShadowPartsEnabled const): Deleted.
* style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::invalidateShadowParts):

Source/WebKit:

* Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

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

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (267171 => 267172)


--- trunk/Source/WebCore/ChangeLog	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebCore/ChangeLog	2020-09-16 23:56:04 UTC (rev 267172)
@@ -1,3 +1,26 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling CSS shadow parts
+        https://bugs.webkit.org/show_bug.cgi?id=216567
+
+        Reviewed by Tim Horton.
+
+        Remove runtime setting for enabling/disabling CSS shadow parts. It is
+        on by default and there is no known reason one would need to disable it.
+
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::parsePseudoElementType):
+        * dom/Element.cpp:
+        (WebCore::Element::partAttributeChanged):
+        * dom/Element.idl:
+        * dom/ShadowRoot.cpp:
+        (WebCore::parsePartMappingsList):
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setCSSShadowPartsEnabled): Deleted.
+        (WebCore::RuntimeEnabledFeatures::cssShadowPartsEnabled const): Deleted.
+        * style/StyleInvalidator.cpp:
+        (WebCore::Style::Invalidator::invalidateShadowParts):
+
 2020-09-16  Chris Dumez  <cdu...@apple.com>
 
         AudioBufferSourceNode.start() ignores 'when' parameter when pitch rate is 0

Modified: trunk/Source/WebCore/css/CSSSelector.cpp (267171 => 267172)


--- trunk/Source/WebCore/css/CSSSelector.cpp	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebCore/css/CSSSelector.cpp	2020-09-16 23:56:04 UTC (rev 267172)
@@ -279,9 +279,6 @@
     if (type == PseudoElementHighlight && !RuntimeEnabledFeatures::sharedFeatures().highlightAPIEnabled())
         return PseudoElementUnknown;
 
-    if (type == PseudoElementPart && !RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
-        return PseudoElementUnknown;
-
     return type;
 }
 

Modified: trunk/Source/WebCore/dom/Element.cpp (267171 => 267172)


--- trunk/Source/WebCore/dom/Element.cpp	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebCore/dom/Element.cpp	2020-09-16 23:56:04 UTC (rev 267172)
@@ -1881,9 +1881,6 @@
 
 void Element::partAttributeChanged(const AtomString& newValue)
 {
-    if (!RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
-        return;
-
     bool hasParts = isNonEmptyTokenList(newValue);
     if (hasParts || !partNames().isEmpty()) {
         auto newParts = hasParts ? SpaceSplitString(newValue, false) : SpaceSplitString();

Modified: trunk/Source/WebCore/dom/Element.idl (267171 => 267172)


--- trunk/Source/WebCore/dom/Element.idl	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebCore/dom/Element.idl	2020-09-16 23:56:04 UTC (rev 267172)
@@ -34,7 +34,7 @@
     [CEReactions, Reflect=class] attribute DOMString className;
     [PutForwards=value] readonly attribute DOMTokenList classList; // FIXME: Should be [SameObject].
     [CEReactions, Reflect, Unscopable] attribute DOMString slot;
-    [EnabledAtRuntime=CSSShadowParts, SameObject, PutForwards=value] readonly attribute DOMTokenList part;
+    [SameObject, PutForwards=value] readonly attribute DOMTokenList part;
 
     [DOMJIT=ReadDOM] boolean hasAttributes();
     readonly attribute NamedNodeMap attributes; // FIXME: Should be [SameObject].

Modified: trunk/Source/WebCore/dom/ShadowRoot.cpp (267171 => 267172)


--- trunk/Source/WebCore/dom/ShadowRoot.cpp	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebCore/dom/ShadowRoot.cpp	2020-09-16 23:56:04 UTC (rev 267172)
@@ -309,9 +309,6 @@
 
 static ShadowRoot::PartMappings parsePartMappingsList(StringView mappingsListString)
 {
-    if (!RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
-        return { };
-
     ShadowRoot::PartMappings mappings;
 
     const auto end = mappingsListString.length();

Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (267171 => 267172)


--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2020-09-16 23:56:04 UTC (rev 267172)
@@ -252,9 +252,6 @@
     bool pageAtRuleSupportEnabled() const { return m_pageAtRuleSupportEnabled; }
     void setPageAtRuleSupportEnabled(bool isEnabled) { m_pageAtRuleSupportEnabled = isEnabled; }
 
-    void setCSSShadowPartsEnabled(bool isEnabled) { m_isCSSShadowPartsEnabled = isEnabled; }
-    bool cssShadowPartsEnabled() const { return m_isCSSShadowPartsEnabled; }
-
     WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
 
 #if HAVE(NSURLSESSION_WEBSOCKET)
@@ -409,7 +406,6 @@
 #endif
 
     bool m_secureContextChecksEnabled { true };
-    bool m_isCSSShadowPartsEnabled { true };
 
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
     bool m_accessibilityIsolatedTree { false };

Modified: trunk/Source/WebCore/style/StyleInvalidator.cpp (267171 => 267172)


--- trunk/Source/WebCore/style/StyleInvalidator.cpp	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebCore/style/StyleInvalidator.cpp	2020-09-16 23:56:04 UTC (rev 267172)
@@ -301,9 +301,6 @@
 
 void Invalidator::invalidateShadowParts(ShadowRoot& shadowRoot)
 {
-    if (!RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
-        return;
-
     if (shadowRoot.mode() == ShadowRootMode::UserAgent)
         return;
 

Modified: trunk/Source/WebKit/ChangeLog (267171 => 267172)


--- trunk/Source/WebKit/ChangeLog	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebKit/ChangeLog	2020-09-16 23:56:04 UTC (rev 267172)
@@ -1,5 +1,17 @@
 2020-09-16  Sam Weinig  <wei...@apple.com>
 
+        Remove runtime setting for enabling/disabling CSS shadow parts
+        https://bugs.webkit.org/show_bug.cgi?id=216567
+
+        Reviewed by Tim Horton.
+
+        Remove runtime setting for enabling/disabling CSS shadow parts. It is
+        on by default and there is no known reason one would need to disable it.
+
+        * Shared/WebPreferences.yaml:
+
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
         Remove runtime setting for enabling/disabling the isSecureContext API?
         https://bugs.webkit.org/show_bug.cgi?id=216562
 

Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (267171 => 267172)


--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2020-09-16 23:56:04 UTC (rev 267172)
@@ -1563,14 +1563,6 @@
   webcoreBinding: RuntimeEnabledFeatures
   webcoreName: fetchAPIKeepAliveEnabled
 
-CSSShadowPartsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "CSS Shadow Parts"
-  humanReadableDescription: "Enable CSS Shadow Parts"
-  category: experimental
-  webcoreBinding: RuntimeEnabledFeatures
-
 GenericCueAPIEnabled:
   type: bool
   defaultValue: true

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (267171 => 267172)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2020-09-16 23:56:04 UTC (rev 267172)
@@ -1,5 +1,24 @@
 2020-09-16  Sam Weinig  <wei...@apple.com>
 
+        Remove runtime setting for enabling/disabling CSS shadow parts
+        https://bugs.webkit.org/show_bug.cgi?id=216567
+
+        Reviewed by Tim Horton.
+
+        Remove runtime setting for enabling/disabling CSS shadow parts. It is
+        on by default and there is no known reason one would need to disable it.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences setCSSShadowPartsEnabled:]):
+        (-[WebPreferences cssShadowPartsEnabled]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
         Remove runtime setting for enabling/disabling the isSecureContext API?
         https://bugs.webkit.org/show_bug.cgi?id=216562
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (267171 => 267172)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2020-09-16 23:56:04 UTC (rev 267172)
@@ -205,7 +205,6 @@
 #define WebKitPunchOutWhiteBackgroundsInDarkModePreferenceKey @"WebKitPunchOutWhiteBackgroundsInDarkMode"
 #define WebKitFetchAPIKeepAliveEnabledPreferenceKey @"WebKitFetchAPIKeepAliveEnabled"
 #define WebKitWebAnimationsCSSIntegrationEnabledPreferenceKey @"WebKitWebAnimationsCSSIntegrationEnabled"
-#define WebKitCSSShadowPartsEnabledPreferenceKey @"WebKitCSSShadowPartsEnabled"
 #define WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey @"WebKitLayoutFormattingContextIntegrationEnabled"
 #define WebKitWebSQLEnabledPreferenceKey @"WebKitWebSQLEnabled"
 #define WebKitUserGesturePromisePropagationEnabledPreferenceKey @"WebKitUserGesturePromisePropagationEnabled"
@@ -295,3 +294,4 @@
 #define WebKitCustomElementsEnabledPreferenceKey @"WebKitCustomElementsEnabled"
 #define WebKitFetchAPIEnabledPreferenceKey @"WebKitFetchAPIEnabled"
 #define WebKitIsSecureContextAttributeEnabledPreferenceKey @"WebKitIsSecureContextAttributeEnabled"
+#define WebKitCSSShadowPartsEnabledPreferenceKey @"WebKitCSSShadowPartsEnabled"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (267171 => 267172)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-09-16 23:56:04 UTC (rev 267172)
@@ -711,7 +711,6 @@
         @NO, WebKitRequestIdleCallbackEnabledPreferenceKey,
         @NO, WebKitAsyncClipboardAPIEnabledPreferenceKey,
         @NO, WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey,
-        @YES, WebKitCSSShadowPartsEnabledPreferenceKey,
         @NO, WebKitDebugInAppBrowserPrivacyEnabledPreferenceKey,
         @NO, WebKitAspectRatioOfImgFromWidthAndHeightEnabledPreferenceKey,
         @(webSQLEnabled), WebKitWebSQLEnabledPreferenceKey,
@@ -3587,16 +3586,6 @@
     [self _setBoolValue:flag forKey:WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey];
 }
 
-- (BOOL)cssShadowPartsEnabled
-{
-    return [self _boolValueForKey:WebKitCSSShadowPartsEnabledPreferenceKey];
-}
-
-- (void)setCSSShadowPartsEnabled:(BOOL)flag
-{
-    [self _setBoolValue:flag forKey:WebKitCSSShadowPartsEnabledPreferenceKey];
-}
-
 - (BOOL)layoutFormattingContextIntegrationEnabled
 {
     return [self _boolValueForKey:WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey];
@@ -3681,6 +3670,15 @@
 // The preferences in this category are deprecated and have no effect. They should
 // be removed when it is considered safe to do so.
 
+- (void)setCSSShadowPartsEnabled:(BOOL)flag
+{
+}
+
+- (BOOL)cssShadowPartsEnabled
+{
+    return YES;
+}
+
 - (void)setIsSecureContextAttributeEnabled:(BOOL)flag
 {
 }

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (267171 => 267172)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2020-09-16 23:56:04 UTC (rev 267172)
@@ -621,9 +621,6 @@
 - (void)setLinkPreloadResponsiveImagesEnabled:(BOOL)flag;
 - (BOOL)linkPreloadResponsiveImagesEnabled;
 
-- (void)setCSSShadowPartsEnabled:(BOOL)flag;
-- (BOOL)cssShadowPartsEnabled;
-
 - (void)setLayoutFormattingContextIntegrationEnabled:(BOOL)flag;
 - (BOOL)layoutFormattingContextIntegrationEnabled;
 
@@ -695,6 +692,9 @@
 // The preferences in this category are deprecated and have no effect. They should
 // be removed when it is considered safe to do so.
 
+- (void)setCSSShadowPartsEnabled:(BOOL)flag;
+- (BOOL)cssShadowPartsEnabled;
+
 - (void)setIsSecureContextAttributeEnabled:(BOOL)flag;
 - (BOOL)isSecureContextAttributeEnabled;
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (267171 => 267172)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-09-16 23:56:04 UTC (rev 267172)
@@ -3381,7 +3381,6 @@
     settings.setLinkPreloadResponsiveImagesEnabled([preferences linkPreloadResponsiveImagesEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setDialogElementEnabled([preferences dialogElementEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setKeygenElementEnabled([preferences keygenElementEnabled]);
-    RuntimeEnabledFeatures::sharedFeatures().setCSSShadowPartsEnabled([preferences cssShadowPartsEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setLayoutFormattingContextIntegrationEnabled([preferences layoutFormattingContextIntegrationEnabled]);
     settings.setIsInAppBrowserPrivacyEnabled([preferences isInAppBrowserPrivacyEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setWebSQLDisabled(![preferences webSQLEnabled]);

Modified: trunk/Tools/ChangeLog (267171 => 267172)


--- trunk/Tools/ChangeLog	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Tools/ChangeLog	2020-09-16 23:56:04 UTC (rev 267172)
@@ -1,3 +1,16 @@
+2020-09-16  Sam Weinig  <wei...@apple.com>
+
+        Remove runtime setting for enabling/disabling CSS shadow parts
+        https://bugs.webkit.org/show_bug.cgi?id=216567
+
+        Reviewed by Tim Horton.
+
+        Remove runtime setting for enabling/disabling CSS shadow parts. It is
+        on by default and there is no known reason one would need to disable it.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (enableExperimentalFeatures):
+
 2020-09-16  Stephan Szabo  <stephan.sz...@sony.com>
 
         Remove ENABLE_METER_ELEMENT

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (267171 => 267172)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-09-16 23:54:34 UTC (rev 267171)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-09-16 23:56:04 UTC (rev 267172)
@@ -836,7 +836,6 @@
     [preferences setMediaRecorderEnabled:YES];
     [preferences setReferrerPolicyAttributeEnabled:YES];
     [preferences setLinkPreloadResponsiveImagesEnabled:YES];
-    [preferences setCSSShadowPartsEnabled:YES];
     [preferences setAspectRatioOfImgFromWidthAndHeightEnabled:YES];
     [preferences setCSSOMViewSmoothScrollingEnabled:YES];
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to