[ES6] Enable ES6 Modules
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 08:32:52 +0000 (08:32 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 08:32:52 +0000 (08:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165849

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* features.json:

Source/WebCore:

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::determineScriptType):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences es6ModulesEnabled]): Deleted.
(-[WebPreferences setES6ModulesEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::setES6ModulesEnabled): Deleted.
(WebPreferences::es6ModulesEnabled): Deleted.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetES6ModulesEnabled): Deleted.
(WKPreferencesGetES6ModulesEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setES6ModulesEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

30 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/features.json
Source/WebCore/ChangeLog
Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp [new file with mode: 0644]
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/html/parser/HTMLPreloadScanner.cpp
Source/WebCore/page/Settings.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
Source/WebKit/win/WebPreferenceKeysPrivate.h
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebPreferences.h
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

index dff8ee2..6da83e1 100644 (file)
@@ -1,3 +1,12 @@
+2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Enable ES6 Modules
+        https://bugs.webkit.org/show_bug.cgi?id=165849
+
+        Reviewed by Geoffrey Garen.
+
+        * features.json:
+
 2016-12-19  Mark Lam  <mark.lam@apple.com>
 
         Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
index 3ccf419..84d5d36 100644 (file)
     {
         "name": "Modules",
         "status": {
-            "status": "In Development",
+            "status": "Done",
             "enabled-by-default": true
         },
         "url": "http://www.ecma-international.org/ecma-262/6.0/index.html#sec-modules",
index 5f9d67e..1de1bd3 100644 (file)
@@ -1,3 +1,16 @@
+2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Enable ES6 Modules
+        https://bugs.webkit.org/show_bug.cgi?id=165849
+
+        Reviewed by Geoffrey Garen.
+
+        * dom/ScriptElement.cpp:
+        (WebCore::ScriptElement::determineScriptType):
+        * html/parser/HTMLPreloadScanner.cpp:
+        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
+        * page/Settings.in:
+
 2016-12-17  Sam Weinig  <sam@webkit.org>
 
         Remove a few trivial custom bindings
diff --git a/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp b/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp
new file mode 100644 (file)
index 0000000..853b070
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CryptoAlgorithmRSASSA_PKCS1_v1_5.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include "CryptoAlgorithmRsaSsaParamsDeprecated.h"
+#include "CryptoKeyRSA.h"
+#include "ExceptionCode.h"
+#include "NotImplemented.h"
+#include <gcrypt.h>
+#include <wtf/CryptographicUtilities.h>
+
+namespace WebCore {
+
+void CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign(Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&)
+{
+    notImplemented();
+}
+
+void CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify(Ref<CryptoKey>&&, Vector<uint8_t>&&, Vector<uint8_t>&&, BoolCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&)
+{
+    notImplemented();
+}
+
+ExceptionOr<void> CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign(const CryptoAlgorithmRsaSsaParamsDeprecated&, const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback&&, VoidCallback&&)
+{
+    notImplemented();
+    return Exception { NOT_SUPPORTED_ERR };
+}
+
+ExceptionOr<void> CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify(const CryptoAlgorithmRsaSsaParamsDeprecated&, const CryptoKeyRSA&, const CryptoOperationData&, const CryptoOperationData&, BoolCallback&&, VoidCallback&&)
+{
+    notImplemented();
+    return Exception { NOT_SUPPORTED_ERR };
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
index 3508738..61f2482 100644 (file)
@@ -170,9 +170,6 @@ std::optional<ScriptElement::ScriptType> ScriptElement::determineScriptType(Lega
     if (!m_element.document().isHTMLDocument())
         return std::nullopt;
 
-    auto* settings = m_element.document().settings();
-    if (!settings || !settings->es6ModulesEnabled())
-        return std::nullopt;
     // https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type
     // Setting the attribute to an ASCII case-insensitive match for the string "module" means that the script is a module script.
     if (equalLettersIgnoringASCIICase(type, "module"))
index 5f350ef..107e733 100644 (file)
@@ -212,11 +212,8 @@ private:
             break;
         case TagId::Script:
             if (match(attributeName, typeAttr)) {
-                auto* settings = document.settings();
-                if (settings && settings->es6ModulesEnabled()) {
-                    m_moduleScript = equalLettersIgnoringASCIICase(attributeValue, "module") ? PreloadRequest::ModuleScript::Yes : PreloadRequest::ModuleScript::No;
-                    break;
-                }
+                m_moduleScript = equalLettersIgnoringASCIICase(attributeValue, "module") ? PreloadRequest::ModuleScript::Yes : PreloadRequest::ModuleScript::No;
+                break;
             } else if (match(attributeName, nonceAttr))
                 m_nonceAttribute = attributeValue;
             processImageAndScriptAttribute(attributeName, attributeValue);
index 303f64e..0e3bb69 100644 (file)
@@ -291,6 +291,4 @@ forcedPrefersReducedMotionAccessibilityValue type=ForcedAccessibilityValue, init
 largeImageAsyncDecodingEnabled initial=true
 animatedImageAsyncDecodingEnabled initial=true
 
-es6ModulesEnabled initial=false
-
 shouldSuppressKeyboardInputDuringProvisionalNavigation initial=false
index 8714f84..ea83172 100644 (file)
@@ -1,3 +1,19 @@
+2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Enable ES6 Modules
+        https://bugs.webkit.org/show_bug.cgi?id=165849
+
+        Reviewed by Geoffrey Garen.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences es6ModulesEnabled]): Deleted.
+        (-[WebPreferences setES6ModulesEnabled:]): Deleted.
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2016-12-16  Dave Hyatt  <hyatt@apple.com>
 
         [CSS Values] Make separate wrapper classes for the deprecated CSS Values OM
index 3af98c1..b27e37d 100644 (file)
 #define WebKitDOMIteratorEnabledPreferenceKey @"WebKitDOMIteratorEnabled"
 #define WebKitFetchAPIEnabledPreferenceKey @"WebKitFetchAPIEnabled"
 #define WebKitDownloadAttributeEnabledPreferenceKey @"WebKitDownloadAttributeEnabled"
-#define WebKitES6ModulesEnabledPreferenceKey @"WebKitES6ModulesEnabled"
 #define WebKitCSSGridLayoutEnabledPreferenceKey @"WebKitCSSGridLayoutEnabled"
 #define WebKitVisualViewportEnabledPreferenceKey @"WebKitVisualViewportEnabled"
 #define WebKitModernMediaControlsEnabledPreferenceKey @"WebKitModernMediaControlsEnabled"
index 61106d5..e6f2016 100644 (file)
@@ -621,7 +621,6 @@ public:
 #if ENABLE(DOWNLOAD_ATTRIBUTE)
         [NSNumber numberWithBool:NO], WebKitDownloadAttributeEnabledPreferenceKey,
 #endif
-        [NSNumber numberWithBool:NO], WebKitES6ModulesEnabledPreferenceKey,
 #if ENABLE(CSS_GRID_LAYOUT)
         [NSNumber numberWithBool:YES], WebKitCSSGridLayoutEnabledPreferenceKey,
 #endif
@@ -2848,16 +2847,6 @@ static NSString *classIBCreatorID = nil;
     [self _setBoolValue:flag forKey:WebKitDownloadAttributeEnabledPreferenceKey];
 }
 
-- (BOOL)es6ModulesEnabled
-{
-    return [self _boolValueForKey:WebKitES6ModulesEnabledPreferenceKey];
-}
-
-- (void)setES6ModulesEnabled:(BOOL)flag
-{
-    [self _setBoolValue:flag forKey:WebKitES6ModulesEnabledPreferenceKey];
-}
-
 - (BOOL)isCSSGridLayoutEnabled
 {
     return [self _boolValueForKey:WebKitCSSGridLayoutEnabledPreferenceKey];
index 35dda97..f543842 100644 (file)
@@ -505,9 +505,6 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
 - (void)setDownloadAttributeEnabled:(BOOL)flag;
 - (BOOL)downloadAttributeEnabled;
 
-- (void)setES6ModulesEnabled:(BOOL)flag;
-- (BOOL)es6ModulesEnabled;
-
 - (void)setCSSGridLayoutEnabled:(BOOL)flag;
 - (BOOL)isCSSGridLayoutEnabled;
 
index 3437f10..e66cdf8 100644 (file)
@@ -2859,8 +2859,6 @@ static bool needsSelfRetainWhileLoadingQuirk()
     RuntimeEnabledFeatures::sharedFeatures().setDownloadAttributeEnabled([preferences downloadAttributeEnabled]);
 #endif
 
-    settings.setEs6ModulesEnabled([preferences es6ModulesEnabled]);
-
 #if ENABLE(CSS_GRID_LAYOUT)
     RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled([preferences isCSSGridLayoutEnabled]);
 #endif
index 130f4a5..125391c 100644 (file)
@@ -1,3 +1,19 @@
+2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Enable ES6 Modules
+        https://bugs.webkit.org/show_bug.cgi?id=165849
+
+        Reviewed by Geoffrey Garen.
+
+        * Interfaces/IWebPreferencesPrivate.idl:
+        * WebPreferenceKeysPrivate.h:
+        * WebPreferences.cpp:
+        (WebPreferences::setES6ModulesEnabled): Deleted.
+        (WebPreferences::es6ModulesEnabled): Deleted.
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2016-12-10  Filip Pizlo  <fpizlo@apple.com>
 
         The DOM should have an advancing wavefront opaque root barrier
index 23877c4..83b4eb7 100644 (file)
@@ -185,8 +185,6 @@ interface IWebPreferencesPrivate3 : IWebPreferencesPrivate2
     HRESULT setCustomElementsEnabled([in] BOOL enabled);
     HRESULT modernMediaControlsEnabled([out, retval] BOOL* enabled);
     HRESULT setModernMediaControlsEnabled([in] BOOL enabled);
-    HRESULT es6ModulesEnabled([out, retval] BOOL* enabled);
-    HRESULT setES6ModulesEnabled([in] BOOL enabled);
 }
 
 [uuid(F9582D72-6348-45B1-AB09-39E33459B5B9)]
index 72aa5c6..b6e96eb 100644 (file)
 #define WebKitCustomElementsEnabledPreferenceKey "WebKitCustomElementsEnabled"
 
 #define WebKitModernMediaControlsEnabledPreferenceKey "WebKitModernMediaControlsEnabled"
-
-#define WebKitES6ModulesEnabledPreferenceKey "WebKitES6ModulesEnabled"
index 60e52e9..5773757 100644 (file)
@@ -2003,20 +2003,6 @@ HRESULT WebPreferences::modernMediaControlsEnabled(_Out_ BOOL* enabled)
     return S_OK;
 }
 
-HRESULT WebPreferences::setES6ModulesEnabled(BOOL enabled)
-{
-    setBoolValue(WebKitES6ModulesEnabledPreferenceKey, enabled);
-    return S_OK;
-}
-
-HRESULT WebPreferences::es6ModulesEnabled(_Out_ BOOL* enabled)
-{
-    if (!enabled)
-        return E_POINTER;
-    *enabled = boolValueForKey(WebKitES6ModulesEnabledPreferenceKey);
-    return S_OK;
-}
-
 HRESULT WebPreferences::setApplicationId(BSTR applicationId)
 {
     m_applicationId = String(applicationId).createCFString();
index 3e251c1..421ff92 100644 (file)
@@ -242,8 +242,6 @@ public:
     virtual HRESULT STDMETHODCALLTYPE setCustomElementsEnabled(BOOL);
     virtual HRESULT STDMETHODCALLTYPE modernMediaControlsEnabled(_Out_ BOOL*);
     virtual HRESULT STDMETHODCALLTYPE setModernMediaControlsEnabled(BOOL);
-    virtual HRESULT STDMETHODCALLTYPE es6ModulesEnabled(_Out_ BOOL*);
-    virtual HRESULT STDMETHODCALLTYPE setES6ModulesEnabled(BOOL);
 
     // IWebPreferencesPrivate4
     virtual HRESULT STDMETHODCALLTYPE setApplicationId(BSTR);
index d570048..3906b45 100644 (file)
@@ -5254,11 +5254,6 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
         return hr;
     RuntimeEnabledFeatures::sharedFeatures().setCustomElementsEnabled(!!enabled);
 
-    hr = prefsPrivate->es6ModulesEnabled(&enabled);
-    if (FAILED(hr))
-        return hr;
-    settings.setEs6ModulesEnabled(!!enabled);
-
     hr = prefsPrivate->modernMediaControlsEnabled(&enabled);
     if (FAILED(hr))
         return hr;
index 0831766..f4fa5f9 100644 (file)
@@ -1,3 +1,20 @@
+2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Enable ES6 Modules
+        https://bugs.webkit.org/show_bug.cgi?id=165849
+
+        Reviewed by Geoffrey Garen.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetES6ModulesEnabled): Deleted.
+        (WKPreferencesGetES6ModulesEnabled): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2016-12-19  Keith Rollin  <krollin@apple.com>
 
         Fix unwanted deletion of record/replay files
index 5baf937..a205d12 100644 (file)
     macro(InputEventsEnabled, inputEventsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Input Events", "Enable InputEvents support") \
     macro(SubtleCryptoEnabled, subtleCryptoEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubtleCrypto", "Enable SubtleCrypto support") \
     macro(WebGL2Enabled, webGL2Enabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "WebGL 2.0", "WebGL 2 prototype") \
-    macro(ES6ModulesEnabled, es6ModulesEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "ES6 Modules", "Enable ES6 Modules support") \
     \
 
 #if PLATFORM(COCOA)
index 22c43eb..ed3a6ea 100644 (file)
@@ -1561,16 +1561,6 @@ bool WKPreferencesGetDownloadAttributeEnabled(WKPreferencesRef preferencesRef)
     return toImpl(preferencesRef)->downloadAttributeEnabled();
 }
 
-void WKPreferencesSetES6ModulesEnabled(WKPreferencesRef preferencesRef, bool flag)
-{
-    toImpl(preferencesRef)->setES6ModulesEnabled(flag);
-}
-
-bool WKPreferencesGetES6ModulesEnabled(WKPreferencesRef preferencesRef)
-{
-    return toImpl(preferencesRef)->es6ModulesEnabled();
-}
-
 void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef preferencesRef, bool flag)
 {
     toImpl(preferencesRef)->setIntersectionObserverEnabled(flag);
index c4f3371..c04e458 100644 (file)
@@ -442,10 +442,6 @@ WK_EXPORT void WKPreferencesSetAllowsPictureInPictureMediaPlayback(WKPreferences
 WK_EXPORT bool WKPreferencesGetAllowsPictureInPictureMediaPlayback(WKPreferencesRef);
 
 // Defaults to false
-WK_EXPORT void WKPreferencesSetES6ModulesEnabled(WKPreferencesRef, bool flag);
-WK_EXPORT bool WKPreferencesGetES6ModulesEnabled(WKPreferencesRef);
-
-// Defaults to false
 WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef);
 
index 6775e82..1e8fd14 100644 (file)
@@ -259,7 +259,6 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
     macro(WebKitVisualViewportEnabled, VisualViewportEnabled, visualViewportEnabled) \
     macro(WebKitLargeImageAsyncDecodingEnabled, LargeImageAsyncDecodingEnabled, largeImageAsyncDecodingEnabled) \
     macro(WebKitAnimatedImageAsyncDecodingEnabled, AnimatedImageAsyncDecodingEnabled, animatedImageAsyncDecodingEnabled) \
-    macro(WebKitES6ModulesEnabled, Es6ModulesEnabled, es6ModulesEnabled) \
     \
 
 #define OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(TestRunnerName, SettingsName, WebPreferencesName) \
index 4fdd8cb..27e8393 100644 (file)
@@ -3189,8 +3189,6 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     RuntimeEnabledFeatures::sharedFeatures().setDownloadAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::downloadAttributeEnabledKey()));
 #endif
 
-    settings.setEs6ModulesEnabled(store.getBoolValueForKey(WebPreferencesKey::es6ModulesEnabledKey()));
-
     RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(store.getBoolValueForKey(WebPreferencesKey::shadowDOMEnabledKey()));
 
     RuntimeEnabledFeatures::sharedFeatures().setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
index 08287d1..c1ac9b3 100644 (file)
@@ -1,3 +1,20 @@
+2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Enable ES6 Modules
+        https://bugs.webkit.org/show_bug.cgi?id=165849
+
+        Reviewed by Geoffrey Garen.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (resetWebPreferencesToConsistentValues):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (resetWebPreferencesToConsistentValues):
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting):
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setES6ModulesEnabled): Deleted.
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
 2016-12-19  Ryan Haddad  <ryanhaddad@apple.com>
 
         Repurpose bots and clean up dashboard.
index 846867b..52fc5fb 100644 (file)
@@ -992,8 +992,6 @@ static void resetWebPreferencesToConsistentValues(const TestOptions& options)
 
     [preferences setDownloadAttributeEnabled:YES];
 
-    [preferences setES6ModulesEnabled:YES];
-
     [preferences setHiddenPageDOMTimerThrottlingEnabled:NO];
     [preferences setHiddenPageCSSAnimationSuspensionEnabled:NO];
 
index d454b11..f9203e9 100644 (file)
@@ -853,7 +853,6 @@ static void resetWebPreferencesToConsistentValues(IWebPreferences* preferences)
     prefsPrivate3->setFetchAPIEnabled(TRUE);
     prefsPrivate3->setShadowDOMEnabled(TRUE);
     prefsPrivate3->setCustomElementsEnabled(TRUE);
-    prefsPrivate3->setES6ModulesEnabled(TRUE);
 
     prefsPrivate3->setDOMIteratorEnabled(TRUE);
     prefsPrivate3->setModernMediaControlsEnabled(FALSE);
index bdc165f..3637e6e 100644 (file)
@@ -330,8 +330,6 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
 
     m_testRunner->setDownloadAttributeEnabled(true);
 
-    m_testRunner->setES6ModulesEnabled(true);
-
     m_testRunner->setEncryptedMediaAPIEnabled(true);
 
     m_testRunner->setCloseRemainingWindowsWhenComplete(false);
index 7a13d8a..1413123 100644 (file)
@@ -410,13 +410,6 @@ void TestRunner::setDownloadAttributeEnabled(bool enabled)
     WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
 }
 
-void TestRunner::setES6ModulesEnabled(bool enabled)
-{
-    WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitES6ModulesEnabled"));
-    auto& injectedBundle = InjectedBundle::singleton();
-    WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
-}
-
 void TestRunner::setEncryptedMediaAPIEnabled(bool enabled)
 {
     WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitEncryptedMediaAPIEnabled"));
index dd2d491..2032932 100644 (file)
@@ -129,7 +129,6 @@ public:
     void setAsynchronousSpellCheckingEnabled(bool);
     void setDownloadAttributeEnabled(bool);
     void setAllowsAnySSLCertificate(bool);
-    void setES6ModulesEnabled(bool);
     void setEncryptedMediaAPIEnabled(bool);
     void setSubtleCryptoEnabled(bool);
     void setMediaStreamEnabled(bool);