Changeset 267095 in webkit


Ignore:
Timestamp:
Sep 15, 2020 12:43:40 PM (4 years ago)
Author:
weinig@apple.com
Message:

Remove runtime setting for enabling/disabling custom elements
https://bugs.webkit.org/show_bug.cgi?id=216518

Reviewed by Tim Horton.

Remove runtime setting for enabling/disabling custom elements. There is no
reason one need to disable it now, and it has been on by default for
a long enough time.

Source/WebCore:

  • dom/CustomElementRegistry.idl:
  • dom/Document.cpp:

(WebCore::createUpgradeCandidateElement):

  • page/DOMWindow.idl:
  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences setCustomElementsEnabled:]):
(-[WebPreferences customElementsEnabled]):

  • WebView/WebPreferencesPrivate.h:

Source/WebKitLegacy/win:

  • WebPreferences.cpp:

(WebPreferences::customElementsEnabled):
(WebPreferences::setCustomElementsEnabled):

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r267094 r267095  
     12020-09-15  Sam Weinig  <weinig@apple.com>
     2
     3        Remove runtime setting for enabling/disabling custom elements
     4        https://bugs.webkit.org/show_bug.cgi?id=216518
     5
     6        Reviewed by Tim Horton.
     7
     8        Remove runtime setting for enabling/disabling custom elements. There is no
     9        reason one need to disable it now, and it has been on by default for
     10        a long enough time.
     11
     12        * dom/CustomElementRegistry.idl:
     13        * dom/Document.cpp:
     14        (WebCore::createUpgradeCandidateElement):
     15        * page/DOMWindow.idl:
     16        * page/Settings.yaml:
     17
    1182020-09-15  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/dom/CustomElementRegistry.idl

    r266360 r267095  
    2525
    2626[
    27     EnabledBySetting=CustomElements,
    2827    GenerateIsReachable=ImplScriptExecutionContext,
    2928    JSGenerateToNativeObject,
  • trunk/Source/WebCore/dom/Document.cpp

    r266991 r267095  
    951951static ALWAYS_INLINE Ref<HTMLElement> createUpgradeCandidateElement(Document& document, const QualifiedName& name)
    952952{
    953     if (!document.settings().customElementsEnabled()
    954         || Document::validateCustomElementName(name.localName()) != CustomElementNameValidationStatus::Valid)
     953    if (Document::validateCustomElementName(name.localName()) != CustomElementNameValidationStatus::Valid)
    955954        return HTMLUnknownElement::create(name, document);
    956955
  • trunk/Source/WebCore/page/DOMWindow.idl

    r266706 r267095  
    5858    [DoNotCheckSecurity, PutForwards=href, LegacyUnforgeable] readonly attribute Location location;
    5959    readonly attribute History history;
    60     [EnabledBySetting=CustomElements, ImplementedAs=ensureCustomElementRegistry] readonly attribute CustomElementRegistry customElements;
     60    [ImplementedAs=ensureCustomElementRegistry] readonly attribute CustomElementRegistry customElements;
    6161    [Replaceable] readonly attribute BarProp locationbar;
    6262    [Replaceable] readonly attribute BarProp menubar;
  • trunk/Source/WebCore/page/Settings.yaml

    r266931 r267095  
    10031003  initial: true
    10041004
    1005 customElementsEnabled:
    1006   initial: true
    1007 
    10081005dataTransferItemsEnabled:
    10091006  initial: false
  • trunk/Source/WebKit/ChangeLog

    r267092 r267095  
     12020-09-15  Sam Weinig  <weinig@apple.com>
     2
     3        Remove runtime setting for enabling/disabling custom elements
     4        https://bugs.webkit.org/show_bug.cgi?id=216518
     5
     6        Reviewed by Tim Horton.
     7
     8        Remove runtime setting for enabling/disabling custom elements. There is no
     9        reason one need to disable it now, and it has been on by default for
     10        a long enough time.
     11
     12        * Shared/WebPreferences.yaml:
     13
    1142020-09-15  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r267069 r267095  
    812812
    813813AnimatedImageAsyncDecodingEnabled:
    814   type: bool
    815   defaultValue: true
    816 
    817 CustomElementsEnabled:
    818814  type: bool
    819815  defaultValue: true
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r267069 r267095  
     12020-09-15  Sam Weinig  <weinig@apple.com>
     2
     3        Remove runtime setting for enabling/disabling custom elements
     4        https://bugs.webkit.org/show_bug.cgi?id=216518
     5
     6        Reviewed by Tim Horton.
     7
     8        Remove runtime setting for enabling/disabling custom elements. There is no
     9        reason one need to disable it now, and it has been on by default for
     10        a long enough time.
     11
     12        * WebView/WebPreferenceKeysPrivate.h:
     13        * WebView/WebPreferences.mm:
     14        (+[WebPreferences initialize]):
     15        (-[WebPreferences setCustomElementsEnabled:]):
     16        (-[WebPreferences customElementsEnabled]):
     17        * WebView/WebPreferencesPrivate.h:
     18
    1192020-09-14  Sam Weinig  <weinig@apple.com>
    220
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h

    r267069 r267095  
    178178#define WebKitServiceControlsEnabledPreferenceKey @"WebKitServiceControlsEnabled"
    179179#define WebKitMediaKeysStorageDirectoryKey @"WebKitMediaKeysStorageDirectory"
    180 #define WebKitCustomElementsEnabledPreferenceKey @"WebKitCustomElementsEnabled"
    181180#define WebKitDataTransferItemsEnabledPreferenceKey @"WebKitDataTransferItemsEnabled"
    182181#define WebKitCustomPasteboardDataEnabledPreferenceKey @"WebKitCustomPasteboardDataEnabled"
     
    296295#define WebKitShadowDOMEnabledPreferenceKey @"WebKitShadowDOMEnabled"
    297296#define WebKitHixie76WebSocketProtocolEnabledKey @"WebKitHixie76WebSocketProtocolEnabled"
     297#define WebKitCustomElementsEnabledPreferenceKey @"WebKitCustomElementsEnabled"
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm

    r267069 r267095  
    632632        @YES, WebKitMediaCaptureRequiresSecureConnectionPreferenceKey,
    633633#endif
    634         @YES, WebKitCustomElementsEnabledPreferenceKey,
    635634        @YES, WebKitDataTransferItemsEnabledPreferenceKey,
    636635        @NO, WebKitCustomPasteboardDataEnabledPreferenceKey,
     
    30493048}
    30503049
    3051 - (BOOL)customElementsEnabled
    3052 {
    3053     return [self _boolValueForKey:WebKitCustomElementsEnabledPreferenceKey];
    3054 }
    3055 
    3056 - (void)setCustomElementsEnabled:(BOOL)flag
    3057 {
    3058     [self _setBoolValue:flag forKey:WebKitCustomElementsEnabledPreferenceKey];
    3059 }
    3060 
    30613050- (BOOL)dataTransferItemsEnabled
    30623051{
     
    37243713}
    37253714
     3715- (void)setCustomElementsEnabled:(BOOL)flag
     3716{
     3717}
     3718
     3719- (BOOL)customElementsEnabled
     3720{
     3721    return YES;
     3722}
     3723
    37263724- (void)setVideoPluginProxyEnabled:(BOOL)flag
    37273725{
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h

    r267069 r267095  
    537537- (void)setMediaCaptureRequiresSecureConnection:(BOOL)flag;
    538538- (BOOL)mediaCaptureRequiresSecureConnection;
    539 
    540 - (void)setCustomElementsEnabled:(BOOL)flag;
    541 - (BOOL)customElementsEnabled;
    542539
    543540- (void)setDataTransferItemsEnabled:(BOOL)flag;
     
    706703- (BOOL)shadowDOMEnabled;
    707704
     705- (void)setCustomElementsEnabled:(BOOL)flag;
     706- (BOOL)customElementsEnabled;
     707
    708708- (void)setVideoPluginProxyEnabled:(BOOL)flag;
    709709- (BOOL)isVideoPluginProxyEnabled;
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r267069 r267095  
    33263326    RuntimeEnabledFeatures::sharedFeatures().setHighlightAPIEnabled([preferences highlightAPIEnabled]);
    33273327
    3328     settings.setCustomElementsEnabled([preferences customElementsEnabled]);
    33293328    settings.setDataTransferItemsEnabled([preferences dataTransferItemsEnabled]);
    33303329    RuntimeEnabledFeatures::sharedFeatures().setCustomPasteboardDataEnabled([preferences customPasteboardDataEnabled]);
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r267069 r267095  
     12020-09-15  Sam Weinig  <weinig@apple.com>
     2
     3        Remove runtime setting for enabling/disabling custom elements
     4        https://bugs.webkit.org/show_bug.cgi?id=216518
     5
     6        Reviewed by Tim Horton.
     7
     8        Remove runtime setting for enabling/disabling custom elements. There is no
     9        reason one need to disable it now, and it has been on by default for
     10        a long enough time.
     11
     12        * WebPreferences.cpp:
     13        (WebPreferences::customElementsEnabled):
     14        (WebPreferences::setCustomElementsEnabled):
     15        * WebView.cpp:
     16        (WebView::notifyPreferencesChanged):
     17
    1182020-09-14  Sam Weinig  <weinig@apple.com>
    219
  • trunk/Source/WebKitLegacy/win/WebPreferences.cpp

    r267069 r267095  
    20782078    if (!enabled)
    20792079        return E_POINTER;
    2080     *enabled = boolValueForKey(WebKitCustomElementsEnabledPreferenceKey);
    2081     return S_OK;
    2082 }
    2083 
    2084 HRESULT WebPreferences::setCustomElementsEnabled(BOOL enabled)
    2085 {
    2086     setBoolValue(WebKitCustomElementsEnabledPreferenceKey, enabled);
     2080    *enabled = true;
     2081    return S_OK;
     2082}
     2083
     2084HRESULT WebPreferences::setCustomElementsEnabled(BOOL)
     2085{
    20872086    return S_OK;
    20882087}
  • trunk/Source/WebKitLegacy/win/WebView.cpp

    r267069 r267095  
    52355235    RuntimeEnabledFeatures::sharedFeatures().setFetchAPIEnabled(!!enabled);
    52365236
    5237     hr = prefsPrivate->customElementsEnabled(&enabled);
    5238     if (FAILED(hr))
    5239         return hr;
    5240     settings.setCustomElementsEnabled(!!enabled);
    5241 
    52425237    hr = prefsPrivate->menuItemElementEnabled(&enabled);
    52435238    if (FAILED(hr))
  • trunk/Tools/ChangeLog

    r267093 r267095  
     12020-09-15  Sam Weinig  <weinig@apple.com>
     2
     3        Remove runtime setting for enabling/disabling custom elements
     4        https://bugs.webkit.org/show_bug.cgi?id=216518
     5
     6        Reviewed by Tim Horton.
     7
     8        Remove runtime setting for enabling/disabling custom elements. There is no
     9        reason one need to disable it now, and it has been on by default for
     10        a long enough time.
     11
     12        * DumpRenderTree/mac/DumpRenderTree.mm:
     13        (resetWebPreferencesToConsistentValues):
     14        * DumpRenderTree/win/DumpRenderTree.cpp:
     15        (resetWebPreferencesToConsistentValues):
     16
    1172020-09-15  Jonathan Bedard  <jbedard@apple.com>
    218
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r267069 r267095  
    936936    [preferences setSourceBufferChangeTypeEnabled:YES];
    937937
    938     [preferences setCustomElementsEnabled:YES];
    939 
    940938    [preferences setDataTransferItemsEnabled:YES];
    941939    [preferences setCustomPasteboardDataEnabled:YES];
  • trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r267069 r267095  
    899899
    900900    prefsPrivate->setFetchAPIEnabled(TRUE);
    901     prefsPrivate->setCustomElementsEnabled(TRUE);
    902901    prefsPrivate->setResourceTimingEnabled(TRUE);
    903902    prefsPrivate->setUserTimingEnabled(TRUE);
Note: See TracChangeset for help on using the changeset viewer.