Unreviewed. Fix GTK+ build after r154601.

* TestWebKitAPI/GNUmakefile.am: Remove mac specific file from
compilation added by mistake in r154601.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert "Add support for Promises"

This reverts commit bd7606974ee8b78a8c53ccb635ea24234e8575f4.

This is a experimental feature added without a feature define.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.2@154670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update NEWS and Versions.m4 for 2.1.90 release.

.:

* Source/autotools/Versions.m4: Bump version numbers.

Source/WebKit/gtk:

* NEWS: Add release notes.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.2@154695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[l10n] Updated Polish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=119986

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2013-08-27
Reviewed by Gustavo Noronha Silva.

* pl.po: updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[gstreamer] Make sure gstreamer source element is thread-safe
https://bugs.webkit.org/show_bug.cgi?id=115352

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-08-27
Reviewed by Philippe Normand.

Source/WebCore:

GStreamer source element may be created by any gstreamer element on any thread by calling
gst_element_make_from_uri with the URIs handled by the source element.
This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
being created outside the main thread.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcFinalize):
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(removeTimeoutSources):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::StreamingClient):
(StreamingClient::~StreamingClient):
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::setDefersLoading):
(CachedResourceStreamingClient::getOrCreateReadBuffer):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::notifyFinished):
(ResourceHandleStreamingClient::ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::~ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::loadFailed):
(ResourceHandleStreamingClient::setDefersLoading):
(ResourceHandleStreamingClient::getOrCreateReadBuffer):
(ResourceHandleStreamingClient::willSendRequest):
(ResourceHandleStreamingClient::didReceiveResponse):
(ResourceHandleStreamingClient::didReceiveData):
(ResourceHandleStreamingClient::didFinishLoading):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
Make element thread-safe, add support to use the element without a player associated (e.g.
the DASH plugin using the webkitsrc to download fragments), use GMutexLocker to simplify
locks and other general improvements.

Source/WTF:

Add convenience class that simplifies locking and unlocking a GMutex.

* GNUmakefile.list.am:
* wtf/gobject/GMutexLocker.h: Added.
(WebCore::GMutexLocker::GMutexLocker):
(WebCore::GMutexLocker::~GMutexLocker):
(WebCore::GMutexLocker::lock):
(WebCore::GMutexLocker::unlock):
(WebCore::GMutexLocker::mutex):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Disable accelerated compositing under Wayland
https://bugs.webkit.org/show_bug.cgi?id=120347

Reviewed by Martin Robinson.

Accelerated compositing is not yet supported under the Wayland display protocol,
so it should be disabled. Since it is enabled by default and the GTK WK2 API does
not provide any way to change that, it's enough to disable it when attaching the
WebKitSettings object to the WebPageGroup if running under Wayland.

* UIProcess/API/gtk/WebKitWebViewGroup.cpp:
(webkitWebViewGroupAttachSettingsToPageGroup):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Only set up a RedirectedXCompositeWindow if running under an X11 display
https://bugs.webkit.org/show_bug.cgi?id=120321

Reviewed by Gustavo Noronha Silva.

Only set up the RedirectedXCompositeWindow member of the WebKitWebViewBasePrivate struct
if we're running under an X11 display. This is now done in the webkitWebViewBaseConstructed
function rather than the constructor, which is removed.

This allows for the UIProcess to run in a Wayland environment even when built with accelerated
compositing enabled. Of course, at the moment there's no support yet for accelerated compositing
under Wayland, so we fall back to rendering the backing store. No changes are introduced to
the behavior under X11 - accelerated compositing will be used where possible, if supported.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] HTMLElement lost setID and getID - need to add compatibility symbols
https://bugs.webkit.org/show_bug.cgi?id=120440

Reviewed by Martin Robinson.

No tests, just adding compatibility symbols.

setID and getID were removed, and the parent class (Element) ones should be used instead.
We need to keep our ABI compatible, though, so add compatibility symbols.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_id):
(webkit_dom_html_element_set_id):
* bindings/gobject/WebKitDOMCustom.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable maintainer mode configure switch
https://bugs.webkit.org/show_bug.cgi?id=120424

Reviewed by Martin Robinson.

The maintainer mode feature is used by ostree and other automated builders to ensure no autotools
regeneration will happen for a regular tarball build; ostree builders, for instance, are very
conservative with toolchain upgrades, and are still using aclocal 1.12. WebKit's latest tarball
(2.1.90) for some reason tries to regenerate build files, and the build fails because it can't find
the version of aclocal that was used for generating the tarball (1.13).

* configure.ac: enable maintainer mode feature.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Please incorporate German translation update
https://bugs.webkit.org/show_bug.cgi?id=120016

Patch by Christian Kirbach <Christian.Kirbach@googlemail.com> on 2013-08-28
Reviewed by Gustavo Noronha.

* de.po: updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix - copy/paste failure, copied too much.

* bindings/gobject/WebKitDOMCustom.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update NEWS and Versions.m4 for 2.1.90.1 release.

.:

* Source/autotools/Versions.m4: bump to 2.1.90.1.
* configure.ac: Add webkit_patch_version to AC_INIT call.

Sources/WebKit/gtk:

* NEWS: Add release notes.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.2@154844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [WK2] TestWebKitWebView page-visibility fails
https://bugs.webkit.org/show_bug.cgi?id=120406

Patch by Brian Holt <brian.holt@samsung.com> on 2013-08-29
Reviewed by Gustavo Noronha Silva.

Removed the webkit prefix for document visibility properties.

* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewPageVisibility):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Should enable WebGL by default on MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=120420

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-08-29
Reviewed by Gustavo Noronha Silva.

Enable WebGL by default on MiniBrowser.

* MiniBrowser/gtk/main.c:
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Volume slider value should be 0 when audio is muted
https://bugs.webkit.org/show_bug.cgi?id=120553

Reviewed by Eric Carlson.

Source/WebCore:

Fixed the problem of showing a non empty slider when audio is
muted.

Test: media/volume-bar-empty-when-muted.html.

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::reset): Use setSliderVolume.
(WebCore::MediaControls::changedVolume): Use setSliderVolume.
(WebCore::MediaControls::setSliderVolume): Added to set the volume
to 0 when muted and to its value otherwise.
* html/shadow/MediaControls.h: Added setSliderVolume.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::reset): Used setSliderVolume and
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::changedVolume): Used
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
set the volume to 0 when muted and to its value otherwise.
* html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
* html/shadow/MediaControlsBlackBerry.cpp:
(WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.

LayoutTests:

Added test to check if the volume slider value is 0 when the
element is muted even if volume is set to something else.

* media/volume-bar-empty-when-muted-expected.txt: Added.
* media/volume-bar-empty-when-muted.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Video player sets system volume to 100%
https://bugs.webkit.org/show_bug.cgi?id=118974

Reviewed by Philippe Normand.

In order to preserve the system volume we need to keep track of
the volume being initialized in the HTMLMediaElement and then just
setting the volume to the sink when initializing the pipeline if
that volume was changed before.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
attribute to false.
(WebCore::HTMLMediaElement::setVolume): Set the attribute to true
when volume is changed.
(WebCore::HTMLMediaElement::updateVolume): Set the volume only if
volume was initialized.
(WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
Platform volume configuration is required only if volume was not
initialized before.
* html/HTMLMediaElement.h: Added attribute and interface method.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
Declared and added default implementation for the interface method.
(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
Asked the client, meaning the HTMLMediaElement if the platform
volume configuration is required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
Set the volume only if not platform volume is required and added log.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
https://bugs.webkit.org/show_bug.cgi?id=115354

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-03
Reviewed by Philippe Normand.

Source/WebCore:

Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::toSoupMessage):
Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
Accept-Encoding header is also respected.

LayoutTests:

Add test to check that video requests will send no "Accept-Encoding" header.

* http/tests/media/video-accept-encoding-expected.txt: Added.
* http/tests/media/video-accept-encoding.cgi: Added.
* http/tests/media/video-accept-encoding.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [WK2] TestContextMenu default-menu fails
https://bugs.webkit.org/show_bug.cgi?id=120459

Patch by Brian Holt <brian.holt@samsung.com> on 2013-09-03
Reviewed by Gustavo Noronha Silva.

Add context menu items for downloading media elements.

* UIProcess/API/gtk/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetActionTag):
(webkitContextMenuActionGetForContextMenuItem):
(webkitContextMenuActionGetLabel):
* UIProcess/API/gtk/WebKitContextMenuActions.h:
* UIProcess/API/gtk/tests/TestContextMenu.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Don't set state to NULL until element is destroyed
https://bugs.webkit.org/show_bug.cgi?id=117354

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-03
Reviewed by Philippe Normand.

Don't set playbin to NULL until it is going to be destroyed or if we stay
for too long on the READY state. Instead only set the state to READY as this
allows much faster state changes to PAUSED/PLAYING again. playbin internally
caches some state that is destroyed when setting it to NULL.
This state is independent of the URI and it is even possible to change the
URI in READY state.

To avoid having resources (e.g. audio devices) open indefinitely,
when setting the state to READY we create a timeout and if the timeout
is reached we reset the pipeline state to NULL to free resources.

Also now all state changes use the changePipelineState method instead of setting
the playbin state directly with gst_element_set_state, so we have a better control
of when we are requesting state changes.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::commitLoad):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

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

Conflicts:
	Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
[GStreamer] cannot play live streams
https://bugs.webkit.org/show_bug.cgi?id=116831

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-04
Reviewed by Philippe Normand.

Source/WebCore:

Fix issues with rtsp streams embedded on <video> not loading.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
starting playback.

Tools:

Fix timeout issues with rtspsrc/udpsrc gstreamer elements.

* gtk/jhbuild.modules:
* gtk/patches/rtspsrc-timeout-on-udpsrc-is-in-nanoseconds.patch: Added.
* gtk/patches/udpsrc-improve-timeouts.patch: Added.
Changed gstreamer jhbuild modules to use tarball repos (required to add patches)
and added 2 patches to gst-plugins-good to fix timeout issues with rtsp streams.
Both patches are applied upstream and can be removed once a new gstreamer release
is out (up to 1.0.10 the patches are not included) and we bump the requirements.

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