Diff
Modified: trunk/Source/WTF/ChangeLog (285574 => 285575)
--- trunk/Source/WTF/ChangeLog 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WTF/ChangeLog 2021-11-10 15:11:20 UTC (rev 285575)
@@ -1,3 +1,12 @@
+2021-11-10 Tim Nguyen <[email protected]>
+
+ Migrate DialogElementEnabled from RuntimeFlags to Settings
+ https://bugs.webkit.org/show_bug.cgi?id=232926
+
+ Reviewed by Youenn Fablet.
+
+ * Scripts/Preferences/WebPreferencesExperimental.yaml:
+
2021-11-10 Antti Koivisto <[email protected]>
Hasher should be able to hash pointers
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (285574 => 285575)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2021-11-10 15:11:20 UTC (rev 285575)
@@ -440,8 +440,6 @@
type: bool
humanReadableName: "Dialog Element"
humanReadableDescription: "Enable the Dialog Element"
- webKitLegacyPreferenceKey: WebKitDialogElementEnabledPreferenceKey
- webcoreBinding: RuntimeEnabledFeatures
defaultValue:
WebKitLegacy:
default: true
Modified: trunk/Source/WebCore/ChangeLog (285574 => 285575)
--- trunk/Source/WebCore/ChangeLog 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/ChangeLog 2021-11-10 15:11:20 UTC (rev 285575)
@@ -1,3 +1,30 @@
+2021-11-10 Tim Nguyen <[email protected]>
+
+ Migrate DialogElementEnabled from RuntimeFlags to Settings
+ https://bugs.webkit.org/show_bug.cgi?id=232926
+
+ Reviewed by Youenn Fablet.
+
+ * html/HTMLDialogElement.idl:
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::formMethod const):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::submit):
+ (WebCore::HTMLFormElement::parseAttribute):
+ (WebCore::HTMLFormElement::method const):
+ * html/HTMLTagNames.in:
+ * loader/FormSubmission.cpp:
+ (WebCore::FormSubmission::Attributes::methodString):
+ (WebCore::FormSubmission::Attributes::parseMethodType):
+ (WebCore::FormSubmission::Attributes::updateMethodType):
+ (WebCore::FormSubmission::create):
+ * loader/FormSubmission.h:
+ * page/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): Deleted.
+ (WebCore::RuntimeEnabledFeatures::dialogElementEnabled const): Deleted.
+ * style/UserAgentStyle.cpp:
+ (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
+
2021-11-10 Antti Koivisto <[email protected]>
Use Hasher for hashing MatchResult for MatchedDeclarationsCache
Modified: trunk/Source/WebCore/html/HTMLDialogElement.idl (285574 => 285575)
--- trunk/Source/WebCore/html/HTMLDialogElement.idl 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/html/HTMLDialogElement.idl 2021-11-10 15:11:20 UTC (rev 285575)
@@ -24,8 +24,8 @@
*/
[
+ EnabledBySetting=DialogElementEnabled,
Exposed=Window,
- EnabledAtRuntime=DialogElementEnabled,
] interface HTMLDialogElement : HTMLElement {
[CEReactions, Reflect] attribute boolean open;
attribute DOMString returnValue;
Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (285574 => 285575)
--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp 2021-11-10 15:11:20 UTC (rev 285575)
@@ -99,7 +99,8 @@
auto& formMethodAttr = attributeWithoutSynchronization(formmethodAttr);
if (formMethodAttr.isNull())
return emptyString();
- return FormSubmission::Attributes::methodString(FormSubmission::Attributes::parseMethodType(formMethodAttr));
+ bool dialogElementEnabled = document().settings().dialogElementEnabled();
+ return FormSubmission::Attributes::methodString(FormSubmission::Attributes::parseMethodType(formMethodAttr, dialogElementEnabled), dialogElementEnabled);
}
void HTMLFormControlElement::setFormMethod(const String& value)
Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (285574 => 285575)
--- trunk/Source/WebCore/html/HTMLFormElement.cpp 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp 2021-11-10 15:11:20 UTC (rev 285575)
@@ -54,7 +54,6 @@
#include "Page.h"
#include "RadioNodeList.h"
#include "RenderTextControl.h"
-#include "RuntimeEnabledFeatures.h"
#include "ScriptDisallowedScope.h"
#include "Settings.h"
#include "SubmitEvent.h"
@@ -437,8 +436,8 @@
m_plannedFormSubmission->cancel();
m_plannedFormSubmission = formSubmission;
-
- if (RuntimeEnabledFeatures::sharedFeatures().dialogElementEnabled() && formSubmission->method() == FormSubmission::Method::Dialog)
+
+ if (document().settings().dialogElementEnabled() && formSubmission->method() == FormSubmission::Method::Dialog)
submitDialog(WTFMove(formSubmission));
else
frame->loader().submitForm(WTFMove(formSubmission));
@@ -531,7 +530,7 @@
} else if (name == targetAttr)
m_attributes.setTarget(value);
else if (name == methodAttr)
- m_attributes.updateMethodType(value);
+ m_attributes.updateMethodType(value, document().settings().dialogElementEnabled());
else if (name == enctypeAttr)
m_attributes.updateEncodingType(value);
else if (name == accept_charsetAttr)
@@ -738,7 +737,7 @@
String HTMLFormElement::method() const
{
- return FormSubmission::Attributes::methodString(m_attributes.method());
+ return FormSubmission::Attributes::methodString(m_attributes.method(), document().settings().dialogElementEnabled());
}
void HTMLFormElement::setMethod(const String& value)
Modified: trunk/Source/WebCore/html/HTMLTagNames.in (285574 => 285575)
--- trunk/Source/WebCore/html/HTMLTagNames.in 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/html/HTMLTagNames.in 2021-11-10 15:11:20 UTC (rev 285575)
@@ -39,7 +39,7 @@
del interfaceName=HTMLModElement
details
dfn interfaceName=HTMLElement
-dialog interfaceName=HTMLDialogElement, runtimeEnabled=dialogElement
+dialog interfaceName=HTMLDialogElement, settingsConditional=dialogElementEnabled
dir interfaceName=HTMLDirectoryElement
div
dl interfaceName=HTMLDListElement
Modified: trunk/Source/WebCore/loader/FormSubmission.cpp (285574 => 285575)
--- trunk/Source/WebCore/loader/FormSubmission.cpp 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/loader/FormSubmission.cpp 2021-11-10 15:11:20 UTC (rev 285575)
@@ -85,9 +85,9 @@
url.setQuery(makeString(query, '&', body));
}
-ASCIILiteral FormSubmission::Attributes::methodString(Method method)
+ASCIILiteral FormSubmission::Attributes::methodString(Method method, bool dialogElementEnabled)
{
- if (RuntimeEnabledFeatures::sharedFeatures().dialogElementEnabled() && method == Method::Dialog)
+ if (dialogElementEnabled && method == Method::Dialog)
return "dialog"_s;
return method == Method::Post ? "post"_s : "get"_s;
}
@@ -113,9 +113,9 @@
m_isMultiPartForm = (m_encodingType == "multipart/form-data");
}
-FormSubmission::Method FormSubmission::Attributes::parseMethodType(const String& type)
+FormSubmission::Method FormSubmission::Attributes::parseMethodType(const String& type, bool dialogElementEnabled)
{
- if (RuntimeEnabledFeatures::sharedFeatures().dialogElementEnabled() && equalLettersIgnoringASCIICase(type, "dialog"))
+ if (dialogElementEnabled && equalLettersIgnoringASCIICase(type, "dialog"))
return FormSubmission::Method::Dialog;
if (equalLettersIgnoringASCIICase(type, "post"))
@@ -124,9 +124,9 @@
return FormSubmission::Method::Get;
}
-void FormSubmission::Attributes::updateMethodType(const String& type)
+void FormSubmission::Attributes::updateMethodType(const String& type, bool dialogElementEnabled)
{
- m_method = parseMethodType(type);
+ m_method = parseMethodType(type, dialogElementEnabled);
}
inline FormSubmission::FormSubmission(Method method, const String& returnValue, const URL& action, const String& target, const String& contentType, LockHistory lockHistory, Event* event)
@@ -179,7 +179,7 @@
if (!(attributeValue = submitter->attributeWithoutSynchronization(formenctypeAttr)).isNull())
copiedAttributes.updateEncodingType(attributeValue);
if (!(attributeValue = submitter->attributeWithoutSynchronization(formmethodAttr)).isNull())
- copiedAttributes.updateMethodType(attributeValue);
+ copiedAttributes.updateMethodType(attributeValue, form.document().settings().dialogElementEnabled());
if (!(attributeValue = submitter->attributeWithoutSynchronization(formtargetAttr)).isNull())
copiedAttributes.setTarget(attributeValue);
}
@@ -188,7 +188,7 @@
auto encodingType = copiedAttributes.encodingType();
auto actionURL = document.completeURL(copiedAttributes.action().isEmpty() ? document.url().string() : copiedAttributes.action());
- if (RuntimeEnabledFeatures::sharedFeatures().dialogElementEnabled() && copiedAttributes.method() == Method::Dialog) {
+ if (document.settings().dialogElementEnabled() && copiedAttributes.method() == Method::Dialog) {
String returnValue = submitter ? submitter->resultForDialogSubmit() : emptyString();
return adoptRef(*new FormSubmission(copiedAttributes.method(), returnValue, actionURL, form.effectiveTarget(event, submitter.get()), encodingType, lockHistory, event));
}
Modified: trunk/Source/WebCore/loader/FormSubmission.h (285574 => 285575)
--- trunk/Source/WebCore/loader/FormSubmission.h 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/loader/FormSubmission.h 2021-11-10 15:11:20 UTC (rev 285575)
@@ -33,7 +33,6 @@
#include "FormState.h"
#include "FrameLoaderTypes.h"
#include "ReferrerPolicy.h"
-#include "RuntimeEnabledFeatures.h"
#include <wtf/URL.h>
#include <wtf/WeakPtr.h>
@@ -51,9 +50,9 @@
class Attributes {
public:
Method method() const { return m_method; }
- static Method parseMethodType(const String&);
- void updateMethodType(const String&);
- static ASCIILiteral methodString(Method);
+ static Method parseMethodType(const String&, bool);
+ void updateMethodType(const String&, bool);
+ static ASCIILiteral methodString(Method, bool);
const String& action() const { return m_action; }
void parseAction(const String&);
Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (285574 => 285575)
--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2021-11-10 15:11:20 UTC (rev 285575)
@@ -131,9 +131,6 @@
void setWebSQLEnabled(bool isEnabled) { m_webSQLEnabled = isEnabled; }
bool webSQLEnabled() const { return m_webSQLEnabled; }
- void setDialogElementEnabled(bool isEnabled) { m_dialogElementEnabled = isEnabled; }
- bool dialogElementEnabled() const { return m_dialogElementEnabled; }
-
void setKeygenElementEnabled(bool isEnabled) { m_keygenElementEnabled = isEnabled; }
bool keygenElementEnabled() const { return m_keygenElementEnabled; }
@@ -292,7 +289,6 @@
bool m_attrStyleEnabled { false };
bool m_webAPIStatisticsEnabled { false };
bool m_syntheticEditingCommandsEnabled { true };
- bool m_dialogElementEnabled { true };
bool m_webSQLEnabled { false };
bool m_keygenElementEnabled { false };
bool m_pageAtRuleSupportEnabled { false };
Modified: trunk/Source/WebCore/style/UserAgentStyle.cpp (285574 => 285575)
--- trunk/Source/WebCore/style/UserAgentStyle.cpp 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebCore/style/UserAgentStyle.cpp 2021-11-10 15:11:20 UTC (rev 285575)
@@ -51,7 +51,6 @@
#include "Quirks.h"
#include "RenderTheme.h"
#include "RuleSetBuilder.h"
-#include "RuntimeEnabledFeatures.h"
#include "SVGElement.h"
#include "StyleSheetContents.h"
#include "UserAgentStyleSheets.h"
@@ -169,8 +168,7 @@
plugInsStyleSheet = parseUASheet(plugInsRules);
addToDefaultStyle(*plugInsStyleSheet);
}
- }
- else if (is<HTMLDialogElement>(element) && RuntimeEnabledFeatures::sharedFeatures().dialogElementEnabled()) {
+ } else if (is<HTMLDialogElement>(element) && element.document().settings().dialogElementEnabled()) {
if (!dialogStyleSheet) {
dialogStyleSheet = parseUASheet(StringImpl::createWithoutCopying(dialogUserAgentStyleSheet, sizeof(dialogUserAgentStyleSheet)));
addToDefaultStyle(*dialogStyleSheet);
Modified: trunk/Source/WebKit/ChangeLog (285574 => 285575)
--- trunk/Source/WebKit/ChangeLog 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebKit/ChangeLog 2021-11-10 15:11:20 UTC (rev 285575)
@@ -1,3 +1,15 @@
+2021-11-10 Tim Nguyen <[email protected]>
+
+ Migrate DialogElementEnabled from RuntimeFlags to Settings
+ https://bugs.webkit.org/show_bug.cgi?id=232926
+
+ Reviewed by Youenn Fablet.
+
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetDialogElementEnabled): Deleted.
+ (WKPreferencesGetDialogElementEnabled): Deleted.
+ * UIProcess/API/C/WKPreferencesRefPrivate.h:
+
2021-11-10 Sihui Liu <[email protected]>
Perform FileSystemSyncAccessHandle operations in web process
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (285574 => 285575)
--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp 2021-11-10 15:11:20 UTC (rev 285575)
@@ -1592,16 +1592,6 @@
return toImpl(preferencesRef)->customPasteboardDataEnabled();
}
-void WKPreferencesSetDialogElementEnabled(WKPreferencesRef preferencesRef, bool flag)
-{
- toImpl(preferencesRef)->setDialogElementEnabled(flag);
-}
-
-bool WKPreferencesGetDialogElementEnabled(WKPreferencesRef preferencesRef)
-{
- return toImpl(preferencesRef)->dialogElementEnabled();
-}
-
void WKPreferencesSetKeygenElementEnabled(WKPreferencesRef preferencesRef, bool flag)
{
toImpl(preferencesRef)->setKeygenElementEnabled(flag);
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h (285574 => 285575)
--- trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h 2021-11-10 15:11:20 UTC (rev 285575)
@@ -447,10 +447,6 @@
WK_EXPORT bool WKPreferencesGetCustomPasteboardDataEnabled(WKPreferencesRef);
// Defaults to false
-WK_EXPORT void WKPreferencesSetDialogElementEnabled(WKPreferencesRef, bool flag);
-WK_EXPORT bool WKPreferencesGetDialogElementEnabled(WKPreferencesRef);
-
-// Defaults to false
WK_EXPORT void WKPreferencesSetKeygenElementEnabled(WKPreferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetKeygenElementEnabled(WKPreferencesRef);
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (285574 => 285575)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2021-11-10 15:11:20 UTC (rev 285575)
@@ -1,3 +1,16 @@
+2021-11-10 Tim Nguyen <[email protected]>
+
+ Migrate DialogElementEnabled from RuntimeFlags to Settings
+ https://bugs.webkit.org/show_bug.cgi?id=232926
+
+ Reviewed by Youenn Fablet.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences dialogElementEnabled]): Deleted.
+ (-[WebPreferences setDialogElementEnabled:]): Deleted.
+ * WebView/WebPreferencesPrivate.h:
+
2021-11-09 Commit Queue <[email protected]>
Unreviewed, reverting r285536.
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (285574 => 285575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2021-11-10 15:11:20 UTC (rev 285575)
@@ -273,7 +273,6 @@
#define WebKitCoreMathMLEnabledPreferenceKey @"WebKitCoreMathMLEnabled"
#define WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey @"WebKitLinkPreloadResponsiveImagesEnabled"
#define WebKitRemotePlaybackEnabledPreferenceKey @"WebKitRemotePlaybackEnabled"
-#define WebKitDialogElementEnabledPreferenceKey @"WebKitDialogElementEnabledPreferenceKey"
#define WebKitReadableByteStreamAPIEnabledPreferenceKey @"WebKitReadableByteStreamAPIEnabled"
#define WebKitTransformStreamAPIEnabledPreferenceKey @"WebKitTransformStreamAPIEnabled"
#define WebKitMediaRecorderEnabledPreferenceKey @"WebKitMediaRecorderEnabled"
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (285574 => 285575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2021-11-10 15:11:20 UTC (rev 285575)
@@ -3289,16 +3289,6 @@
[self _setBoolValue:remotePlaybackEnabled forKey:WebKitRemotePlaybackEnabledPreferenceKey];
}
-- (BOOL)dialogElementEnabled
-{
- return [self _boolValueForKey:WebKitDialogElementEnabledPreferenceKey];
-}
-
-- (void)setDialogElementEnabled:(BOOL)flag
-{
- [self _setBoolValue:flag forKey:WebKitDialogElementEnabledPreferenceKey];
-}
-
- (BOOL)readableByteStreamAPIEnabled
{
return [self _boolValueForKey:WebKitReadableByteStreamAPIEnabledPreferenceKey];
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (285574 => 285575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2021-11-10 14:40:24 UTC (rev 285574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2021-11-10 15:11:20 UTC (rev 285575)
@@ -347,7 +347,6 @@
@property (nonatomic) BOOL coreMathMLEnabled;
@property (nonatomic) BOOL linkPreloadResponsiveImagesEnabled;
@property (nonatomic) BOOL remotePlaybackEnabled;
-@property (nonatomic) BOOL dialogElementEnabled;
@property (nonatomic) BOOL readableByteStreamAPIEnabled;
@property (nonatomic) BOOL transformStreamAPIEnabled;
@property (nonatomic) BOOL mediaRecorderEnabled;