[WK2][Soup] Use didReceiveBuffer instead of didReceiveData
https://bugs.webkit.org/show_bug.cgi?id=118598

Reviewed by Gustavo Noronha Silva.

Original patch by Kwang Yul Seo  <skyul@company100.net> and Csaba OsztrogonÃ¡c  <ossy@webkit.org>.

Switch from using didReceiveData to didReceiveBuffer for the Soup backend and
let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess
only supports getting data via SharedBuffer.

Source/WebCore:

* GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformNix.cmake:
* platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods.
* platform/SharedBuffer.h: Ditto.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:  Use didReceiveBuffer instead of didReceiveData.
* platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer.
* platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer.
* platform/network/soup/GOwnPtrSoup.h: Ditto.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be
called now.
(WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly.
(WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer.
(WebCore::redirectSkipCallback): Use the new m_soupBuffer member.
(WebCore::cleanupSoupRequestOperation): Ditto.
(WebCore::nextMultipartResponsePartCallback): Ditto.
(WebCore::sendRequestCallback): Ditto.
(WebCore::readCallback):
* platform/soup/SharedBufferSoup.cpp: Added.

Source/WebKit/gtk:

* webkit/webkitdownload.cpp:
(DownloadClient::didReceiveData): Replace with ASSERT_NOT_REACHED.
(DownloadClient::didReceiveBuffer): Use this to process incoming data.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: WebKit ignores @alt on IMG elements with role="text"
https://bugs.webkit.org/show_bug.cgi?id=125363

Reviewed by Mario Sanchez Prada.

Source/WebCore:

If an <img> element has a different role, the alt attribute should still be used in the
name calculation if present.

Test: accessibility/alt-tag-on-image-with-nonimage-role.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::usesAltTagForTextComputation):
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::accessibilityDescription):
(WebCore::AccessibilityNodeObject::text):
* accessibility/AccessibilityNodeObject.h:

LayoutTests:

* accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Added.
* accessibility/alt-tag-on-image-with-nonimage-role.html: Added.


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