MediaStream API: Change the data channel descriptor pattern to a handler pattern
https://bugs.webkit.org/show_bug.cgi?id=104543

Reviewed by Kent Tamura.

Source/Platform:

In short the code is refactured to use the Handler/Client pattern (see RTCPeerConnectionHandler)
instead of the Descriptor pattern.
This will fix lifetime/memory/code structure issues in the chromium port.

* Platform.gypi:
* chromium/public/WebRTCDataChannel.h: Removed.
* chromium/public/WebRTCDataChannelHandler.h: Added.
(WebKit):
(WebRTCDataChannelHandler):
(WebKit::WebRTCDataChannelHandler::~WebRTCDataChannelHandler):
* chromium/public/WebRTCDataChannelHandlerClient.h: Added.
(WebKit):
(WebRTCDataChannelHandlerClient):
(WebKit::WebRTCDataChannelHandlerClient::~WebRTCDataChannelHandlerClient):
* chromium/public/WebRTCPeerConnectionHandler.h:
(WebKit):
(WebKit::WebRTCPeerConnectionHandler::createDataChannel):
* chromium/public/WebRTCPeerConnectionHandlerClient.h:
(WebKit):
(WebKit::WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel):

Source/WebCore:

In short the code is refactured to use the Handler/Client pattern (see RTCPeerConnectionHandler)
instead of the Descriptor pattern.
This will fix lifetime/memory/code structure issues in the chromium port.

Existing tests cover this patch.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::~RTCDataChannel):
(WebCore::RTCDataChannel::label):
(WebCore::RTCDataChannel::reliable):
(WebCore::RTCDataChannel::readyState):
(WebCore::RTCDataChannel::bufferedAmount):
(WebCore::RTCDataChannel::send):
(WebCore::RTCDataChannel::close):
(WebCore::RTCDataChannel::didChangeReadyState):
(WebCore::RTCDataChannel::didReceiveStringData):
(WebCore::RTCDataChannel::didReceiveRawData):
(WebCore::RTCDataChannel::didDetectError):
(WebCore::RTCDataChannel::stop):
* Modules/mediastream/RTCDataChannel.h:
(WebCore):
(RTCDataChannel):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::didAddRemoteDataChannel):
* Modules/mediastream/RTCPeerConnection.h:
(RTCPeerConnection):
* WebCore.gypi:
* platform/chromium/support/WebRTCDataChannel.cpp: Removed.
* platform/mediastream/RTCDataChannelDescriptor.h: Removed.
* platform/mediastream/RTCDataChannelHandler.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp.
(WebCore):
(RTCDataChannelHandler):
(WebCore::RTCDataChannelHandler::~RTCDataChannelHandler):
* platform/mediastream/RTCDataChannelHandlerClient.h: Renamed from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp.
(WebCore):
(RTCDataChannelHandlerClient):
(WebCore::RTCDataChannelHandlerClient::~RTCDataChannelHandlerClient):
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(WebCore):
(WebCore::RTCPeerConnectionHandler::create):
* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore):
(RTCPeerConnectionHandler):
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
(WebCore):
(RTCPeerConnectionHandlerClient):
* platform/mediastream/chromium/RTCDataChannelHandlerChromium.cpp: Added.
(WebCore):
(WebCore::RTCDataChannelHandlerChromium::create):
(WebCore::RTCDataChannelHandlerChromium::RTCDataChannelHandlerChromium):
(WebCore::RTCDataChannelHandlerChromium::~RTCDataChannelHandlerChromium):
(WebCore::RTCDataChannelHandlerChromium::setClient):
(WebCore::RTCDataChannelHandlerChromium::label):
(WebCore::RTCDataChannelHandlerChromium::isReliable):
(WebCore::RTCDataChannelHandlerChromium::bufferedAmount):
(WebCore::RTCDataChannelHandlerChromium::sendStringData):
(WebCore::RTCDataChannelHandlerChromium::sendRawData):
(WebCore::RTCDataChannelHandlerChromium::close):
(WebCore::RTCDataChannelHandlerChromium::didChangeReadyState):
(WebCore::RTCDataChannelHandlerChromium::didReceiveStringData):
(WebCore::RTCDataChannelHandlerChromium::didReceiveRawData):
(WebCore::RTCDataChannelHandlerChromium::didDetectError):
* platform/mediastream/chromium/RTCDataChannelHandlerChromium.h: Added.
(WebCore):
(RTCDataChannelHandlerChromium):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::createDataChannel):
(WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(WebCore):
(RTCPeerConnectionHandlerChromium):

Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp:

Tools:

Adding mocks to be able to test this refactoring.

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/MockWebRTCDataChannelHandler.cpp: Added.
(DataChannelReadyStateTask):
(DataChannelReadyStateTask::DataChannelReadyStateTask):
(MockWebRTCDataChannelHandler::MockWebRTCDataChannelHandler):
(MockWebRTCDataChannelHandler::setClient):
(MockWebRTCDataChannelHandler::bufferedAmount):
(MockWebRTCDataChannelHandler::sendStringData):
(MockWebRTCDataChannelHandler::sendRawData):
(MockWebRTCDataChannelHandler::close):
* DumpRenderTree/chromium/MockWebRTCDataChannelHandler.h: Added.
(MockWebRTCDataChannelHandler):
(MockWebRTCDataChannelHandler::taskList):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(RTCPeerConnectionReadyStateTask::RTCPeerConnectionReadyStateTask):
(RemoteDataChannelTask::RemoteDataChannelTask):
(MockWebRTCPeerConnectionHandler::createDataChannel):
(MockWebRTCPeerConnectionHandler::stop):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
(MockWebRTCPeerConnectionHandler):

LayoutTests:

Expanding data channels tests.

* fast/mediastream/RTCPeerConnection-datachannel-expected.txt:
* fast/mediastream/RTCPeerConnection-datachannel.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap] Uninitialized m_context pointer in TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=104785

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::TextureMapper):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::TextureMapperGL):

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

Adding failure expectations for tests that regressed in r137365 on GTK, Qt and EFL.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix linkage against SQLite
https://bugs.webkit.org/show_bug.cgi?id=104781

Reviewed by Csaba Osztrogonác.

Detect SQLite either through pkg-config, from the SQLITE3SRCDIR
environment variable or from qtbase via a qt5.git build. Bail out early
with an error message if neither option applies.

This removes the usage of $$QT.core.sources and the dependency on Qt's
system-sqlite configure setting. We should always favour a system
library over a copy in Qt.

Source/WebCore:

* Target.pri:
* WebCore.pri:

Tools:

* qmake/mkspecs/features/features.prf:

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