Diff
Modified: trunk/Source/WebCore/ChangeLog (237209 => 237210)
--- trunk/Source/WebCore/ChangeLog 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/ChangeLog 2018-10-16 23:59:38 UTC (rev 237210)
@@ -1,3 +1,22 @@
+2018-10-16 Sihui Liu <sihui_...@apple.com>
+
+ Add a switch for Web SQL
+ https://bugs.webkit.org/show_bug.cgi?id=190271
+
+ Reviewed by Ryosuke Niwa.
+
+ Web SQL is still enabled by default.
+
+ * Modules/webdatabase/DOMWindowWebDatabase.idl:
+ * Modules/webdatabase/Database.idl:
+ * Modules/webdatabase/SQLError.idl:
+ * Modules/webdatabase/SQLResultSet.idl:
+ * Modules/webdatabase/SQLResultSetRowList.idl:
+ * bindings/js/WebCoreBuiltinNames.h:
+ * page/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setWebSQLDisabled):
+ (WebCore::RuntimeEnabledFeatures::webSQLEnabled const):
+
2018-10-16 Chris Dumez <cdu...@apple.com>
window.performance should not become null after the window loses its browsing context
Modified: trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.idl (237209 => 237210)
--- trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.idl 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.idl 2018-10-16 23:59:38 UTC (rev 237210)
@@ -24,6 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+[
+ EnabledAtRuntime=WebSQL,
+]
partial interface DOMWindow {
[MayThrowException] Database? openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback? creationCallback);
};
Modified: trunk/Source/WebCore/Modules/webdatabase/Database.idl (237209 => 237210)
--- trunk/Source/WebCore/Modules/webdatabase/Database.idl 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.idl 2018-10-16 23:59:38 UTC (rev 237210)
@@ -27,7 +27,8 @@
*/
[
- ImplementationLacksVTable
+ ImplementationLacksVTable,
+ EnabledAtRuntime=WebSQL,
] interface Database {
readonly attribute DOMString version;
void changeVersion(DOMString oldVersion, DOMString newVersion, optional SQLTransactionCallback? callback, optional SQLTransactionErrorCallback? errorCallback, optional VoidCallback? successCallback);
Modified: trunk/Source/WebCore/Modules/webdatabase/SQLError.idl (237209 => 237210)
--- trunk/Source/WebCore/Modules/webdatabase/SQLError.idl 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLError.idl 2018-10-16 23:59:38 UTC (rev 237210)
@@ -27,7 +27,8 @@
*/
[
- ImplementationLacksVTable
+ ImplementationLacksVTable,
+ EnabledAtRuntime=WebSQL,
] interface SQLError {
readonly attribute unsigned long code;
readonly attribute DOMString message;
Modified: trunk/Source/WebCore/Modules/webdatabase/SQLResultSet.idl (237209 => 237210)
--- trunk/Source/WebCore/Modules/webdatabase/SQLResultSet.idl 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLResultSet.idl 2018-10-16 23:59:38 UTC (rev 237210)
@@ -27,7 +27,8 @@
*/
[
- ImplementationLacksVTable
+ ImplementationLacksVTable,
+ EnabledAtRuntime=WebSQL,
] interface SQLResultSet {
readonly attribute SQLResultSetRowList rows;
readonly attribute long long insertId;
Modified: trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl (237209 => 237210)
--- trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl 2018-10-16 23:59:38 UTC (rev 237210)
@@ -30,6 +30,7 @@
[
ImplementationLacksVTable,
+ EnabledAtRuntime=WebSQL,
] interface SQLResultSetRowList {
readonly attribute unsigned long length;
[MayThrowException] record<DOMString, SQLValue> item(unsigned long index);
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (237209 => 237210)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-10-16 23:59:38 UTC (rev 237210)
@@ -54,6 +54,7 @@
macro(CSSPaintWorkletGlobalScope) \
macro(CSSTransition) \
macro(CustomElementRegistry) \
+ macro(Database) \
macro(DataTransferItem) \
macro(DataTransferItemList) \
macro(DocumentTimeline) \
@@ -116,6 +117,10 @@
macro(PaymentRequest) \
macro(PaymentRequestUpdateEvent) \
macro(PaymentResponse) \
+ macro(SQLError) \
+ macro(SQLResultSet) \
+ macro(SQLResultSetRowList) \
+ macro(SQLTransaction) \
macro(PerformanceEntry) \
macro(PerformanceEntryList) \
macro(PerformanceMark) \
@@ -243,6 +248,7 @@
macro(makeThisTypeError) \
macro(matchingElementInFlatTree) \
macro(mediaStreamTrackConstraints) \
+ macro(openDatabase) \
macro(onvrdisplayactivate) \
macro(onvrdisplayblur) \
macro(onvrdisplayconnect) \
Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (237209 => 237210)
--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2018-10-16 23:59:38 UTC (rev 237210)
@@ -183,6 +183,9 @@
bool cssPaintingAPIEnabled() const { return m_CSSPaintingAPIEnabled; }
#endif
+ void setWebSQLDisabled(bool isDisabled) { m_webSQLEnabled = !isDisabled; }
+ bool webSQLEnabled() const { return m_webSQLEnabled; }
+
#if ENABLE(ATTACHMENT_ELEMENT)
void setAttachmentElementEnabled(bool areEnabled) { m_isAttachmentElementEnabled = areEnabled; }
bool attachmentElementEnabled() const { return m_isAttachmentElementEnabled; }
@@ -360,6 +363,7 @@
bool m_webAPIStatisticsEnabled { false };
bool m_CSSCustomPropertiesAndValuesEnabled { false };
bool m_pointerEventsEnabled { false };
+ bool m_webSQLEnabled { true };
#if ENABLE(CSS_PAINTING_API)
bool m_CSSPaintingAPIEnabled { false };
Modified: trunk/Source/WebKit/ChangeLog (237209 => 237210)
--- trunk/Source/WebKit/ChangeLog 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebKit/ChangeLog 2018-10-16 23:59:38 UTC (rev 237210)
@@ -1,3 +1,16 @@
+2018-10-16 Sihui Liu <sihui_...@apple.com>
+
+ Add a switch for Web SQL
+ https://bugs.webkit.org/show_bug.cgi?id=190271
+
+ Reviewed by Ryosuke Niwa.
+
+ * Shared/WebPreferences.yaml:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetWebSQLDisabled):
+ (WKPreferencesGetWebSQLDisabled):
+ * UIProcess/API/C/WKPreferencesRef.h:
+
2018-10-16 Alex Christensen <achristen...@webkit.org>
Remove InjectedBundleBackForwardList
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (237209 => 237210)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-10-16 23:59:38 UTC (rev 237210)
@@ -1321,6 +1321,14 @@
category: experimental
condition: ENABLE(CSS_PAINTING_API)
+WebSQLDisabled:
+ type: bool
+ defaultValue: false
+ humanReadableName: "Disable Web SQL"
+ humanReadableDescription: "Disable Web SQL"
+ webcoreBinding: RuntimeEnabledFeatures
+ category: experimental
+
# For internal features:
# The type should be boolean.
# You must provide a humanReadableName and humanReadableDescription for all debug features. They
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (237209 => 237210)
--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp 2018-10-16 23:59:38 UTC (rev 237210)
@@ -2079,3 +2079,13 @@
{
return toImpl(preferencesRef)->punchOutWhiteBackgroundsInDarkMode();
}
+
+void WKPreferencesSetWebSQLDisabled(WKPreferencesRef preferencesRef, bool flag)
+{
+ toImpl(preferencesRef)->setWebSQLDisabled(flag);
+}
+
+bool WKPreferencesGetWebSQLDisabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->webSQLDisabled();
+}
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h (237209 => 237210)
--- trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h 2018-10-16 23:59:38 UTC (rev 237210)
@@ -328,6 +328,10 @@
WK_EXPORT bool WKPreferencesGetProcessSwapOnNavigationEnabled(WKPreferencesRef preferencesRef);
WK_EXPORT void WKPreferencesSetProcessSwapOnNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled);
+// Defaults to false.
+WK_EXPORT bool WKPreferencesGetWebSQLDisabled(WKPreferencesRef preferencesRef);
+WK_EXPORT void WKPreferencesSetWebSQLDisabled(WKPreferencesRef preferencesRef, bool enabled);
+
#ifdef __cplusplus
}
#endif
Modified: trunk/Tools/ChangeLog (237209 => 237210)
--- trunk/Tools/ChangeLog 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Tools/ChangeLog 2018-10-16 23:59:38 UTC (rev 237210)
@@ -1,3 +1,13 @@
+2018-10-16 Sihui Liu <sihui_...@apple.com>
+
+ Add a switch for Web SQL
+ https://bugs.webkit.org/show_bug.cgi?id=190271
+
+ Reviewed by Ryosuke Niwa.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetPreferencesToConsistentValues):
+
2018-10-16 Alex Christensen <achristen...@webkit.org>
Remove InjectedBundleBackForwardList
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (237209 => 237210)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2018-10-16 23:43:10 UTC (rev 237209)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2018-10-16 23:59:38 UTC (rev 237210)
@@ -812,6 +812,8 @@
WKPreferencesSetServerTimingEnabled(preferences, true);
+ WKPreferencesSetWebSQLDisabled(preferences, false);
+
platformResetPreferencesToConsistentValues();
}