Source/WebCore/ChangeLog

 12020-09-16 Sam Weinig <weinig@apple.com>
 2
 3 Remove runtime setting for enabling/disabling CSS shadow parts
 4 https://bugs.webkit.org/show_bug.cgi?id=216567
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Remove runtime setting for enabling/disabling CSS shadow parts. It is
 9 on by default and there is no known reason one would need to disable it.
 10
 11 * css/CSSSelector.cpp:
 12 (WebCore::CSSSelector::parsePseudoElementType):
 13 * dom/Element.cpp:
 14 (WebCore::Element::partAttributeChanged):
 15 * dom/Element.idl:
 16 * dom/ShadowRoot.cpp:
 17 (WebCore::parsePartMappingsList):
 18 * page/RuntimeEnabledFeatures.h:
 19 (WebCore::RuntimeEnabledFeatures::setCSSShadowPartsEnabled): Deleted.
 20 (WebCore::RuntimeEnabledFeatures::cssShadowPartsEnabled const): Deleted.
 21 * style/StyleInvalidator.cpp:
 22 (WebCore::Style::Invalidator::invalidateShadowParts):
 23
1242020-09-16 Sam Weinig <weinig@apple.com>
225
326 Remove runtime setting for enabling/disabling the isSecureContext API?
267165

Source/WebCore/css/CSSSelector.cpp

@@CSSSelector::PseudoElementType CSSSelect
279279 if (type == PseudoElementHighlight && !RuntimeEnabledFeatures::sharedFeatures().highlightAPIEnabled())
280280 return PseudoElementUnknown;
281281
282  if (type == PseudoElementPart && !RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
283  return PseudoElementUnknown;
284 
285282 return type;
286283}
287284
267165

Source/WebCore/dom/Element.cpp

@@void Element::classAttributeChanged(cons
18811881
18821882void Element::partAttributeChanged(const AtomString& newValue)
18831883{
1884  if (!RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
1885  return;
1886 
18871884 bool hasParts = isNonEmptyTokenList(newValue);
18881885 if (hasParts || !partNames().isEmpty()) {
18891886 auto newParts = hasParts ? SpaceSplitString(newValue, false) : SpaceSplitString();
267165

Source/WebCore/dom/Element.idl

3434 [CEReactions, Reflect=class] attribute DOMString className;
3535 [PutForwards=value] readonly attribute DOMTokenList classList; // FIXME: Should be [SameObject].
3636 [CEReactions, Reflect, Unscopable] attribute DOMString slot;
37  [EnabledAtRuntime=CSSShadowParts, SameObject, PutForwards=value] readonly attribute DOMTokenList part;
 37 [SameObject, PutForwards=value] readonly attribute DOMTokenList part;
3838
3939 [DOMJIT=ReadDOM] boolean hasAttributes();
4040 readonly attribute NamedNodeMap attributes; // FIXME: Should be [SameObject].
267165

Source/WebCore/dom/ShadowRoot.cpp

@@static Optional<std::pair<AtomString, At
309309
310310static ShadowRoot::PartMappings parsePartMappingsList(StringView mappingsListString)
311311{
312  if (!RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
313  return { };
314 
315312 ShadowRoot::PartMappings mappings;
316313
317314 const auto end = mappingsListString.length();
267165

Source/WebCore/page/RuntimeEnabledFeatures.h

@@public:
252252 bool pageAtRuleSupportEnabled() const { return m_pageAtRuleSupportEnabled; }
253253 void setPageAtRuleSupportEnabled(bool isEnabled) { m_pageAtRuleSupportEnabled = isEnabled; }
254254
255  void setCSSShadowPartsEnabled(bool isEnabled) { m_isCSSShadowPartsEnabled = isEnabled; }
256  bool cssShadowPartsEnabled() const { return m_isCSSShadowPartsEnabled; }
257 
258255 WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
259256
260257#if HAVE(NSURLSESSION_WEBSOCKET)

@@private:
409406#endif
410407
411408 bool m_secureContextChecksEnabled { true };
412  bool m_isCSSShadowPartsEnabled { true };
413409
414410#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
415411 bool m_accessibilityIsolatedTree { false };
267165

Source/WebCore/style/StyleInvalidator.cpp

@@void Invalidator::invalidateStyleWithMat
301301
302302void Invalidator::invalidateShadowParts(ShadowRoot& shadowRoot)
303303{
304  if (!RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled())
305  return;
306 
307304 if (shadowRoot.mode() == ShadowRootMode::UserAgent)
308305 return;
309306
267165

Source/WebKit/ChangeLog

 12020-09-16 Sam Weinig <weinig@apple.com>
 2
 3 Remove runtime setting for enabling/disabling CSS shadow parts
 4 https://bugs.webkit.org/show_bug.cgi?id=216567
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Remove runtime setting for enabling/disabling CSS shadow parts. It is
 9 on by default and there is no known reason one would need to disable it.
 10
 11 * Shared/WebPreferences.yaml:
 12
1132020-09-16 Sam Weinig <weinig@apple.com>
214
315 Remove runtime setting for enabling/disabling the isSecureContext API?
267165

Source/WebKit/Shared/WebPreferences.yaml

@@FetchAPIKeepAliveEnabled:
15631563 webcoreBinding: RuntimeEnabledFeatures
15641564 webcoreName: fetchAPIKeepAliveEnabled
15651565
1566 CSSShadowPartsEnabled:
1567  type: bool
1568  defaultValue: true
1569  humanReadableName: "CSS Shadow Parts"
1570  humanReadableDescription: "Enable CSS Shadow Parts"
1571  category: experimental
1572  webcoreBinding: RuntimeEnabledFeatures
1573 
15741566GenericCueAPIEnabled:
15751567 type: bool
15761568 defaultValue: true
267165

Source/WebKitLegacy/mac/ChangeLog

 12020-09-16 Sam Weinig <weinig@apple.com>
 2
 3 Remove runtime setting for enabling/disabling the isSecureContext API?
 4 https://bugs.webkit.org/show_bug.cgi?id=216562
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Remove runtime setting for enabling/disabling the the isSecureContext attribute.
 9 on window and the worker global scope. There is no known reason one would need
 10 to disable it.
 11
 12 * WebView/WebPreferenceKeysPrivate.h:
 13 * WebView/WebPreferences.mm:
 14 (+[WebPreferences initialize]):
 15 (-[WebPreferences setIsSecureContextAttributeEnabled:]):
 16 (-[WebPreferences isSecureContextAttributeEnabled]):
 17 * WebView/WebPreferencesPrivate.h:
 18 * WebView/WebView.mm:
 19 (-[WebView _preferencesChanged:]):
 20
 212020-09-16 Sam Weinig <weinig@apple.com>
 22
 23 Remove runtime setting for enabling/disabling CSS shadow parts
 24 https://bugs.webkit.org/show_bug.cgi?id=216567
 25
 26 Reviewed by NOBODY (OOPS!).
 27
 28 Remove runtime setting for enabling/disabling CSS shadow parts. It is
 29 on by default and there is no known reason one would need to disable it.
 30
 31 * WebView/WebPreferenceKeysPrivate.h:
 32 * WebView/WebPreferences.mm:
 33 (+[WebPreferences initialize]):
 34 (-[WebPreferences setCSSShadowPartsEnabled:]):
 35 (-[WebPreferences cssShadowPartsEnabled]):
 36 * WebView/WebPreferencesPrivate.h:
 37 * WebView/WebView.mm:
 38 (-[WebView _preferencesChanged:]):
 39
1402020-09-16 Sam Weinig <weinig@apple.com>
241
342 Remove runtime setting for enabling/disabling the isSecureContext API?
267165

Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h

205205#define WebKitPunchOutWhiteBackgroundsInDarkModePreferenceKey @"WebKitPunchOutWhiteBackgroundsInDarkMode"
206206#define WebKitFetchAPIKeepAliveEnabledPreferenceKey @"WebKitFetchAPIKeepAliveEnabled"
207207#define WebKitWebAnimationsCSSIntegrationEnabledPreferenceKey @"WebKitWebAnimationsCSSIntegrationEnabled"
208 #define WebKitCSSShadowPartsEnabledPreferenceKey @"WebKitCSSShadowPartsEnabled"
209208#define WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey @"WebKitLayoutFormattingContextIntegrationEnabled"
210209#define WebKitWebSQLEnabledPreferenceKey @"WebKitWebSQLEnabled"
211210#define WebKitUserGesturePromisePropagationEnabledPreferenceKey @"WebKitUserGesturePromisePropagationEnabled"

295294#define WebKitCustomElementsEnabledPreferenceKey @"WebKitCustomElementsEnabled"
296295#define WebKitFetchAPIEnabledPreferenceKey @"WebKitFetchAPIEnabled"
297296#define WebKitIsSecureContextAttributeEnabledPreferenceKey @"WebKitIsSecureContextAttributeEnabled"
 297#define WebKitCSSShadowPartsEnabledPreferenceKey @"WebKitCSSShadowPartsEnabled"
267165

Source/WebKitLegacy/mac/WebView/WebPreferences.mm

@@+ (void)initialize
711711 @NO, WebKitRequestIdleCallbackEnabledPreferenceKey,
712712 @NO, WebKitAsyncClipboardAPIEnabledPreferenceKey,
713713 @NO, WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey,
714  @YES, WebKitCSSShadowPartsEnabledPreferenceKey,
715714 @NO, WebKitDebugInAppBrowserPrivacyEnabledPreferenceKey,
716715 @NO, WebKitAspectRatioOfImgFromWidthAndHeightEnabledPreferenceKey,
717716 @(webSQLEnabled), WebKitWebSQLEnabledPreferenceKey,

@@- (void)setLinkPreloadResponsiveImagesEn
35873586 [self _setBoolValue:flag forKey:WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey];
35883587}
35893588
3590 - (BOOL)cssShadowPartsEnabled
3591 {
3592  return [self _boolValueForKey:WebKitCSSShadowPartsEnabledPreferenceKey];
3593 }
3594 
3595 - (void)setCSSShadowPartsEnabled:(BOOL)flag
3596 {
3597  [self _setBoolValue:flag forKey:WebKitCSSShadowPartsEnabledPreferenceKey];
3598 }
3599 
36003589- (BOOL)layoutFormattingContextIntegrationEnabled
36013590{
36023591 return [self _boolValueForKey:WebKitLayoutFormattingContextIntegrationEnabledPreferenceKey];

@@+ (NSString *)_concatenateKeyWithIBCreat
36813670// The preferences in this category are deprecated and have no effect. They should
36823671// be removed when it is considered safe to do so.
36833672
 3673- (void)setCSSShadowPartsEnabled:(BOOL)flag
 3674{
 3675}
 3676
 3677- (BOOL)cssShadowPartsEnabled
 3678{
 3679 return YES;
 3680}
 3681
36843682- (void)setIsSecureContextAttributeEnabled:(BOOL)flag
36853683{
36863684}
267165

Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h

@@@interface WebPreferences (WebPrivate)
621621- (void)setLinkPreloadResponsiveImagesEnabled:(BOOL)flag;
622622- (BOOL)linkPreloadResponsiveImagesEnabled;
623623
624 - (void)setCSSShadowPartsEnabled:(BOOL)flag;
625 - (BOOL)cssShadowPartsEnabled;
626 
627624- (void)setLayoutFormattingContextIntegrationEnabled:(BOOL)flag;
628625- (BOOL)layoutFormattingContextIntegrationEnabled;
629626

@@@interface WebPreferences (WebPrivateDep
695692// The preferences in this category are deprecated and have no effect. They should
696693// be removed when it is considered safe to do so.
697694
 695- (void)setCSSShadowPartsEnabled:(BOOL)flag;
 696- (BOOL)cssShadowPartsEnabled;
 697
698698- (void)setIsSecureContextAttributeEnabled:(BOOL)flag;
699699- (BOOL)isSecureContextAttributeEnabled;
700700
267165

Source/WebKitLegacy/mac/WebView/WebView.mm

@@- (void)_preferencesChanged:(WebPreferen
33813381 settings.setLinkPreloadResponsiveImagesEnabled([preferences linkPreloadResponsiveImagesEnabled]);
33823382 RuntimeEnabledFeatures::sharedFeatures().setDialogElementEnabled([preferences dialogElementEnabled]);
33833383 RuntimeEnabledFeatures::sharedFeatures().setKeygenElementEnabled([preferences keygenElementEnabled]);
3384  RuntimeEnabledFeatures::sharedFeatures().setCSSShadowPartsEnabled([preferences cssShadowPartsEnabled]);
33853384 RuntimeEnabledFeatures::sharedFeatures().setLayoutFormattingContextIntegrationEnabled([preferences layoutFormattingContextIntegrationEnabled]);
33863385 settings.setIsInAppBrowserPrivacyEnabled([preferences isInAppBrowserPrivacyEnabled]);
33873386 RuntimeEnabledFeatures::sharedFeatures().setWebSQLDisabled(![preferences webSQLEnabled]);
267165

Source/WebKitLegacy/win/ChangeLog

 12020-09-16 Sam Weinig <weinig@apple.com>
 2
 3 Remove runtime setting for enabling/disabling the isSecureContext API?
 4 https://bugs.webkit.org/show_bug.cgi?id=216562
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Remove runtime setting for enabling/disabling the the isSecureContext attribute.
 9 on window and the worker global scope. There is no known reason one would need
 10 to disable it.
 11
 12 * WebPreferences.cpp:
 13 (WebPreferences::initializeDefaultSettings):
 14 (WebPreferences::setIsSecureContextAttributeEnabled):
 15 (WebPreferences::isSecureContextAttributeEnabled):
 16 * WebView.cpp:
 17 (WebView::notifyPreferencesChanged):
 18
1192020-09-16 Sam Weinig <weinig@apple.com>
220
321 Remove runtime setting for enabling/disabling the isSecureContext API?
267165

Tools/ChangeLog

 12020-09-16 Sam Weinig <weinig@apple.com>
 2
 3 Remove runtime setting for enabling/disabling CSS shadow parts
 4 https://bugs.webkit.org/show_bug.cgi?id=216567
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Remove runtime setting for enabling/disabling CSS shadow parts. It is
 9 on by default and there is no known reason one would need to disable it.
 10
 11 * DumpRenderTree/mac/DumpRenderTree.mm:
 12 (enableExperimentalFeatures):
 13
1142020-09-16 Aakash Jain <aakash_jain@apple.com>
215
316 EWS emails to bot watchers about build failures should be grouped properly
267165

Tools/DumpRenderTree/mac/DumpRenderTree.mm

@@static void enableExperimentalFeatures(W
836836 [preferences setMediaRecorderEnabled:YES];
837837 [preferences setReferrerPolicyAttributeEnabled:YES];
838838 [preferences setLinkPreloadResponsiveImagesEnabled:YES];
839  [preferences setCSSShadowPartsEnabled:YES];
840839 [preferences setAspectRatioOfImgFromWidthAndHeightEnabled:YES];
841840 [preferences setCSSOMViewSmoothScrollingEnabled:YES];
842841}
267165