REGRESSION(r179429): Can't type comments in Facebook
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 18:20:45 +0000 (18:20 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 18:20:45 +0000 (18:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141859

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

When window.Symbol is exposed to user-space pages,
Facebook's JavaScript use it (maybe, for immutable-js and React.js's unique key).
However, to work with Symbols completely, it also requires
1) Object.getOwnPropertySymbols (for mixin including Symbols)
2) the latest ES6 Iterator interface that uses Iterator.next and it returns { done: boolean, value: value }.
Since they are not landed yet, comments in Facebook don't work.

This patch introduces RuntimeFlags for JavaScriptCore.
Specifying SymbolEnabled flag under test runner and inspector to continue to work with Symbol.
And drop JavaScriptExperimentsEnabled flag
because it is no longer used and use case of this is duplicated to runtime flags.

* JavaScriptCore.order:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(GlobalObject::javaScriptRuntimeFlags):
(GlobalObject::javaScriptExperimentsEnabled): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::finishCreation):
(JSC::JSGlobalObject::javaScriptRuntimeFlags):
(JSC::JSGlobalObject::javaScriptExperimentsEnabled): Deleted.
* runtime/RuntimeFlags.h: Added.
(JSC::RuntimeFlags::RuntimeFlags):
(JSC::RuntimeFlags::createAllEnabled):

Source/WebCore:

Enable SymbolEnabled runtime flag in inspector context.

* ForwardingHeaders/runtime/RuntimeFlags.h: Added.
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
(WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
(WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
* page/Settings.h:
* page/Settings.in:

Source/WebKit/mac:

Introduce SymbolEnabled and drop javaScriptExperimentsEnabled.
Private API, javaScriptExperimentsEnabled is dropped.

* Misc/WebNSDictionaryExtras.h:
* Misc/WebNSDictionaryExtras.m:
(-[NSMutableDictionary _webkit_setUnsignedInt:forKey:]):
* WebKit.order:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences _setUnsignedIntValue:forKey:]):
(-[WebPreferences javaScriptRuntimeFlags]):
(-[WebPreferences setJavaScriptRuntimeFlags:]):
(-[WebPreferences setJavaScriptExperimentsEnabled:]): Deleted.
(-[WebPreferences javaScriptExperimentsEnabled]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

Added Windows support.

* Interfaces/IWebPreferences.idl:
* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::javaScriptRuntimeFlags):
(WebPreferences::setJavaScriptRuntimeFlags):
(WebPreferences::isWebSecurityEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

Enable SymbolEnabled in inspector context.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptRuntimeFlags):
(WKPreferencesGetJavaScriptRuntimeFlags):
(WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
(WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _javaScriptRuntimeFlags]):
(-[WKPreferences _setJavaScriptRuntimeFlags:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:

Tools:

Drop javaScriptExperimentsEnabled and specify JavaScriptRuntimeFlagsAllEnabled as KJavaScriptRuntimeFlags.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

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

52 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.order
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/RuntimeFlags.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/runtime/RuntimeFlags.h [new file with mode: 0644]
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.h
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h
Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/Settings.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebNSDictionaryExtras.h
Source/WebKit/mac/Misc/WebNSDictionaryExtras.m
Source/WebKit/mac/WebKit.order
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/IWebPreferences.idl
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/WKPreferencesRef.h
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h
Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp
Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp
Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/mac/WebKit2.order
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/WebKitTestRunner/TestController.cpp

index a048580..7397930 100644 (file)
@@ -1,3 +1,40 @@
+2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        REGRESSION(r179429): Can't type comments in Facebook
+        https://bugs.webkit.org/show_bug.cgi?id=141859
+
+        Reviewed by Brent Fulgham.
+
+        When window.Symbol is exposed to user-space pages,
+        Facebook's JavaScript use it (maybe, for immutable-js and React.js's unique key).
+        However, to work with Symbols completely, it also requires
+        1) Object.getOwnPropertySymbols (for mixin including Symbols)
+        2) the latest ES6 Iterator interface that uses Iterator.next and it returns { done: boolean, value: value }.
+        Since they are not landed yet, comments in Facebook don't work.
+
+        This patch introduces RuntimeFlags for JavaScriptCore.
+        Specifying SymbolEnabled flag under test runner and inspector to continue to work with Symbol.
+        And drop JavaScriptExperimentsEnabled flag
+        because it is no longer used and use case of this is duplicated to runtime flags.
+
+        * JavaScriptCore.order:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * jsc.cpp:
+        (GlobalObject::javaScriptRuntimeFlags):
+        (GlobalObject::javaScriptExperimentsEnabled): Deleted.
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::JSGlobalObject):
+        (JSC::JSGlobalObject::init):
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::finishCreation):
+        (JSC::JSGlobalObject::javaScriptRuntimeFlags):
+        (JSC::JSGlobalObject::javaScriptExperimentsEnabled): Deleted.
+        * runtime/RuntimeFlags.h: Added.
+        (JSC::RuntimeFlags::RuntimeFlags):
+        (JSC::RuntimeFlags::createAllEnabled):
+
 2015-02-23  Filip Pizlo  <fpizlo@apple.com>
 
         Our bizarre behavior on Arguments::defineOwnProperty should be deliberate rather than a spaghetti incident
index 26be0ee..71ed89f 100644 (file)
@@ -637,7 +637,6 @@ __ZN3JSC14MachineThreads29makeUsableFromMultipleThreadsEv
 __ZN3JSC12GlobalJSLockD1Ev
 _JSGlobalContextCreateInGroup
 __ZN3JSC14JSGlobalObjectC1ERNS_2VMEPNS_9StructureEPKNS_23GlobalObjectMethodTableE
-__ZN3JSC14JSGlobalObject28javaScriptExperimentsEnabledEPKS0_
 _JSGlobalContextRetain
 _JSStringCreateWithCFString
 _JSEvaluateScript
index 41b2bd1..73e1547 100644 (file)
     <ClInclude Include="..\runtime\RegExpObject.h" />
     <ClInclude Include="..\runtime\RegExpPrototype.h" />
     <ClInclude Include="..\runtime\Reject.h" />
+    <ClInclude Include="..\runtime\RuntimeFlags.h" />
     <ClInclude Include="..\runtime\SamplingCounter.h" />
     <ClInclude Include="..\runtime\SetConstructor.h" />
     <ClInclude Include="..\runtime\SetIteratorConstructor.h" />
index 8048abe..fff720c 100644 (file)
     <ClInclude Include="..\runtime\Reject.h">
       <Filter>runtime</Filter>
     </ClInclude>
+    <ClInclude Include="..\runtime\RuntimeFlags.h">
+      <Filter>runtime</Filter>
+    </ClInclude>
     <ClInclude Include="..\runtime\SamplingCounter.h">
       <Filter>runtime</Filter>
     </ClInclude>
index 2c01d6f..cad3333 100644 (file)
                705B41B01A6E501E00716757 /* SymbolObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 705B41A81A6E501E00716757 /* SymbolObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
                705B41B11A6E501E00716757 /* SymbolPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 705B41A91A6E501E00716757 /* SymbolPrototype.cpp */; };
                705B41B21A6E501E00716757 /* SymbolPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 705B41AA1A6E501E00716757 /* SymbolPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 70B0A9D01A9B66200001306A /* RuntimeFlags.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C008CD2186F8A9300955C24 /* JSPromiseFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */; };
                7C008CD3186F8A9300955C24 /* JSPromiseFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C008CD1186F8A9300955C24 /* JSPromiseFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C008CDA187124BB00955C24 /* JSPromiseDeferred.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C008CD8187124BB00955C24 /* JSPromiseDeferred.cpp */; };
                705B41A81A6E501E00716757 /* SymbolObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolObject.h; sourceTree = "<group>"; };
                705B41A91A6E501E00716757 /* SymbolPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolPrototype.cpp; sourceTree = "<group>"; };
                705B41AA1A6E501E00716757 /* SymbolPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolPrototype.h; sourceTree = "<group>"; };
+               70B0A9D01A9B66200001306A /* RuntimeFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeFlags.h; sourceTree = "<group>"; };
                7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSPromiseFunctions.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                7C008CD1186F8A9300955C24 /* JSPromiseFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromiseFunctions.h; sourceTree = "<group>"; };
                7C008CD8187124BB00955C24 /* JSPromiseDeferred.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseDeferred.cpp; sourceTree = "<group>"; };
                                BCD202C00E1706A7002C7E82 /* RegExpPrototype.h */,
                                0F6B1CB81861244C00845D97 /* RegisterPreservationMode.h */,
                                0FB7F39115ED8E3800F167B2 /* Reject.h */,
+                               70B0A9D01A9B66200001306A /* RuntimeFlags.h */,
                                0F7700911402FF280078EB39 /* SamplingCounter.cpp */,
                                0F77008E1402FDD60078EB39 /* SamplingCounter.h */,
                                A7299DA317D12858005F5FF9 /* SetConstructor.cpp */,
                                0FF42744158EBE91004CB9FF /* udis86_input.h in Headers */,
                                0FF42748158EBE91004CB9FF /* udis86_syn.h in Headers */,
                                0FF42749158EBE91004CB9FF /* udis86_types.h in Headers */,
+                               70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */,
                                A7E5AB391799E4B200D2833D /* UDis86Disassembler.h in Headers */,
                                A7A8AF4117ADB5F3005AB174 /* Uint16Array.h in Headers */,
                                0FE834181A6EF97B00D04847 /* PolymorphicCallStubRoutine.h in Headers */,
index de4281c..a182c21 100644 (file)
@@ -575,7 +575,7 @@ public:
         return Structure::create(vm, 0, prototype, TypeInfo(GlobalObjectType, StructureFlags), info());
     }
 
-    static bool javaScriptExperimentsEnabled(const JSGlobalObject*) { return true; }
+    static RuntimeFlags javaScriptRuntimeFlags(const JSGlobalObject*) { return RuntimeFlags::createAllEnabled(); }
 
 protected:
     void finishCreation(VM& vm, const Vector<String>& arguments)
@@ -663,7 +663,7 @@ protected:
 };
 
 const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, &globalObjectTable, CREATE_METHOD_TABLE(GlobalObject) };
-const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, 0, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout };
 
 
 GlobalObject::GlobalObject(VM& vm, Structure* structure)
index bb75492..9b6beef 100644 (file)
@@ -145,7 +145,7 @@ namespace JSC {
 
 const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &Base::s_info, &globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) };
 
-const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, 0, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout };
 
 /* Source for JSGlobalObject.lut.h
 @begin globalObjectTable
@@ -173,7 +173,7 @@ JSGlobalObject::JSGlobalObject(VM& vm, Structure* structure, const GlobalObjectM
     , m_varInjectionWatchpoint(adoptRef(new WatchpointSet(IsWatched)))
     , m_weakRandom(Options::forceWeakRandomSeed() ? Options::forcedWeakRandomSeed() : static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)))
     , m_evalEnabled(true)
-    , m_experimentsEnabled(false)
+    , m_runtimeFlags()
     , m_consoleClient(nullptr)
     , m_globalObjectMethodTable(globalObjectMethodTable ? globalObjectMethodTable : &s_globalObjectMethodTable)
 {
@@ -373,7 +373,10 @@ m_ ## lowerName ## Prototype->putDirectWithoutTransition(vm, vm.propertyNames->c
 putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Constructor, DontEnum); \
 
     FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE)
-    
+
+    if (m_runtimeFlags.isSymbolEnabled())
+        putDirectWithoutTransition(vm, vm.propertyNames->Symbol, symbolConstructor, DontEnum);
+
 #undef PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE
     PrototypeMap& prototypeMap = vm.prototypeMap;
     Structure* iteratorResultStructure = prototypeMap.emptyObjectStructureForPrototype(m_objectPrototype.get(), JSFinalObject::defaultInlineCapacity());
@@ -436,7 +439,7 @@ putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Construct
     m_consoleStructure.set(vm, this, JSConsole::createStructure(vm, this, consolePrototype));
     JSConsole* consoleObject = JSConsole::create(vm, m_consoleStructure.get());
     putDirectWithoutTransition(vm, Identifier(exec, "console"), consoleObject, DontEnum);
-    
+
     resetPrototype(vm, prototype());
 }
 
index cac8470..41aaf96 100644 (file)
@@ -31,6 +31,7 @@
 #include "JSSegmentedVariableObject.h"
 #include "JSWeakObjectMapRefInternal.h"
 #include "NumberPrototype.h"
+#include "RuntimeFlags.h"
 #include "SpecialPointer.h"
 #include "StringPrototype.h"
 #include "StructureChain.h"
@@ -86,13 +87,15 @@ struct ActivationStackNode;
 struct HashTable;
 
 #define DEFINE_STANDARD_BUILTIN(macro, upperName, lowerName) macro(upperName, lowerName, lowerName, JS ## upperName, upperName)
-    
+
+#define FOR_EACH_EXPERIMENTAL_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
+    macro(Symbol, symbol, symbolObject, SymbolObject, Symbol) \
+
 #define FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
     macro(Set, set, set, JSSet, Set) \
     macro(Map, map, map, JSMap, Map) \
     macro(Date, date, date, DateInstance, Date) \
     macro(String, string, stringObject, StringObject, String) \
-    macro(Symbol, symbol, symbolObject, SymbolObject, Symbol) \
     macro(Boolean, boolean, booleanObject, BooleanObject, Boolean) \
     macro(Number, number, numberObject, NumberObject, Number) \
     macro(Error, error, error, ErrorInstance, Error) \
@@ -101,6 +104,7 @@ struct HashTable;
 
 #define FOR_EACH_SIMPLE_BUILTIN_TYPE(macro) \
     FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
+    FOR_EACH_EXPERIMENTAL_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \
     DEFINE_STANDARD_BUILTIN(macro, ArrayIterator, arrayIterator) \
     DEFINE_STANDARD_BUILTIN(macro, ArgumentsIterator, argumentsIterator) \
     DEFINE_STANDARD_BUILTIN(macro, MapIterator, mapIterator) \
@@ -131,8 +135,8 @@ struct GlobalObjectMethodTable {
     typedef bool (*ShouldInterruptScriptFunctionPtr)(const JSGlobalObject*);
     ShouldInterruptScriptFunctionPtr shouldInterruptScript;
 
-    typedef bool (*JavaScriptExperimentsEnabledFunctionPtr)(const JSGlobalObject*);
-    JavaScriptExperimentsEnabledFunctionPtr javaScriptExperimentsEnabled;
+    typedef RuntimeFlags (*JavaScriptRuntimeFlagsFunctionPtr)(const JSGlobalObject*);
+    JavaScriptRuntimeFlagsFunctionPtr javaScriptRuntimeFlags;
 
     typedef void (*QueueTaskToEventLoopFunctionPtr)(const JSGlobalObject*, PassRefPtr<Microtask>);
     QueueTaskToEventLoopFunctionPtr queueTaskToEventLoop;
@@ -273,7 +277,7 @@ protected:
 
     bool m_evalEnabled;
     String m_evalDisabledErrorMessage;
-    bool m_experimentsEnabled;
+    RuntimeFlags m_runtimeFlags;
     ConsoleClient* m_consoleClient;
 
     static JS_EXPORTDATA const GlobalObjectMethodTable s_globalObjectMethodTable;
@@ -309,7 +313,7 @@ protected:
     {
         Base::finishCreation(vm);
         structure()->setGlobalObject(vm, this);
-        m_experimentsEnabled = m_globalObjectMethodTable->javaScriptExperimentsEnabled(this);
+        m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);
         init(vm);
         setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype(), PureForwardingProxyType), this));
     }
@@ -318,7 +322,7 @@ protected:
     {
         Base::finishCreation(vm);
         structure()->setGlobalObject(vm, this);
-        m_experimentsEnabled = m_globalObjectMethodTable->javaScriptExperimentsEnabled(this);
+        m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);
         init(vm);
         setGlobalThis(vm, thisValue);
     }
@@ -546,7 +550,7 @@ public:
 
     static bool shouldInterruptScript(const JSGlobalObject*) { return true; }
     static bool shouldInterruptScriptBeforeTimeout(const JSGlobalObject*) { return false; }
-    static bool javaScriptExperimentsEnabled(const JSGlobalObject*) { return false; }
+    static RuntimeFlags javaScriptRuntimeFlags(const JSGlobalObject*) { return RuntimeFlags(); }
 
     void queueMicrotask(PassRefPtr<Microtask>);
 
diff --git a/Source/JavaScriptCore/runtime/RuntimeFlags.h b/Source/JavaScriptCore/runtime/RuntimeFlags.h
new file mode 100644 (file)
index 0000000..b0b5b37
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2015 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.
+ */
+
+#ifndef RuntimeFlags_h
+#define RuntimeFlags_h
+
+#include <initializer_list>
+
+namespace JSC {
+
+#define JSC_RUNTIME_FLAG(macro) \
+    macro(SymbolEnabled)
+
+
+class RuntimeFlags {
+private:
+    enum RuntimeFlagShiftValue : unsigned {
+#define JSC_DECLARE_RUNTIME_FLAG_SHIFT_VALUE(name) shiftValueFor##name,
+        JSC_RUNTIME_FLAG(JSC_DECLARE_RUNTIME_FLAG_SHIFT_VALUE)
+#undef JSC_DECLARE_RUNTIME_FLAG_SHIFT_VALUE
+    };
+
+public:
+    enum RuntimeFlag : unsigned {
+#define JSC_DECLARE_RUNTIME_FLAG(name) name = 1u << (shiftValueFor##name),
+        JSC_RUNTIME_FLAG(JSC_DECLARE_RUNTIME_FLAG)
+#undef JSC_DECLARE_RUNTIME_FLAG
+    };
+
+#define JSC_DECLARE_RUNTIME_FLAG_ACCESSOR(name) \
+    void set##name(bool value)\
+    {\
+        if (value)\
+            m_flags |= name;\
+        else\
+            m_flags &= (~name);\
+    }\
+    bool is##name() const\
+    {\
+        return m_flags & name;\
+    }
+    JSC_RUNTIME_FLAG(JSC_DECLARE_RUNTIME_FLAG_ACCESSOR)
+#undef JSC_DECLARE_RUNTIME_FLAG_ACCESSOR
+
+    RuntimeFlags()
+        : RuntimeFlags(0u)
+    {
+    }
+
+    RuntimeFlags(std::initializer_list<RuntimeFlag> initializerList)
+        : RuntimeFlags()
+    {
+        for (RuntimeFlag flag : initializerList)
+            m_flags |= flag;
+    }
+
+    explicit RuntimeFlags(unsigned flags)
+        : m_flags(flags)
+    {
+    }
+
+    static RuntimeFlags createAllEnabled()
+    {
+        return {
+#define JSC_USE_RUNTIME_FLAG(name) name,
+            JSC_RUNTIME_FLAG(JSC_USE_RUNTIME_FLAG)
+#undef JSC_USE_RUNTIME_FLAG
+        };
+    }
+
+private:
+    unsigned m_flags;
+};
+
+} // namespace JSC
+
+#endif // RuntimeFlags_h
index 8baa72a..a1058ec 100644 (file)
@@ -1,3 +1,29 @@
+2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        REGRESSION(r179429): Can't type comments in Facebook
+        https://bugs.webkit.org/show_bug.cgi?id=141859
+
+        Reviewed by Brent Fulgham.
+
+        Enable SymbolEnabled runtime flag in inspector context.
+
+        * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
+        * WebCore.order:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
+        (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
+        * bindings/js/JSDOMWindowBase.h:
+        * bindings/js/JSWorkerGlobalScopeBase.cpp:
+        (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
+        (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
+        * bindings/js/JSWorkerGlobalScopeBase.h:
+        * inspector/InspectorFrontendClientLocal.cpp:
+        (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
+        * page/Settings.h:
+        * page/Settings.in:
+
 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
 
         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
diff --git a/Source/WebCore/ForwardingHeaders/runtime/RuntimeFlags.h b/Source/WebCore/ForwardingHeaders/runtime/RuntimeFlags.h
new file mode 100644 (file)
index 0000000..ce44471
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_RuntimeFlags_h
+#define WebCore_FWD_RuntimeFlags_h
+#include <JavaScriptCore/RuntimeFlags.h>
+#endif
index 556b36c..f10677b 100644 (file)
@@ -3335,7 +3335,6 @@ __ZN7WebCore15JSDOMWindowBaseC2ERN3JSC2VMEPNS1_9StructureEN3WTF10PassRefPtrINS_9
 __ZN7WebCore17JSDOMGlobalObjectC2ERN3JSC2VMEPNS1_9StructureEN3WTF10PassRefPtrINS_15DOMWrapperWorldEEEPKNS1_23GlobalObjectMethodTableE
 __ZN7WebCore15JSDOMWindowBase14finishCreationERN3JSC2VMEPNS_16JSDOMWindowShellE
 __ZN7WebCore17JSDOMGlobalObject14finishCreationERN3JSC2VMEPNS1_8JSObjectE
-__ZN7WebCore15JSDOMWindowBase28javaScriptExperimentsEnabledEPKN3JSC14JSGlobalObjectE
 __ZN7WebCore12gcControllerEv
 __ZN7WebCore12GCController18garbageCollectSoonEv
 __ZN3JSC6StrongIN7WebCore16JSDOMWindowShellEEC2ERNS_2VMEPS2_
index 58d27ec..83bc2c1 100644 (file)
     <ClInclude Include="..\ForwardingHeaders\runtime\PrototypeFunction.h" />
     <ClInclude Include="..\ForwardingHeaders\runtime\RegExp.h" />
     <ClInclude Include="..\ForwardingHeaders\runtime\RegExpObject.h" />
+    <ClInclude Include="..\ForwardingHeaders\runtime\RuntimeFlags.h" />
     <ClInclude Include="..\ForwardingHeaders\runtime\StorageBarrier.h" />
     <ClInclude Include="..\ForwardingHeaders\runtime\StringPrototype.h" />
     <ClInclude Include="..\ForwardingHeaders\runtime\Structure.h" />
index 86f23e0..76e906d 100644 (file)
     <ClInclude Include="..\ForwardingHeaders\runtime\Protect.h">
       <Filter>ForwardingHeaders\runtime</Filter>
     </ClInclude>
+    <ClInclude Include="..\ForwardingHeaders\runtime\RuntimeFlags.h">
+      <Filter>ForwardingHeaders\runtime</Filter>
+    </ClInclude>
     <ClInclude Include="..\ForwardingHeaders\runtime\StringObject.h">
       <Filter>ForwardingHeaders\runtime</Filter>
     </ClInclude>
index e5fb44d..bc02b15 100644 (file)
@@ -56,7 +56,7 @@ static bool shouldAllowAccessFrom(const JSGlobalObject* thisObject, ExecState* e
 
 const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) };
 
-const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
 
 JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
     : JSDOMGlobalObject(vm, structure, &shell->world(), &s_globalObjectMethodTable)
@@ -169,13 +169,13 @@ bool JSDOMWindowBase::shouldInterruptScriptBeforeTimeout(const JSGlobalObject* o
     return JSGlobalObject::shouldInterruptScriptBeforeTimeout(object);
 }
 
-bool JSDOMWindowBase::javaScriptExperimentsEnabled(const JSGlobalObject* object)
+RuntimeFlags JSDOMWindowBase::javaScriptRuntimeFlags(const JSGlobalObject* object)
 {
     const JSDOMWindowBase* thisObject = static_cast<const JSDOMWindowBase*>(object);
     Frame* frame = thisObject->impl().frame();
     if (!frame)
-        return false;
-    return frame->settings().javaScriptExperimentsEnabled();
+        return RuntimeFlags();
+    return frame->settings().javaScriptRuntimeFlags();
 }
 
 void JSDOMWindowBase::queueTaskToEventLoop(const JSGlobalObject* object, PassRefPtr<Microtask> task)
index 1732c99..fb8e6db 100644 (file)
@@ -64,7 +64,7 @@ namespace WebCore {
         static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
         static bool shouldInterruptScript(const JSC::JSGlobalObject*);
         static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
-        static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*);
+        static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
         static void queueTaskToEventLoop(const JSC::JSGlobalObject*, PassRefPtr<JSC::Microtask>);
         
         void printErrorMessage(const String&) const;
index ec085cc..aaa5dba 100644 (file)
@@ -43,7 +43,7 @@ namespace WebCore {
 
 const ClassInfo JSWorkerGlobalScopeBase::s_info = { "WorkerGlobalScope", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSWorkerGlobalScopeBase) };
 
-const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
+const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout };
 
 JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase(JSC::VM& vm, JSC::Structure* structure, PassRefPtr<WorkerGlobalScope> impl)
     : JSDOMGlobalObject(vm, structure, &normalWorld(vm), &s_globalObjectMethodTable)
@@ -92,9 +92,9 @@ bool JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout(const JSGlobalO
     return JSGlobalObject::shouldInterruptScriptBeforeTimeout(object);
 }
 
-bool JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled(const JSGlobalObject* object)
+RuntimeFlags JSWorkerGlobalScopeBase::javaScriptRuntimeFlags(const JSGlobalObject* object)
 {
-    return JSGlobalObject::javaScriptExperimentsEnabled(object);
+    return JSGlobalObject::javaScriptRuntimeFlags(object);
 }
 
 void JSWorkerGlobalScopeBase::queueTaskToEventLoop(const JSGlobalObject* object, PassRefPtr<Microtask> task)
index cd04a1d..031530e 100644 (file)
@@ -57,7 +57,7 @@ namespace WebCore {
         static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
         static bool shouldInterruptScript(const JSC::JSGlobalObject*);
         static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
-        static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*);
+        static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
         static void queueTaskToEventLoop(const JSC::JSGlobalObject*, PassRefPtr<JSC::Microtask>);
 
     protected:
index 345a732..415ff7c 100644 (file)
@@ -120,6 +120,9 @@ InspectorFrontendClientLocal::InspectorFrontendClientLocal(InspectorController*
     , m_dockSide(DockSide::Undocked)
 {
     m_frontendPage->settings().setAllowFileAccessFromFileURLs(true);
+    m_frontendPage->settings().setJavaScriptRuntimeFlags({
+        JSC::RuntimeFlags::SymbolEnabled
+    });
     m_dispatchTask = std::make_unique<InspectorBackendDispatchTask>(inspectorController);
 }
 
index 85e9071..04823ae 100644 (file)
@@ -35,6 +35,7 @@
 #include "SettingsMacros.h"
 #include "Timer.h"
 #include <chrono>
+#include <runtime/RuntimeFlags.h>
 #include <unicode/uscript.h>
 #include <wtf/HashMap.h>
 #include <wtf/RefCounted.h>
index a1f6239..86df198 100644 (file)
@@ -73,7 +73,6 @@ showsURLsInToolTips initial=false
 showsToolTipOverTruncatedText initial=false
 forceFTPDirectoryListings initial=false
 developerExtrasEnabled initial=false
-javaScriptExperimentsEnabled initial=false
 scriptMarkupEnabled initial=true
 needsSiteSpecificQuirks initial=false
 domTimersThrottlingEnabled initial=true
@@ -87,6 +86,7 @@ canvasUsesAcceleratedDrawing initial=false
 acceleratedDrawingEnabled initial=false
 acceleratedFiltersEnabled initial=false
 useLegacyTextAlignPositionedElementBehavior initial=false
+javaScriptRuntimeFlags type=JSC::RuntimeFlags
 
 # FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
 # they can't use by. Leaving enabled for now to not change existing behavior.
index 26e8632..cf9c274 100644 (file)
@@ -1,3 +1,29 @@
+2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        REGRESSION(r179429): Can't type comments in Facebook
+        https://bugs.webkit.org/show_bug.cgi?id=141859
+
+        Reviewed by Brent Fulgham.
+
+        Introduce SymbolEnabled and drop javaScriptExperimentsEnabled.
+        Private API, javaScriptExperimentsEnabled is dropped.
+
+        * Misc/WebNSDictionaryExtras.h:
+        * Misc/WebNSDictionaryExtras.m:
+        (-[NSMutableDictionary _webkit_setUnsignedInt:forKey:]):
+        * WebKit.order:
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences _setUnsignedIntValue:forKey:]):
+        (-[WebPreferences javaScriptRuntimeFlags]):
+        (-[WebPreferences setJavaScriptRuntimeFlags:]):
+        (-[WebPreferences setJavaScriptExperimentsEnabled:]): Deleted.
+        (-[WebPreferences javaScriptExperimentsEnabled]): Deleted.
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2015-02-23  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r180547 and r180550.
index 8aca44e..0573202 100644 (file)
@@ -44,7 +44,5 @@
 - (void)_webkit_setBool:(BOOL)value forKey:(id)key;
 - (void)_webkit_setLongLong:(long long)value forKey:(id)key;
 - (void)_webkit_setUnsignedLongLong:(unsigned long long)value forKey:(id)key;
-#if PLATFORM(IOS)
 - (void)_webkit_setUnsignedInt:(unsigned)value forKey:(id)key;
-#endif
 @end
index 923674a..f1a1b03 100644 (file)
     [object release];
 }
 
-#if PLATFORM(IOS)
 - (void)_webkit_setUnsignedInt:(unsigned)value forKey:(id)key
 {
     NSNumber *object = [[NSNumber alloc] initWithUnsignedInt:value];
     [self setObject:object forKey:key];
     [object release];
 }
-#endif
 
 @end
 
index 7a27b75..7162172 100644 (file)
@@ -287,7 +287,6 @@ __Z4core40WebTextDirectionSubmenuInclusionBehavior
 -[WebPreferences(WebPrivate) showsURLsInToolTips]
 -[WebPreferences(WebPrivate) showsToolTipOverTruncatedText]
 -[WebPreferences(WebPrivate) developerExtrasEnabled]
--[WebPreferences(WebPrivate) javaScriptExperimentsEnabled]
 -[WebPreferences(WebPrivate) authorAndUserStylesEnabled]
 -[WebPreferences(WebPrivate) applicationChromeModeEnabled]
 -[WebPreferences userStyleSheetEnabled]
@@ -1246,7 +1245,6 @@ _WKCreatePrivateStorageSession
 -[WebPreferences(WebPrivate) setTextAreasAreResizable:]
 -[WebPreferences(WebPrivate) setJavaScriptCanAccessClipboard:]
 -[WebPreferences(WebPrivate) setOfflineWebApplicationCacheEnabled:]
--[WebPreferences(WebPrivate) setJavaScriptExperimentsEnabled:]
 -[WebPreferences(WebPrivate) setLoadsSiteIconsIgnoringImageLoadingPreference:]
 -[WebPreferences(WebPrivate) setFrameFlatteningEnabled:]
 -[WebPreferences(WebPrivate) setSpatialNavigationEnabled:]
index 56b19b8..beec230 100644 (file)
@@ -84,7 +84,7 @@
 #define WebKitFTPDirectoryTemplatePath @"WebKitFTPDirectoryTemplatePath"
 #define WebKitForceFTPDirectoryListings @"WebKitForceFTPDirectoryListings"
 #define WebKitDeveloperExtrasEnabledPreferenceKey @"WebKitDeveloperExtrasEnabledPreferenceKey"
-#define WebKitJavaScriptExperimentsEnabledPreferenceKey @"WebKitJavaScriptExperimentsEnabledPreferenceKey"
+#define WebKitJavaScriptRuntimeFlagsPreferenceKey @"WebKitJavaScriptRuntimeFlagsPreferenceKey"
 #define WebKitAuthorAndUserStylesEnabledPreferenceKey @"WebKitAuthorAndUserStylesEnabledPreferenceKey"
 #define WebKitDOMTimersThrottlingEnabledPreferenceKey @"WebKitDOMTimersThrottlingEnabledPreferenceKey"
 #define WebKitWebArchiveDebugModeEnabledPreferenceKey @"WebKitWebArchiveDebugModeEnabledPreferenceKey"
index 1367959..688e26b 100644 (file)
@@ -473,7 +473,7 @@ public:
         [NSNumber numberWithInt:cacheModelForMainBundle()], WebKitCacheModelPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitPageCacheSupportsPluginsPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitDeveloperExtrasEnabledPreferenceKey,
-        [NSNumber numberWithBool:NO],   WebKitJavaScriptExperimentsEnabledPreferenceKey,
+        [NSNumber numberWithUnsignedInt:0], WebKitJavaScriptRuntimeFlagsPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitAuthorAndUserStylesEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitDOMTimersThrottlingEnabledPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitWebArchiveDebugModeEnabledPreferenceKey,
@@ -667,7 +667,6 @@ public:
     [self _postPreferencesChangedNotification];
 }
 
-#if PLATFORM(IOS)
 - (unsigned int)_unsignedIntValueForKey:(NSString *)key
 {
     id o = [self _valueForKey:key];
@@ -678,14 +677,17 @@ public:
 {    if ([self _unsignedIntValueForKey:key] == value)
         return;
     NSString *_key = KEY(key);
+#if PLATFORM(IOS)
     dispatch_barrier_sync(_private->readWriteQueue, ^{
+#endif
     [_private->values.get() _webkit_setUnsignedInt:value forKey:_key];
+#if PLATFORM(IOS)
     });
+#endif
     if (_private->autosaves)
         [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithUnsignedInt:value] forKey:_key];
     [self _postPreferencesChangedNotification];
 }
-#endif
 
 - (float)_floatValueForKey:(NSString *)key
 {
@@ -1184,14 +1186,14 @@ public:
 #endif
 }
 
-- (void)setJavaScriptExperimentsEnabled:(BOOL)flag
+- (WebKitJavaScriptRuntimeFlags)javaScriptRuntimeFlags
 {
-    [self _setBoolValue:flag forKey:WebKitJavaScriptExperimentsEnabledPreferenceKey];
+    return static_cast<WebKitJavaScriptRuntimeFlags>([self _unsignedIntValueForKey:WebKitJavaScriptRuntimeFlagsPreferenceKey]);
 }
 
-- (BOOL)javaScriptExperimentsEnabled
+- (void)setJavaScriptRuntimeFlags:(WebKitJavaScriptRuntimeFlags)flags
 {
-    return [self _boolValueForKey:WebKitJavaScriptExperimentsEnabledPreferenceKey];
+    [self _setUnsignedIntValue:flags forKey:WebKitJavaScriptRuntimeFlagsPreferenceKey];
 }
 
 - (void)setDeveloperExtrasEnabled:(BOOL)flag
index fdd8b67..72f6825 100644 (file)
@@ -52,6 +52,11 @@ typedef enum {
     WebBlockAllStorage
 } WebStorageBlockingPolicy;
 
+typedef enum {
+    WebKitJavaScriptRuntimeFlagsSymbolEnabled = 1u << 0,
+    WebKitJavaScriptRuntimeFlagsAllEnabled = WebKitJavaScriptRuntimeFlagsSymbolEnabled
+} WebKitJavaScriptRuntimeFlags;
+
 extern NSString *WebPreferencesChangedNotification;
 extern NSString *WebPreferencesRemovedNotification;
 extern NSString *WebPreferencesChangedInternalNotification;
@@ -67,8 +72,8 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
 - (BOOL)developerExtrasEnabled;
 - (void)setDeveloperExtrasEnabled:(BOOL)flag;
 
-- (BOOL)javaScriptExperimentsEnabled;
-- (void)setJavaScriptExperimentsEnabled:(BOOL)flag;
+- (WebKitJavaScriptRuntimeFlags)javaScriptRuntimeFlags;
+- (void)setJavaScriptRuntimeFlags:(WebKitJavaScriptRuntimeFlags)flags;
 
 - (BOOL)authorAndUserStylesEnabled;
 - (void)setAuthorAndUserStylesEnabled:(BOOL)flag;
index 65ee148..5af8a1e 100644 (file)
@@ -2234,7 +2234,7 @@ static bool needsSelfRetainWhileLoadingQuirk()
     settings.setBackForwardCacheExpirationInterval([preferences _backForwardCacheExpirationInterval]);
 
     settings.setDeveloperExtrasEnabled([preferences developerExtrasEnabled]);
-    settings.setJavaScriptExperimentsEnabled([preferences javaScriptExperimentsEnabled]);
+    settings.setJavaScriptRuntimeFlags(JSC::RuntimeFlags([preferences javaScriptRuntimeFlags]));
     settings.setAuthorAndUserStylesEnabled([preferences authorAndUserStylesEnabled]);
 
     settings.setNeedsSiteSpecificQuirks(_private->useSiteSpecificSpoofing);
index f47e257..878d3b9 100644 (file)
@@ -1,3 +1,24 @@
+2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        REGRESSION(r179429): Can't type comments in Facebook
+        https://bugs.webkit.org/show_bug.cgi?id=141859
+
+        Reviewed by Brent Fulgham.
+
+        Added Windows support.
+
+        * Interfaces/IWebPreferences.idl:
+        * Interfaces/IWebPreferencesPrivate.idl:
+        * WebPreferenceKeysPrivate.h:
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings):
+        (WebPreferences::javaScriptRuntimeFlags):
+        (WebPreferences::setJavaScriptRuntimeFlags):
+        (WebPreferences::isWebSecurityEnabled):
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2015-02-18  Chris Dumez  <cdumez@apple.com>
 
         Access FontCache global instance via singleton() static member function
index c32c3c1..ae6c831 100644 (file)
@@ -59,6 +59,11 @@ typedef enum WebCacheModel {
     WebCacheModelPrimaryWebBrowser = 2
 } WebCacheModel;
 
+typedef enum WebKitJavaScriptRuntimeFlags {
+    WebKitJavaScriptRuntimeFlagsSymbolEnabled = 1,  // 1u << 0
+    WebKitJavaScriptRuntimeFlagsAllEnabled = WebKitJavaScriptRuntimeFlagsSymbolEnabled
+} WebKitJavaScriptRuntimeFlags;
+
 [
     object,
     oleautomation,
index 1142586..4d503f2 100644 (file)
@@ -113,6 +113,9 @@ interface IWebPreferencesPrivate : IUnknown
     HRESULT javaScriptCanAccessClipboard([out, retval] BOOL *enabled);
     HRESULT setJavaScriptCanAccessClipboard([in] BOOL enabled);
 
+    HRESULT javaScriptRuntimeFlags([out, retval] unsigned* flags);
+    HRESULT setJavaScriptRuntimeFlags([in] unsigned flags);
+
     HRESULT isDNSPrefetchingEnabled([out, retval] BOOL *enabled);
     HRESULT setDNSPrefetchingEnabled([in] BOOL enabled);
 
index 31ec494..a2fb951 100644 (file)
@@ -48,6 +48,7 @@
 #define WebKitTextAreasAreResizablePreferenceKey "WebKitTextAreasAreResizable"
 #define WebKitJavaEnabledPreferenceKey "WebKitJavaEnabled"
 #define WebKitJavaScriptEnabledPreferenceKey "WebKitJavaScriptEnabled"
+#define WebKitJavaScriptRuntimeFlagsPreferenceKey "WebKitJavaScriptRuntimeFlags"
 #define WebKitWebSecurityEnabledPreferenceKey "WebKitWebSecurityEnabled"
 #define WebKitAllowUniversalAccessFromFileURLsPreferenceKey "WebKitAllowUniversalAccessFromFileURLs"
 #define WebKitAllowFileAccessFromFileURLsPreferenceKey "WebKitAllowFileAccessFromFileURLs"
index cabbe66..0edce63 100644 (file)
@@ -215,6 +215,7 @@ void WebPreferences::initializeDefaultSettings()
     CFDictionaryAddValue(defaults, CFSTR(WebKitTextAreasAreResizablePreferenceKey), kCFBooleanFalse);
     CFDictionaryAddValue(defaults, CFSTR(WebKitJavaEnabledPreferenceKey), kCFBooleanTrue);
     CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptEnabledPreferenceKey), kCFBooleanTrue);
+    CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptRuntimeFlagsPreferenceKey), CFSTR("0"));
     CFDictionaryAddValue(defaults, CFSTR(WebKitWebSecurityEnabledPreferenceKey), kCFBooleanTrue);
     CFDictionaryAddValue(defaults, CFSTR(WebKitAllowUniversalAccessFromFileURLsPreferenceKey), kCFBooleanFalse);
     CFDictionaryAddValue(defaults, CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), kCFBooleanTrue);
@@ -823,7 +824,21 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setJavaScriptEnabled(
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebPreferences::isWebSecurityEnabled( 
+HRESULT STDMETHODCALLTYPE WebPreferences::javaScriptRuntimeFlags(
+    /* [retval][out] */ unsigned* flags)
+{
+    *flags = static_cast<unsigned>(integerValueForKey(WebKitJavaScriptRuntimeFlagsPreferenceKey));
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::setJavaScriptRuntimeFlags(
+    /* [in] */ unsigned flags)
+{
+    setIntegerValue(WebKitJavaScriptRuntimeFlagsPreferenceKey, static_cast<int>(flags));
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::isWebSecurityEnabled(
     /* [retval][out] */ BOOL* enabled)
 {
     *enabled = boolValueForKey(WebKitWebSecurityEnabledPreferenceKey);
index 91873b7..2f385f5 100644 (file)
@@ -150,7 +150,13 @@ public:
     
     virtual HRESULT STDMETHODCALLTYPE setJavaScriptEnabled( 
         /* [in] */ BOOL enabled);
-    
+
+    virtual HRESULT STDMETHODCALLTYPE javaScriptRuntimeFlags(
+        /* [retval][out] */ unsigned*);
+
+    virtual HRESULT STDMETHODCALLTYPE setJavaScriptRuntimeFlags(
+        /* [in] */ unsigned);
+
     virtual HRESULT STDMETHODCALLTYPE javaScriptCanOpenWindowsAutomatically( 
         /* [retval][out] */ BOOL* enabled);
     
index 539bda6..62b3b72 100644 (file)
@@ -4759,6 +4759,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
 
     BString str;
     int size;
+    unsigned javaScriptRuntimeFlags;
     BOOL enabled;
 
     Settings& settings = m_page->settings();
@@ -5140,6 +5141,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
         return hr;
     settings.setEnableInheritURIQueryComponent(enabled);
 
+    hr = prefsPrivate->javaScriptRuntimeFlags(&javaScriptRuntimeFlags);
+    if (FAILED(hr))
+        return hr;
+    settings.setJavaScriptRuntimeFlags(JSC::RuntimeFlags(javaScriptRuntimeFlags));
+
     return S_OK;
 }
 
index a6dc0fd..734768b 100644 (file)
@@ -1,3 +1,34 @@
+2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        REGRESSION(r179429): Can't type comments in Facebook
+        https://bugs.webkit.org/show_bug.cgi?id=141859
+
+        Reviewed by Brent Fulgham.
+
+        Enable SymbolEnabled in inspector context.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetJavaScriptRuntimeFlags):
+        (WKPreferencesGetJavaScriptRuntimeFlags):
+        (WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
+        (WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
+        * UIProcess/API/C/WKPreferencesRef.h:
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _javaScriptRuntimeFlags]):
+        (-[WKPreferences _setJavaScriptRuntimeFlags:]):
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+        * UIProcess/efl/WebInspectorProxyEfl.cpp:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+        * mac/WebKit2.order:
+
 2015-02-24  Anders Carlsson  <andersca@apple.com>
 
         Tighten up some SecurityOrigin related code, use references where possible
index 7109a04..d75428a 100644 (file)
@@ -95,7 +95,6 @@
     macro(DatabasesEnabled, databasesEnabled, Bool, bool, true) \
     macro(XSSAuditorEnabled, xssAuditorEnabled, Bool, bool, true) \
     macro(FrameFlatteningEnabled, frameFlatteningEnabled, Bool, bool, DEFAULT_FRAME_FLATTENING_ENABLED) \
-    macro(JavaScriptExperimentsEnabled, javaScriptExperimentsEnabled, Bool, bool, false) \
     macro(PrivateBrowsingEnabled, privateBrowsingEnabled, Bool, bool, false) \
     macro(TextAreasAreResizable, textAreasAreResizable, Bool, bool, DEFAULT_TEXT_AREAS_ARE_RESIZABLE) \
     macro(JavaScriptCanOpenWindowsAutomatically, javaScriptCanOpenWindowsAutomatically, Bool, bool, DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY) \
     macro(InspectorAttachedWidth, inspectorAttachedWidth, UInt32, uint32_t, 750) \
     macro(InspectorAttachmentSide, inspectorAttachmentSide, UInt32, uint32_t, 0) \
     macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage) \
+    macro(JavaScriptRuntimeFlags, javaScriptRuntimeFlags, UInt32, uint32_t, 0) \
     \
 
 #define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
index c058921..2a8ad6e 100644 (file)
@@ -349,14 +349,14 @@ bool WKPreferencesGetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef)
     return toImpl(preferencesRef)->developerExtrasEnabled();
 }
 
-void WKPreferencesSetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef, bool enabled)
+void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef, WKJavaScriptRuntimeFlagSet javaScriptRuntimeFlagSet)
 {
-    toImpl(preferencesRef)->setJavaScriptExperimentsEnabled(enabled);
+    toImpl(preferencesRef)->setJavaScriptRuntimeFlags(javaScriptRuntimeFlagSet);
 }
 
-bool WKPreferencesGetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef)
+WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef)
 {
-    return toImpl(preferencesRef)->javaScriptExperimentsEnabled();
+    return toImpl(preferencesRef)->javaScriptRuntimeFlags();
 }
 
 void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable)
index d5e7464..24aa432 100644 (file)
@@ -150,10 +150,6 @@ WK_EXPORT bool WKPreferencesGetPrivateBrowsingEnabled(WKPreferencesRef preferenc
 WK_EXPORT void WKPreferencesSetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef, bool enabled);
 WK_EXPORT bool WKPreferencesGetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef);
 
-// Defaults to false.
-WK_EXPORT void WKPreferencesSetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef, bool enabled);
-WK_EXPORT bool WKPreferencesGetJavaScriptExperimentsEnabled(WKPreferencesRef preferencesRef);
-
 // Defaults to true.
 WK_EXPORT void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable);
 WK_EXPORT bool WKPreferencesGetTextAreasAreResizable(WKPreferencesRef preferencesRef);
index 5df4ef2..44e278c 100644 (file)
@@ -49,6 +49,12 @@ enum WKEditableLinkBehavior {
 };
 typedef enum WKEditableLinkBehavior WKEditableLinkBehavior;
 
+enum WKJavaScriptRuntimeFlags {
+    kWKJavaScriptRuntimeFlagsSymbolEnabled = 1 << 0,
+    kWKJavaScriptRuntimeFlagsAllEnabled = kWKJavaScriptRuntimeFlagsSymbolEnabled
+};
+typedef unsigned WKJavaScriptRuntimeFlagSet;
+
 // Creates a copy with no identifier.
 WK_EXPORT WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef);
 
@@ -346,6 +352,10 @@ WK_EXPORT double WKPreferencesGetMinimumZoomFontSize(WKPreferencesRef preference
 WK_EXPORT void WKPreferencesSetScreenFontSubstitutionEnabled(WKPreferencesRef preferences, bool enabled);
 WK_EXPORT bool WKPreferencesGetScreenFontSubstitutionEnabled(WKPreferencesRef preferences);
 
+// Defaults to 0.
+WK_EXPORT void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferences, WKJavaScriptRuntimeFlagSet javascriptRuntimeFlagSet);
+WK_EXPORT WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferences);
+
 #ifdef __cplusplus
 }
 #endif
index efcafbe..7c37db3 100644 (file)
@@ -267,6 +267,16 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setAllowFileAccessFromFileURLs(allowFileAccessFromFileURLs);
 }
 
+- (_WKJavaScriptRuntimeFlags)_javaScriptRuntimeFlags
+{
+    return _preferences->javaScriptRuntimeFlags();
+}
+
+- (void)_setJavaScriptRuntimeFlags:(_WKJavaScriptRuntimeFlags)javaScriptRuntimeFlags
+{
+    _preferences->setJavaScriptRuntimeFlags(javaScriptRuntimeFlags);
+}
+
 - (BOOL)_isStandalone
 {
     return _preferences->standalone();
index fe047a0..33de8ba 100644 (file)
@@ -42,6 +42,11 @@ typedef NS_OPTIONS(NSUInteger, _WKDebugOverlayRegions) {
     _WKWheelEventHandlerRegion = 1 << 1
 } WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
+typedef NS_OPTIONS(NSUInteger, _WKJavaScriptRuntimeFlags) {
+    _WKJavaScriptRuntimeFlagsSymbolEnabled = 1 << 0,
+    _WKJavaScriptRuntimeFlagsAllEnabled = _WKJavaScriptRuntimeFlagsSymbolEnabled
+} WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
+
 @interface WKPreferences (WKPrivate)
 
 // FIXME: This property should not have the verb "is" in it.
@@ -59,6 +64,7 @@ typedef NS_OPTIONS(NSUInteger, _WKDebugOverlayRegions) {
 @property (nonatomic, setter=_setLogsPageMessagesToSystemConsoleEnabled:) BOOL _logsPageMessagesToSystemConsoleEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
 @property (nonatomic, setter=_setAllowFileAccessFromFileURLs:) BOOL _allowFileAccessFromFileURLs WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
+@property (nonatomic, setter=_setJavaScriptRuntimeFlags:) _WKJavaScriptRuntimeFlags _javaScriptRuntimeFlags WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
 @property (nonatomic, setter=_setStandalone:, getter=_isStandalone) BOOL _standalone WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
index 830eb4c..b35a5f7 100644 (file)
@@ -114,6 +114,7 @@ WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
 
     WKPreferencesRef wkPreferences = WKPageGroupGetPreferences(wkPageGroup);
     WKPreferencesSetFileAccessFromFileURLsAllowed(wkPreferences, true);
+    WKPreferencesSetJavaScriptRuntimeFlags(wkPreferences, kWKJavaScriptRuntimeFlagsSymbolEnabled);
 
     return toImpl(WKViewGetPage(wkView));
 }
index e4a2b54..9e77bd4 100644 (file)
@@ -69,6 +69,9 @@ WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
     preferences->setLogsPageMessagesToSystemConsoleEnabled(true);
 #endif
     preferences->setAllowFileAccessFromFileURLs(true);
+    preferences->setJavaScriptRuntimeFlags({
+        JSC::RuntimeFlags::SymbolEnabled
+    });
     RefPtr<WebPageGroup> pageGroup = WebPageGroup::create(inspectorPageGroupIdentifier(), false, false);
     m_inspectorView = GTK_WIDGET(webkitWebViewBaseCreate(&inspectorProcessPool(), preferences.get(), pageGroup.get(), nullptr, nullptr));
     g_object_add_weak_pointer(G_OBJECT(m_inspectorView), reinterpret_cast<void**>(&m_inspectorView));
index a8d56eb..c63023f 100644 (file)
@@ -488,6 +488,7 @@ WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
     preferences._logsPageMessagesToSystemConsoleEnabled = YES;
 #endif
     preferences._allowFileAccessFromFileURLs = YES;
+    preferences._javaScriptRuntimeFlags = _WKJavaScriptRuntimeFlagsSymbolEnabled;
     [configuration setProcessPool: ::WebKit::wrapper(inspectorProcessPool())];
     [configuration _setGroupIdentifier:inspectorPageGroupIdentifier()];
 
index b0de303..870ed92 100644 (file)
@@ -2653,7 +2653,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     else if (!store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()) && sessionID() == SessionID::legacyPrivateSessionID())
         setSessionID(SessionID::defaultSessionID());
     settings.setDeveloperExtrasEnabled(store.getBoolValueForKey(WebPreferencesKey::developerExtrasEnabledKey()));
-    settings.setJavaScriptExperimentsEnabled(store.getBoolValueForKey(WebPreferencesKey::javaScriptExperimentsEnabledKey()));
+    settings.setJavaScriptRuntimeFlags(RuntimeFlags(store.getUInt32ValueForKey(WebPreferencesKey::javaScriptRuntimeFlagsKey())));
     settings.setTextAreasAreResizable(store.getBoolValueForKey(WebPreferencesKey::textAreasAreResizableKey()));
     settings.setNeedsSiteSpecificQuirks(store.getBoolValueForKey(WebPreferencesKey::needsSiteSpecificQuirksKey()));
     settings.setJavaScriptCanOpenWindowsAutomatically(store.getBoolValueForKey(WebPreferencesKey::javaScriptCanOpenWindowsAutomaticallyKey()));
index ae625f7..8a03838 100644 (file)
@@ -176,7 +176,6 @@ __ZN6WebKit17WebPreferencesKey19databasesEnabledKeyEv
 __ZN6WebKit17WebPreferencesKey20xssAuditorEnabledKeyEv
 __ZN6WebKit17WebPreferencesKey25frameFlatteningEnabledKeyEv
 __ZN6WebKit17WebPreferencesKey25developerExtrasEnabledKeyEv
-__ZN6WebKit17WebPreferencesKey31javaScriptExperimentsEnabledKeyEv
 __ZN6WebKit17WebPreferencesKey25privateBrowsingEnabledKeyEv
 __ZN6WebKit17WebPreferencesKey24textAreasAreResizableKeyEv
 __ZN6WebKit17WebPreferencesKey40javaScriptCanOpenWindowsAutomaticallyKeyEv
@@ -8129,8 +8128,6 @@ _WKPreferencesSetXSSAuditorEnabled
 __ZN6WebKit14WebPreferences20setXSSAuditorEnabledERKb
 _WKPreferencesSetWebAudioEnabled
 __ZN6WebKit14WebPreferences18setWebAudioEnabledERKb
-_WKPreferencesSetJavaScriptExperimentsEnabled
-__ZN6WebKit14WebPreferences31setJavaScriptExperimentsEnabledERKb
 _WKPreferencesSetJavaScriptCanAccessClipboard
 __ZN6WebKit14WebPreferences31setJavaScriptCanAccessClipboardERKb
 _WKPreferencesSetDOMPasteAllowed
index 060e77e..33e4cb9 100644 (file)
@@ -1,3 +1,19 @@
+2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        REGRESSION(r179429): Can't type comments in Facebook
+        https://bugs.webkit.org/show_bug.cgi?id=141859
+
+        Reviewed by Brent Fulgham.
+
+        Drop javaScriptExperimentsEnabled and specify JavaScriptRuntimeFlagsAllEnabled as KJavaScriptRuntimeFlags.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (resetWebPreferencesToConsistentValues):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (resetWebPreferencesToConsistentValues):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetPreferencesToConsistentValues):
+
 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         Crash loading local file with WebPageProxy::loadAlternateHTMLString
index 212e51b..63521e9 100644 (file)
@@ -839,7 +839,7 @@ static void resetWebPreferencesToConsistentValues()
     [preferences setJavaScriptCanAccessClipboard:YES];
     [preferences setOfflineWebApplicationCacheEnabled:YES];
     [preferences setDeveloperExtrasEnabled:NO];
-    [preferences setJavaScriptExperimentsEnabled:YES];
+    [preferences setJavaScriptRuntimeFlags:WebKitJavaScriptRuntimeFlagsAllEnabled];
     [preferences setLoadsImagesAutomatically:YES];
     [preferences setLoadsSiteIconsIgnoringImageLoadingPreference:NO];
     [preferences setFrameFlatteningEnabled:NO];
index 2415b0f..a528c6b 100644 (file)
@@ -816,6 +816,7 @@ static void resetWebPreferencesToConsistentValues(IWebPreferences* preferences)
     prefsPrivate->setJavaScriptCanAccessClipboard(TRUE);
     prefsPrivate->setOfflineWebApplicationCacheEnabled(TRUE);
     prefsPrivate->setDeveloperExtrasEnabled(FALSE);
+    prefsPrivate->setJavaScriptRuntimeFlags(WebKitJavaScriptRuntimeFlagsAllEnabled);
     // Set JS experiments enabled: YES
     preferences->setLoadsImagesAutomatically(TRUE);
     prefsPrivate->setLoadsSiteIconsIgnoringImageLoadingPreference(FALSE);
index 3f5cf2d..3481340 100644 (file)
@@ -549,7 +549,7 @@ void TestController::resetPreferencesToConsistentValues()
     WKPreferencesSetWebAudioEnabled(preferences, true);
     WKPreferencesSetMediaStreamEnabled(preferences, true);
     WKPreferencesSetDeveloperExtrasEnabled(preferences, true);
-    WKPreferencesSetJavaScriptExperimentsEnabled(preferences, true);
+    WKPreferencesSetJavaScriptRuntimeFlags(preferences, kWKJavaScriptRuntimeFlagsAllEnabled);
     WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(preferences, true);
     WKPreferencesSetJavaScriptCanAccessClipboard(preferences, true);
     WKPreferencesSetDOMPasteAllowed(preferences, true);