Adding addRemoteTrack and removeRemoteTrack functions to MediaStreamDescriptor and MediaStream
https://bugs.webkit.org/show_bug.cgi?id=123477

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-01
Reviewed by Eric Carlson.

When the backend report that a remote track has been added or removed by a remote peer, we must be able to add
it to its MediaStream

No new tests needed.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack): Splitted in two parts that can be used by old addTrack and new addRemoteTrack.
(WebCore::MediaStream::removeTrack): Splitted in two parts that can be used by old removeTrack and new
removeRemoteTrack.
(WebCore::MediaStream::addRemoteSource): Reusing code in new addTrack method.
(WebCore::MediaStream::removeRemoteSource): Refactored.
(WebCore::MediaStream::addRemoteTrack): Added.
(WebCore::MediaStream::removeRemoteTrack): Added.
(WebCore::MediaStream::getTrackVectorForType): Helper method that returns a vector of tracks according to
track's type (Audio or Video).

* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::addRemoteTrack): Added.
(WebCore::MediaStreamDescriptor::removeRemoteTrack): Added.
* platform/mediastream/MediaStreamDescriptor.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Error trying to serialize a color created without an alpha component to RGBA or HSLA
https://bugs.webkit.org/show_bug.cgi?id=123623

Reviewed by Joseph Pecoraro.

Check whether we have .rgba and .hsla ivars before trying to retrieve them to serialize
the color to RGBA or HSLA format.

* UserInterface/Color.js:
(WebInspector.Color.prototype.toString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove custom Function.prototype.bind() in favor of native version
https://bugs.webkit.org/show_bug.cgi?id=123608

Reviewed by Joseph Pecoraro.

* UserInterface/Utilities.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[css shapes] Pull in upstream fixes to shape-outside margin and clipping tests
https://bugs.webkit.org/show_bug.cgi?id=123588

Reviewed by Alexandru Chiculita.

Fix some typos in the tests, add better explanation, and generally
make the tests clearer.

* csswg/contributors/adobe/submitted/shapes/shape-outside/resources/w3c-import.log:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-000-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-000.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-001-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-001.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-005-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-005.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-006-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-006.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-007-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-007.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-008-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-008.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-009-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-009.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-010-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-010.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-011-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-011.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-012-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-012.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-013-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-013.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-014-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-014.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-015-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-015.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-016-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-016.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-017-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-017.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-018-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-018.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-019-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-019.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-020-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-020.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-021-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-021.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/w3c-import.log:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Explicitly initialize RefCounted base class in MediaStreamTrack's constructors
https://bugs.webkit.org/show_bug.cgi?id=123620

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-01
Reviewed by Andreas Kling.

No new tests needed.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Make some headers Private
https://bugs.webkit.org/show_bug.cgi?id=123626

Reviewed by Sam Weinig.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build on non-linux platforms
https://bugs.webkit.org/show_bug.cgi?id=123622

Patch by Emilio Pozuelo Monfort <pochu27@gmail.com> on 2013-11-01
Reviewed by Darin Adler.

* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HPPA build fixes
https://bugs.webkit.org/show_bug.cgi?id=123625

Original patch from John David Anglin <dave.anglin@bell.net>

Patch by Emilio Pozuelo Monfort <pochu27@gmail.com> on 2013-11-01
Reviewed by Darin Adler.

* wtf/Platform.h:
* wtf/dtoa/utils.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reverted r158443. It broke the build.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Crashes in -[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:].
https://bugs.webkit.org/show_bug.cgi?id=123383.

Reviewed by Geoffrey Garen.

Tools: 

Removed an inappropriate assertion in DumpRenderTree/mac/UIDelegate.mm and
added 2 attributes (databaseDefaultQuota and databaseMaxQuota) to allow
tests to set appropriate quota settings to exercise quota expansion tests
when needed.

* DumpRenderTree/TestRunner.cpp:
(TestRunner::TestRunner):
(getDatabaseDefaultQuotaCallback):
(getDatabaseMaxQuotaCallback):
(setDatabaseDefaultQuotaCallback):
(setDatabaseMaxQuotaCallback):
(TestRunner::staticValues):
* DumpRenderTree/TestRunner.h:
(TestRunner::databaseDefaultQuota):
(TestRunner::setDatabaseDefaultQuota):
(TestRunner::databaseMaxQuota):
(TestRunner::setDatabaseMaxQuota):
* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::exceededDatabaseQuota):
* DumpRenderTree/efl/DumpRenderTreeView.cpp:
(onExceededDatabaseQuota):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]):
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::exceededDatabaseQuota):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didExceedDatabaseQuota):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::databaseDefaultQuota):
(WTR::TestRunner::setDatabaseDefaultQuota):
(WTR::TestRunner::databaseMaxQuota):
(WTR::TestRunner::setDatabaseMaxQuota):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

LayoutTests: 

Removed an inappropriate assertion in DumpRenderTree/mac/UIDelegate.mm and
added 2 attributes (databaseDefaultQuota and databaseMaxQuota) to allow
tests to set appropriate quota settings to exercise quota expansion tests
when needed.
        
* storage/websql/open-database-expand-quota.html:
- Set databaseDefaultQuota and databaseMaxQuota as needed for this test.
* storage/websql/open-database-over-quota-expected.txt:
* storage/websql/open-database-over-quota.html:
- Revert the change from r157874 which is no longer needed for this test.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't use the C API in WKRemoteObjectCoder
https://bugs.webkit.org/show_bug.cgi?id=123627

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder init]):
(-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
(-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
* Shared/ImmutableDictionary.h:
* Shared/MutableDictionary.cpp:
(WebKit::MutableDictionary::add):
(WebKit::MutableDictionary::set):
* Shared/MutableDictionary.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remote Layer Tree: Vend layer contents via IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=123600

Reviewed by Anders Carlsson.

Address some review comments from Darin (and subsequently Anders).

* WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::surface):
No need for .get() here.

* WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::ensureBackingStore):
All on one line for readability.

(createIOSurfaceContext):
This 'if' is meaningless.

(createIOSurface):
No need for a RetainPtr here, the dictionary is autoreleased.

(RemoteLayerBackingStore::display):
Snuggle 'context' up next to the other declarations.


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