MediaStream API: Add Ice-related functionality to RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=95565

Reviewed by Adam Barth.

Source/Platform:

* Platform.gypi:
* chromium/public/WebRTCICECandidateDescriptor.h: Copied from Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h.
(WebCore):
(WebKit):
(WebRTCICECandidateDescriptor):
(WebKit::WebRTCICECandidateDescriptor::WebRTCICECandidateDescriptor):
(WebKit::WebRTCICECandidateDescriptor::~WebRTCICECandidateDescriptor):
(WebKit::WebRTCICECandidateDescriptor::operator=):
(WebKit::WebRTCICECandidateDescriptor::isNull):
* chromium/public/WebRTCPeerConnectionHandler.h:
(WebKit):
(WebRTCPeerConnectionHandler):
* chromium/public/WebRTCPeerConnectionHandlerClient.h:
(WebKit):
(WebRTCPeerConnectionHandlerClient):

Source/WebCore:

Adds all Ice-related functionality to RTCPeerConnection, including
events, callbacks and methods.

Test: fast/mediastream/RTCPeerConnection-ice.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCIceCandidateEvent.cpp: Added.
(WebCore):
(WebCore::RTCIceCandidateEvent::create):
(WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
(WebCore::RTCIceCandidateEvent::~RTCIceCandidateEvent):
(WebCore::RTCIceCandidateEvent::candidate):
(WebCore::RTCIceCandidateEvent::interfaceName):
* Modules/mediastream/RTCIceCandidateEvent.h: Added.
(WebCore):
(RTCIceCandidateEvent):
* Modules/mediastream/RTCIceCandidateEvent.idl: Added.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::updateIce):
(WebCore):
(WebCore::RTCPeerConnection::addIceCandidate):
(WebCore::RTCPeerConnection::iceState):
(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::didGenerateIceCandidate):
(WebCore::RTCPeerConnection::didChangeIceState):
(WebCore::RTCPeerConnection::stop):
(WebCore::RTCPeerConnection::changeIceState):
* Modules/mediastream/RTCPeerConnection.h:
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* WebCore.gypi:
* dom/EventNames.h:
(WebCore):
* dom/EventNames.in:
* platform/chromium/support/WebRTCICECandidateDescriptor.cpp: Copied from Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp.
(WebKit):
(WebKit::WebRTCICECandidateDescriptor::WebRTCICECandidateDescriptor):
(WebKit::WebRTCICECandidateDescriptor::assign):
(WebKit::WebRTCICECandidateDescriptor::reset):
(WebKit::WebRTCICECandidateDescriptor::initialize):
(WebKit::WebRTCICECandidateDescriptor::operator PassRefPtr<WebCore::RTCIceCandidateDescriptor>):
(WebKit::WebRTCICECandidateDescriptor::candidate):
(WebKit::WebRTCICECandidateDescriptor::sdpMid):
(WebKit::WebRTCICECandidateDescriptor::sdpMLineIndex):
* platform/mediastream/RTCIceCandidateDescriptor.h:
(WebCore::RTCIceCandidateDescriptor::candidate):
(WebCore::RTCIceCandidateDescriptor::sdpMid):
(WebCore::RTCIceCandidateDescriptor::sdpMLineIndex):
* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore):
(RTCPeerConnectionHandler):
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
(WebCore):
(RTCPeerConnectionHandlerClient):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::updateIce):
(WebCore):
(WebCore::RTCPeerConnectionHandlerChromium::addIceCandidate):
(WebCore::RTCPeerConnectionHandlerChromium::didGenerateICECandidate):
(WebCore::RTCPeerConnectionHandlerChromium::didChangeICEState):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(WebKit):
(RTCPeerConnectionHandlerChromium):

Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp:

Tools:

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
(MockWebRTCPeerConnectionHandler::updateICE):
(MockWebRTCPeerConnectionHandler::addICECandidate):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
(MockWebRTCPeerConnectionHandler):

LayoutTests:

* fast/mediastream/RTCPeerConnection-ice-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-ice.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [WebGL] Make the injected __resourceObject property non-enumerable
https://bugs.webkit.org/show_bug.cgi?id=95682

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-09-03
Reviewed by Pavel Feldman.

Make the injected auxiliary property __resourceObject non-enumerable to hide it from for..in iterations.
Ideally this property should be completely hidden from the user's code.
Drive-by: Fix couple of small FIXME's.

* inspector/InjectedScriptWebGLModuleSource.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Create JavaScriptSources based on network resources.
https://bugs.webkit.org/show_bug.cgi?id=95352

Reviewed by Pavel Feldman.

Source/WebCore:

Introduced NetworkUISourceCodeProvider that is listening for ResourceTreeModel and creates UISourceCodes for them.
RawSourceCode does not create uiSourceCodes based on resource anymore (this is done by NetworkUISourceCodeProvider instead).
Moved script <-> uiSourceCode binding logic from RawSourceCode to ResourceScriptMapping.
Removed rawSourceCode as it was not needed anymore.

Tests: inspector/debugger/network-uisourcecode-provider.html
       inspector/debugger/resource-script-mapping.html

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/CompilerScriptMapping.js:
* inspector/front-end/JavaScriptSource.js:
(WebInspector.JavaScriptSource):
* inspector/front-end/NetworkUISourceCodeProvider.js: Renamed from Source/WebCore/inspector/front-end/StylesUISourceCodeProvider.js.
(WebInspector.NetworkUISourceCodeProvider):
(WebInspector.NetworkUISourceCodeProvider.prototype._populate):
(WebInspector.NetworkUISourceCodeProvider.prototype._styleResourceAdded):
(WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded.resourceFinished):
(WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded):
(WebInspector.NetworkUISourceCodeProvider.prototype._addJavaScriptSource):
(WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode):
(WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
(WebInspector.NetworkUISourceCodeProvider.prototype._reset):
* inspector/front-end/RawSourceCode.js:
* inspector/front-end/ResourceScriptMapping.js:
(WebInspector.ResourceScriptMapping):
(WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
(WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
(WebInspector.ResourceScriptMapping.prototype._scriptsForSourceURL):
(WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode.get var):
(WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode):
(WebInspector.ResourceScriptMapping.prototype.get _uiSourceCodeReplaced):
(WebInspector.ResourceScriptMapping.prototype._reset):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
(WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
(WebInspector.SnippetJavaScriptSource):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
(WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
(WebInspector.UISourceCode.prototype.setSourceMapping):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:

LayoutTests:

Removed raw-source-code.html test as RawSourceCode was removed by this patch.
Added resource-script-mapping.html to test script <-> uiSourceCode binding behavior.
Added network-uisourcecode-provider.html to test uiSourceCode creation behavior.
Updated dynamic-script-tag.html to better match expected behavior.

* http/tests/inspector/network/network-request-revision-content.html:
* http/tests/inspector/workspace-test.js: Added.
(initialize_WorkspaceTest.InspectorTest.createWorkspace):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeReplacedEvent.uiSourceCodeReplaced):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeReplacedEvent):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeAddedEvent.uiSourceCodeAdded):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeAddedEvent):
(initialize_WorkspaceTest.InspectorTest.addMockUISourceCodeToWorkspace):
(initialize_WorkspaceTest.InspectorTest._defaultUISourceCodeProviderEventHandler):
(initialize_WorkspaceTest.InspectorTest.dumpUISourceCode.didRequestContent):
(initialize_WorkspaceTest.InspectorTest.dumpUISourceCode):
(initialize_WorkspaceTest):
* inspector/debugger/breakpoint-manager.html:
* inspector/debugger/dynamic-script-tag-expected.txt:
* inspector/debugger/dynamic-script-tag.html:
* inspector/debugger/network-uisourcecode-provider-expected.txt: Added.
* inspector/debugger/network-uisourcecode-provider.html: Added.
* inspector/debugger/raw-source-code-expected.txt: Removed.
* inspector/debugger/raw-source-code.html: Removed.
* inspector/debugger/resource-script-mapping-expected.txt: Added.
* inspector/debugger/resource-script-mapping.html: Added.
* inspector/debugger/scripts-panel.html:
* inspector/debugger/source-frame-count.html:

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