Merge r173751 - [GTK] generate-inspector-gresource-manifest.py should receive the list of files from the makefile
https://bugs.webkit.org/show_bug.cgi?id=136943

Reviewed by Philippe Normand.

Source/WebKit2:

* PlatformGTK.cmake: Fix the inspector file list and pass it to
the generate-inspector-gresource-manifest.py script.

Tools:

Update the script to receive the list of files from the command
line instead of scanning the given directories.

* gtk/generate-inspector-gresource-manifest.py:
(get_filenames): Convert filenames to use relative paths.
(find_all_files_in_directory): Deleted.
(find_all_files_in_directory.select_file): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r173753 - Webkitgtk 2.5.3: tarball contains APPLE LICENSE file - stating not distributable
https://bugs.webkit.org/show_bug.cgi?id=136632

Reviewed by Gustavo Noronha Silva.

Source/WebInspectorUI:

Add free icons for the GTK port. These icons are from the GNOME
project, some of them adapted by Andres Gomez for the inspector.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r173809 - [GStreamer] Cannot play Vimeo video
https://bugs.webkit.org/show_bug.cgi?id=134969

Reviewed by Sergio Villar Senin.

Source/WebCore:

Ensure the GStreamer HTTP source element also sends cookies when
it's sending its requests. Some streaming platforms such as Vimeo
do server-side cookie checks on incoming requests before serving
media data.

Test: http/tests/media/hls/video-cookie.html

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart): Set first-party cookie URL to the request so
the ResourceLoader properly sets cookies in the HTTP request.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r172958 - [GTK] Selection background is rendered white when unfocused with recent GTK+
https://bugs.webkit.org/show_bug.cgi?id=136251

Reviewed by Martin Robinson.

This is due to a change in the GTK+ theme, but because we are not
using the right flags to get the selections colors. We should use
GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_FOCUSED when focused and
GTK_STATE_FLAG_SELECTED when unfocused, instead of
GTK_STATE_FLAG_ACTIVE when unfocused.

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r172896 - [GTK] Toggle buttons visually broken with GTK+ 3.13.7
https://bugs.webkit.org/show_bug.cgi?id=136130

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-08-24
Reviewed by Martin Robinson.

No new tests. Hopefully covered by existing tests, and our tests only
run with GTK+ 3.6 anyway.

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for
GTK+ 3.13.7 and above to ensure toggle buttons display as toggled.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r172928 - [GStreamer] ASSERT failure in WebKitWebSource in StreamingClient
https://bugs.webkit.org/show_bug.cgi?id=136132

adoptGRef() has an ASSERT failure if it's used on a floating pointer. For some reason,
WebKitWebSrc* src in StreamingClient's constructor is floating. Since we
don't construct this ourselves, I assume this is happening in Playbin.

If we remove the ref and adopt, GRefPtr's constructor calls gst_object_ref_sink,
which removes the floating reference and doesn't increment the reference count.
This should work, but actually causes the page to either lock up or crash (different
results for different testers).

In this case, it seems like the adoptGRef / gst_object_ref was the correct thing to do,
but adoptGRef won't actually let us do. Removing the ASSERT is a bad idea, because
usually we don't want to adopt floating pointers.

This is all a long way of saying that making m_src a raw pointer and manually
calling gst_object_ref(), and calling gst_object_unref in the destructor is the
best solution in this case, since it fixes the problem while leaving the ASSERT
to protect us in the much more common case where adopting a floating reference is bad.

Reviewed by Philippe Normand.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::StreamingClient): Make m_src a raw pointer instead of a GRefPtr.
(StreamingClient::~StreamingClient): Unref m_src.
(StreamingClient::createReadBuffer): Replace m_src.get() with m_src, since it's a raw pointer now.
(StreamingClient::handleResponseReceived): Same.
(StreamingClient::handleDataReceived): Same.
(StreamingClient::handleNotifyFinished): Same.
(CachedResourceStreamingClient::notifyFinished): Same.
(ResourceHandleStreamingClient::didFail): Same.
(ResourceHandleStreamingClient::wasBlocked): Same.
(ResourceHandleStreamingClient::cannotShowURL): Same.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r173658 - [GTK] Typo in  webkit_security_manager_register_uri_scheme_as_empty_document documentation
https://bugs.webkit.org/show_bug.cgi?id=136852

Patch by Tomas Popela <tpopela@redhat.com> on 2014-09-16
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitSecurityManager.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r173154 - [SOUP] WebKitDownload cannot overwrite existing file
https://bugs.webkit.org/show_bug.cgi?id=136322

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-09-01
Reviewed by Carlos Garcia Campos.

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse): pass a member variable
to Download::decideDestinationWithSuggestedFilename instead of a
temporary bool, so we can use the result in didFinishLoading.
(WebKit::DownloadClient::didFinishLoading): overwrite the destination
if Download::decideDestinationWithSuggestedFilename determined we
should do so.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r173252 - [SOUP] Race condition when downloading a file due to the intermediate temporary file
https://bugs.webkit.org/show_bug.cgi?id=136423

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-09-03
Reviewed by Carlos Garcia Campos.

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::DownloadClient): Replace m_destinationURI with
m_destinationFile and add m_createdDestination.
(WebKit::DownloadClient::deleteFilesIfNeeded): Added.
(WebKit::DownloadClient::downloadFailed): Call deleteFilesIfNeeded.
(WebKit::DownloadClient::didReceiveResponse): Attempt to create the
destination file before the intermediate file. Fail here if the file
exists and overwrite is not allowed, so we don't erroneously fire the
didCreateDestination event or waste time downloading the file when we
know the download will fail.
(WebKit::DownloadClient::didFinishLoading): Unconditionally overwrite
the empty destination file.
(WebKit::DownloadClient::cancel): Call deleteFilesIfNeeded.
(WebKit::DownloadClient::deleteIntermediateFileInNeeded): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Get rid of runtime warnings about deprecated properties and signals, since they break the tests.

* TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c:
(main):
* TestWebKitAPI/Tests/WebKitGtk/testdownload.c:
(main):
* TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c:
(main):
* TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c:
(main):
* TestWebKitAPI/Tests/WebKitGtk/testloading.c:
(main):
* TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c:
(main):
* TestWebKitAPI/Tests/WebKitGtk/testwebresource.c:
(main):
* TestWebKitAPI/Tests/WebKitGtk/testwebview.c:

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@173963 268f45cc-cd09-0410-ab3c-d52691b4dbfc