Adding RTCPeerConnectionErrorCallback
https://bugs.webkit.org/show_bug.cgi?id=125574

Reviewed by Eric Carlson.

According to the spec there should be a RTCPeerConnectionErrorCallback function type for createOffer/Answer,
setLocal/RemoteDescription and updateIce function calls. This callback must handle a DOMError object.

Source/WebCore:

Existing tests were updated.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createOffer):
(WebCore::RTCPeerConnection::createAnswer):
(WebCore::RTCPeerConnection::setLocalDescription):
(WebCore::RTCPeerConnection::setRemoteDescription):
(WebCore::RTCPeerConnection::addIceCandidate):
* Modules/mediastream/RTCErrorCallback.h: Removed.
* Modules/mediastream/RTCErrorCallback.idl: Removed.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCPeerConnectionErrorCallback.h: Added.
* Modules/mediastream/RTCPeerConnectionErrorCallback.idl: Added.
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
(WebCore::RTCSessionDescriptionRequestImpl::create):
(WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
(WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
* Modules/mediastream/RTCVoidRequestImpl.cpp:
(WebCore::RTCVoidRequestImpl::create):
(WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
(WebCore::RTCVoidRequestImpl::requestFailed):
* Modules/mediastream/RTCVoidRequestImpl.h:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(WebCore::RTCPeerConnectionHandler::incompatibleConstraintsErrorName):
(WebCore::RTCPeerConnectionHandler::invalidSessionDescriptionErrorName):
(WebCore::RTCPeerConnectionHandler::incompatibleSessionDescriptionErrorName):
(WebCore::RTCPeerConnectionHandler::internalErrorName):
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mock/RTCNotifiersMock.cpp:
(WebCore::SessionRequestNotifier::SessionRequestNotifier):
(WebCore::SessionRequestNotifier::fire):
(WebCore::VoidRequestNotifier::VoidRequestNotifier):
(WebCore::VoidRequestNotifier::fire):
* platform/mock/RTCNotifiersMock.h:
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
(WebCore::RTCPeerConnectionHandlerMock::createOffer):
(WebCore::RTCPeerConnectionHandlerMock::createAnswer):

LayoutTests:

* fast/mediastream/RTCPeerConnection-createAnswer-expected.txt:
* fast/mediastream/RTCPeerConnection-createAnswer.html:
* fast/mediastream/RTCPeerConnection-createOffer-expected.txt:
* fast/mediastream/RTCPeerConnection-createOffer.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] Handle pinch-to-zoom gesture
https://bugs.webkit.org/show_bug.cgi?id=125604

Reviewed by Sam Weinig.

* UIProcess/API/mac/WKView.mm:
(-[WKView magnifyWithEvent:]):
(-[WKView endGestureWithEvent:]):
Forward the event up the chain if we're not going to handle it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build.

Work around a problem in Functional.h by making the DatabaseProcess destructor public.

* DatabaseProcess/DatabaseProcess.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r160548.

* Scripts/webkitdirs.pm:
(setupCygwinEnv): VCExpress.exe is now called WDExpress.exe.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
https://bugs.webkit.org/show_bug.cgi?id=125595

Reviewed by Timothy Hatcher.

* GNUmakefile.am:

Source/JavaScriptCore:

  - Move CodeGeneration scripts from WebCore into JavaScriptCore/inspector/scripts
  - For ports that build WebKit frameworks separately, export the scripts as PrivateHeaders
  - Update CodeGeneratorInspector.py in a few ways:
    - output dynamic filenames, so JavaScriptCore generates InspectorJSFoo.* and WebCore generates InspectorWebFoo.*
    - take in more then one protocol JSON file. The first contains domains to generate, the others are dependencies
      that are generated elsewhere that we can depend on for Types.
  - Add DerivedSources build step to generate the Inspector Interfaces

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add scripts and code generation.

* inspector/protocol/Runtime.json: Renamed from Source/WebCore/inspector/protocol/Runtime.json.
Move protocol file into JavaScriptCore so its types will be generated in JavaScriptCore.

* inspector/scripts/CodeGeneratorInspector.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspector.py.
Updates to the script as listed above.

* inspector/scripts/CodeGeneratorInspectorStrings.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspectorStrings.py.
* inspector/scripts/generate-combined-inspector-json.py: Renamed from Source/WebCore/inspector/Scripts/generate-combined-inspector-json.py.
Moved from WebCore into JavaScriptCore for code generation.

Source/WebCore:

  - CodeGeneration changed to output Frontend and Backend dispatchers
    in namespace Inspector. So update all the agent's appropriately.
  - Update Derived Sources code generation to use the Scripts that had
    moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
    directly, but others have to use the Scripts exported by JSC
    in JavaScriptCore's PrivateHeaders.
  - Add ForwardingHeaders for the files generated in JavaScriptCore.
  - Update the names of Inspector DerivedSources files, since they
    were renamed to InspectorWeb*.

No new tests, this only moves code around. There are no functional changes.

* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/build-generated-files.sh:
* WebCore.xcodeproj/project.pbxproj:
Remove files, rename files, update code generation.

* make-generated-sources.sh:
Update this standalone developer script to fill in the new InspectorScripts variable.

* inspector/ConsoleMessage.h:
* inspector/InjectedScriptHost.cpp:
* inspector/InspectorAgent.cpp:
* inspector/InspectorAgent.h:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* inspector/ScriptCallFrame.cpp:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerRuntimeAgent.h:
Updates header names and class namespace changes.

Source/WebInspectorUI:

* Scripts/copy-user-interface-resources.sh:
Copy all the different backend commands files.

* Scripts/update-InspectorBackendCommands.rb:
Update with respect to new script location and new file names.

* WebInspectorUI.xcodeproj/project.pbxproj:
Remove Inputs and Outputs of build phase, which were wrong.
Now this build phase always runs, and not by accident.

* UserInterface/InspectorJSBackendCommands.js: Added.
* UserInterface/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/InspectorBackendCommands.js.
* UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorBackendCommands.js.
* UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorBackendCommands.js.
* UserInterface/LoadInspectorBackendCommands.js:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

LayoutTests:

* http/tests/inspector-protocol/resources/InspectorTest.js:
(InspectorTest.importInspectorScripts):
Update for the new backend commands files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make inspector folder groups smarter in JavaScriptCore.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=125663

Reviewed by Darin Adler.

* JavaScriptCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Post-process exported WebKit headers based on PLATFORM_NAME
https://bugs.webkit.org/show_bug.cgi?id=125682

Reviewed by Dan Bernstein.

Added a build phase that calls unifdef(1) on each of WebKit's Public
and Private headers, defining TARGET_OS_EMBEDDED, TARGET_OS_IPHONE, and
TARGET_IPHONE_SIMULATOR based on the value of PLATFORM_NAME. This has
the effect of stripping out bits not needed by the SDK being built for.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update Apple Webkit Bots
        
Unreviewed.

* BuildSlaveSupport/build.webkit.org-config/config.json:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Require variadic templates to build WebKit
https://bugs.webkit.org/show_bug.cgi?id=125701

Reviewed by Andreas Kling.

* wtf/Compiler.h:
Add an #error if variadic templates are disabled.

* wtf/NeverDestroyed.h:
* wtf/PassRef.h:
* wtf/StdLibExtras.h:
Remove a bunch of COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES) #ifdefs.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Unreviewed build fix after r160548

Source/JavaScriptCore: 

* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Specify
that we are using the vs12_xp target for Makefile-based projects.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Ditto
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Ditto.

Source/WebCore: 

* WebCore.vcxproj/WebCoreGenerated.vcxproj: Specify that we are
using the vs120_xp build target for Makefile-based projects.

Source/WTF: 

* WTF.vcxproj/WTFGenerated.vcxproj: Specify that we are using
the vs12_xp target for Makefile-based projects.

Tools: 

* win/AssembleBuildLogs/AssembleBuildLogs.vcxproj: Specify
we are using vs12_xp target for Makefile-based projects.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Unreviewed build fix after r160563

* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Missed the Debug
target in my last patch.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup CodeGeneratorInspectorStrings a bit
https://bugs.webkit.org/show_bug.cgi?id=125705

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-13
Reviewed by Timothy Hatcher.

* inspector/scripts/CodeGeneratorInspectorStrings.py:
Use ${foo} variable syntax and add an ASCIILiteral.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK2: Add support for inline candidates on iOS.
https://bugs.webkit.org/show_bug.cgi?id=125667

Reviewed by Benjamin Poulain.

The state required to support inline candidates is cached in the UI process.
Asynchronous messages are used to set and confirm the composition.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView textFirstRect]):
(-[WKInteractionView textLastRect]):
(-[WKInteractionView hasMarkedText]):
(-[WKInteractionView markedText]):
(-[WKInteractionView setMarkedText:selectedRange:]):
(-[WKInteractionView unmarkText]):
(-[WKInteractionView _selectionChanged]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::confirmComposition):
(WebKit::WebPageProxy::notifyRevealedSelection):
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::confirmComposition):



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