Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove display:contents feature flag
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:]):


Canonical link: https://commits.webkit.org/218484@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
anttijk committed Dec 16, 2019
1 parent 205e691 commit dd252cd
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 46 deletions.
15 changes: 15 additions & 0 deletions Source/WebCore/ChangeLog
@@ -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
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/page/RuntimeEnabledFeatures.h
Expand Up @@ -47,9 +47,6 @@ class RuntimeEnabledFeatures {
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; }

Expand Down Expand Up @@ -407,7 +404,6 @@ class RuntimeEnabledFeatures {
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 };
Expand Down
6 changes: 0 additions & 6 deletions Source/WebCore/style/StyleAdjuster.cpp
Expand Up @@ -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);
Expand Down
13 changes: 13 additions & 0 deletions Source/WebKit/ChangeLog
@@ -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
Expand Down
7 changes: 0 additions & 7 deletions Source/WebKit/Shared/WebPreferences.yaml
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Expand Up @@ -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);
Expand Down
6 changes: 1 addition & 5 deletions Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
Expand Up @@ -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);
Expand Down
16 changes: 16 additions & 0 deletions Source/WebKitLegacy/mac/ChangeLog
@@ -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()
Expand Down
1 change: 0 additions & 1 deletion Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Expand Up @@ -256,7 +256,6 @@
#define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled"
#define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled"
#define WebKitMenuItemElementEnabledPreferenceKey @"WebKitMenuItemElementEnabled"
#define WebKitDisplayContentsEnabledPreferenceKey @"WebKitDisplayContentsEnabled"
#define WebKitUserTimingEnabledPreferenceKey @"WebKitUserTimingEnabled"
#define WebKitResourceTimingEnabledPreferenceKey @"WebKitResourceTimingEnabled"
#define WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey @"WebKitMediaContentTypesRequiringHardwareSupport"
Expand Down
11 changes: 0 additions & 11 deletions Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Expand Up @@ -679,7 +679,6 @@ + (void)initialize
#if ENABLE(INTERSECTION_OBSERVER)
@NO, WebKitIntersectionObserverEnabledPreferenceKey,
#endif
@YES, WebKitDisplayContentsEnabledPreferenceKey,
@NO, WebKitUserTimingEnabledPreferenceKey,
@NO, WebKitResourceTimingEnabledPreferenceKey,
@NO, WebKitMediaUserGestureInheritsFromDocument,
Expand Down Expand Up @@ -3271,16 +3270,6 @@ - (void)setMenuItemElementEnabled:(BOOL)flag
[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];
Expand Down
1 change: 0 additions & 1 deletion Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Source/WebKitLegacy/mac/WebView/WebView.mm
Expand Up @@ -3177,7 +3177,6 @@ - (void)_preferencesChanged:(WebPreferences *)preferences
#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);
Expand Down

0 comments on commit dd252cd

Please sign in to comment.