[GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
https://bugs.webkit.org/show_bug.cgi?id=133119

Reviewed by Sergio Villar Senin.

Source/WebKit2:
The problem is that we were checking whether the passed in
WKURLResponseRef is NULL or not, but it's always a valid object
that can contain a NULL WebCore::ResourceResponse.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(willSendRequestForFrame): Pass NULL as redirect-response
parameter of WebKitWebPage::send-request signal when the
WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.

Tools:
Check that redirect response parameter of
WebKitWebPage::send-request signal is NULL when not redirecting
and a valid WebKitURIResponse object when redirecting.

* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(testWebResourceSendRequest):
(serverCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(sendRequestCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move WebKitTestRunner to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=133081

Reviewed by Daniel Bates.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didCreatePage):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::runTest):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/WorkQueueManager.cpp:
(WTR::WorkQueueManager::processWorkQueue):
(WTR::WorkQueueManager::enqueue):
* WebKitTestRunner/WorkQueueManager.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a header comment
https://bugs.webkit.org/show_bug.cgi?id=133123
<rdar://problem/16973783>

Reviewed by Geoffrey Garen.

* UIProcess/API/Cocoa/WKUserContentController.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Invalid content in cache file, causes broken rendering.
https://bugs.webkit.org/show_bug.cgi?id=133069

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-05-20
Reviewed by Brent Fulgham.

When data for a url is received as multiple parts, the cache file for the url is truncated when opened for writing,
and will only contain the last part of data received.
This is fixed by only opening the file once, and close it after all data has been received.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::CurlCacheEntry): Initialize cache file handle member.
(WebCore::CurlCacheEntry::~CurlCacheEntry): Close cache file.
(WebCore::CurlCacheEntry::saveCachedData): Only open cache file once to avoid truncating.
(WebCore::CurlCacheEntry::didFail): Close cache file.
(WebCore::CurlCacheEntry::didFinishLoading): Ditto.
(WebCore::CurlCacheEntry::openContentFile): Added method to open cache file.
(WebCore::CurlCacheEntry::closeContentFile): Added method to close cache file.
* platform/network/curl/CurlCacheEntry.h: Added file handle member, and methods to open and close cache file.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip http/tests/inspector/replay/document-last-modified-fallback-value.html since it asserts.

* TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r169105): fast/regions/cssom/region-range-for-box-crash.html is more crashy than before
https://bugs.webkit.org/show_bug.cgi?id=133124

* TestExpectations: Skip it.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only set title on SVG documents
https://bugs.webkit.org/show_bug.cgi?id=133068

Patch by Prashant Hiremath <hiremathprashants@gmail.com> on 2014-05-20
Reviewed by Dirk Schulze.

Source/WebCore:
Test: svg/custom/html_document_set_title.html

* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedInto):
(WebCore::SVGTitleElement::removedFrom):
(WebCore::SVGTitleElement::childrenChanged):

LayoutTests:
* svg/custom/html_document_set_title-expected.txt: Added.
* svg/custom/html_document_set_title.html: Added.

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