[Qt] Uploading images to Google+ using QtWebKit does not work.
https://bugs.webkit.org/show_bug.cgi?id=72329

Reviewed by Jocelyn Turcotte.

Source/WebCore:

Implement handling of Blob FormData, including its extensions to the File FormData.

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::FormDataIODevice::FormDataIODevice):
(WebCore::appendBlobResolved):
(WebCore::FormDataIODevice::prepareFormElements):
(WebCore::FormDataIODevice::computeSize):
(WebCore::FormDataIODevice::moveToNextElement):
(WebCore::FormDataIODevice::prepareCurrentElement):
(WebCore::FormDataIODevice::openFileForCurrentElement):
(WebCore::FormDataIODevice::readData):
(WebCore::QNetworkReplyHandler::sendNetworkRequest):
* platform/network/qt/QNetworkReplyHandler.h:
(FormDataIODevice):

LayoutTests:

Unskip the two BLOB tests that now passes. The rest of the BLOB tests unfortunately depend
on features we do not have.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Rebaseline some svg/text tests.

Some pixel tests now have the red rectangle drawn around some
areas like other ports.

While here, also add an expectation for selection-tripleclick.svg,
which seems to be passing now.

* platform/efl/TestExpectations:
* platform/efl/svg/text/foreignObject-text-clipping-bug-expected.png:
* platform/efl/svg/text/selection-tripleclick-expected.png: Added.
* platform/efl/svg/text/selection-tripleclick-expected.txt: Added.
* platform/efl/svg/text/text-align-01-b-expected.png:
* platform/efl/svg/text/text-align-02-b-expected.png:
* platform/efl/svg/text/text-align-03-b-expected.png:
* platform/efl/svg/text/text-align-04-b-expected.png:
* platform/efl/svg/text/text-align-05-b-expected.png:
* platform/efl/svg/text/text-align-06-b-expected.png:
* platform/efl/svg/text/text-altglyph-01-b-expected.png:
* platform/efl/svg/text/text-deco-01-b-expected.png:
* platform/efl/svg/text/text-fonts-01-t-expected.png:
* platform/efl/svg/text/text-fonts-02-t-expected.png:
* platform/efl/svg/text/text-intro-05-t-expected.png:
* platform/efl/svg/text/text-path-01-b-expected.png:
* platform/efl/svg/text/text-spacing-01-b-expected.png:
* platform/efl/svg/text/text-text-01-b-expected.png:
* platform/efl/svg/text/text-text-03-b-expected.png:
* platform/efl/svg/text/text-text-04-t-expected.png:
* platform/efl/svg/text/text-text-05-t-expected.png:
* platform/efl/svg/text/text-text-06-t-expected.png:
* platform/efl/svg/text/text-text-07-t-expected.png:
* platform/efl/svg/text/text-text-08-b-expected.png:
* platform/efl/svg/text/text-tref-01-b-expected.png:
* platform/efl/svg/text/text-tselect-01-b-expected.png:
* platform/efl/svg/text/text-tselect-02-f-expected.png:
* platform/efl/svg/text/text-tspan-01-b-expected.png:
* platform/efl/svg/text/text-ws-01-t-expected.png:
* platform/efl/svg/text/text-ws-02-t-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add support for running JavaScript from GResources
https://bugs.webkit.org/show_bug.cgi?id=98488

Patch by Simon Pena <spena@igalia.com> on 2012-10-09
Reviewed by Carlos Garcia Campos.

GResources allow embedding certain resources, frequently used, in a "bundle"
which can be kept separated or stored in the binary. This patch adds
support for running JavaScript from GResources.

.:

* configure.ac: Add support for compiling GResources

Source/WebKit2:

For this, methods run_javascript_from_gresource and
run_javascript_from_gresource_finish are added, which load the resource
asynchronously and, when it is ready, run the JavaScript.

* UIProcess/API/gtk/WebKitWebView.cpp: Include the new methods.
(resourcesStreamReadCallback):
(webkit_web_view_run_javascript_from_gresource):
(webkit_web_view_run_javascript_from_gresource_finish):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
methods in the documentation.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add the test resources to the
build infrastructure.
* UIProcess/API/gtk/tests/TestMain.cpp: Register the resources in the tests,
so that they can be accessed in all of them.
(register_gresource):
(main):
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Test the
run_javascript_from_gresource method.
(testWebViewRunJavaScript):
* UIProcess/API/gtk/tests/WebViewTest.cpp: Add a method for testing the
new run_javascript_from_gresource method.
(runJavaScriptFromGResourceReadyCallback):
(WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished):
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml: Added.
Resource bundle containing the resources.
* UIProcess/API/gtk/tests/resources/webkit2gtk-tests.test.js: Added.
Example JavaScript file to test the GResources support.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow users to specify a different hover image for TextFieldDecorationElement
https://bugs.webkit.org/show_bug.cgi?id=93662

Patch by Garrett Casto <gcasto@chromium.org> on 2012-10-09
Reviewed by Kent Tamura.

Source/WebCore:

* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
(WebCore::TextFieldDecorationElement::updateImage):
(WebCore::TextFieldDecorationElement::defaultEventHandler): Handles mouseover and mouseout events.
(WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Now returns true if the element is not disabled.
(WebCore):
* html/shadow/TextFieldDecorationElement.h:
(TextFieldDecorator):
(TextFieldDecorationElement):

Source/WebKit/chromium:

* public/WebTextFieldDecoratorClient.h:
(WebTextFieldDecoratorClient):
(WebKit::WebTextFieldDecoratorClient::imageNameForHoverState): Allow users to specify the name of the image for mouseover.
* src/TextFieldDecoratorImpl.cpp:
(WebKit::TextFieldDecoratorImpl::imageForReadonlyState):
(WebKit::TextFieldDecoratorImpl::imageForHoverState):
(WebKit):
* src/TextFieldDecoratorImpl.h:
(TextFieldDecoratorImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Respect WEBKITOUTPUTDIR in run-with-jhbuild.
https://bugs.webkit.org/show_bug.cgi?id=98732

Reviewed by Gustavo Noronha Silva.

Follow-up to r113066: if the WEBKITOUTPUTDIR environment variable
was used when running update-webkitgtk-libs,
WebKitBuild/Dependencies will not exist, so we now check its
contents first and then fall back to WebKitBuild/.

* gtk/run-with-jhbuild:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Clean up Qt module detection

Reviewed by Tor Arne Vestbø.

Replace the use of MOBILITY_CONFIG (not supported anymore) with modern use of haveQtModule.

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix build with QtMultimedia

Reviewed by Tor Arne Vestbø.

Source/WebCore:

This is an initial rudimentary port to of the QtMultimedia back-end,
adapted to slight API changes and (more importantly) to the
implementation of QAbstractVideoSurface instead of using
QGraphicsVideoItem (which is in QtMultimediaWidgets).

* WebCore.pri:
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::supportsType):
(WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
(WebCore::MediaPlayerPrivateQt::~MediaPlayerPrivateQt):
(WebCore::MediaPlayerPrivateQt::didLoadingProgress):
(WebCore::MediaPlayerPrivateQt::totalBytes):
(WebCore::MediaPlayerPrivateQt::setVisible):
(WebCore::MediaPlayerPrivateQt::surfaceFormatChanged):
(WebCore::MediaPlayerPrivateQt::setSize):
(WebCore::MediaPlayerPrivateQt::removeVideoItem):
(WebCore::MediaPlayerPrivateQt::restoreVideoItem):
(WebCore):
(WebCore::MediaPlayerPrivateQt::start):
(WebCore::MediaPlayerPrivateQt::supportedPixelFormats):
(WebCore::MediaPlayerPrivateQt::present):
(WebCore::MediaPlayerPrivateQt::paint):
(WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
* platform/graphics/qt/MediaPlayerPrivateQt.h:
(MediaPlayerPrivateQt):

Source/WebKit:

* WebKit1.pri: WK1 needs QtMultimediaWidgets for QVideoWidget and friends.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed trivial Qt build fix: Remove stray closing braces from r130758.

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
After r130344, OpaqueJSString::identifier() adds wrapped String to identifier table
https://bugs.webkit.org/show_bug.cgi?id=98693
REGRESSION (r130344): Install failed in Install Environment
<rdar://problem/12450118>

Reviewed by Filip Pizlo.

Use Identifier(LChar*, length) or Identifier(UChar*, length) constructors so that we don't
add the String instance in the OpaqueJSString to any identifier tables.

* API/OpaqueJSString.cpp:
(OpaqueJSString::identifier):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Corrected reviewer that webkit-patch got wrong.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of FIXED_POSITION_CREATES_STACKING_CONTEXT in favor of Settings::fixedPositionCreatesStackingContext()
https://bugs.webkit.org/show_bug.cgi?id=98756

Reviewed by Rob Buis.
Patch by Antonio Gomes <agomes@rim.com>

Source/WebCore:

No behavior change so no new tests.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Inform the PageProxy about visibility changes when the view is shown/hidden.
https://bugs.webkit.org/show_bug.cgi?id=98757

Reviewed by Kenneth Rohde Christiansen.

SVN r130720 exposed a bug in our code: the PageProxy is not
notified when one calls evas_object_show() or evas_object_hide()
on the view, so the visibility it has when the WebPageProxy is
constructed remained set forever.

This made the ewk_context_vibration_client_callbacks_set unit test
start running forever, because WebPageProxy's constructor now sets
the page's visibility to hidden by the default for us, since it is
called from within ewk_view_smart_add() and before
evas_object_show().

We now listen to the EVAS_CALLBACK_SHOW and EVAS_CALLBACK_HIDE
callbacks and update the WebPageProxy accordingly. Note that we
could not do this from the smart_show and smart_hide functions we
already had, since they are called before the object's actual
visibility is updated.

* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_on_show):
(_ewk_view_on_hide):
(_ewk_view_smart_add):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Make sure events are transformed correctly for plugins.
https://bugs.webkit.org/show_bug.cgi?id=89250

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-10-09
Reviewed by Tony Chang.

Source/WebKit/chromium:

The events arriving in WebPluginContainerImpl are in the coordinate
space of the page containing the plugin. Before the events are
dispatched to the plugin, it is necessary to convert them into the
plugin's own coordinate system.

* src/WebInputEventConversion.cpp:
(WebKit::convertLocationForRenderObject): Transforms an event location for the specified RenderObject.
(WebKit):
(WebKit::updateWebMouseEventFromWebCoreMouseEvent): Refactored code to reduce code-duplication for mouse and wheel events.
(WebKit::WebMouseEventBuilder::WebMouseEventBuilder):
(WebKit::WebMouseWheelEventBuilder::WebMouseWheelEventBuilder):
(WebKit::addTouchPoints):
(WebKit::WebTouchEventBuilder::WebTouchEventBuilder):
(WebKit::WebGestureEventBuilder::WebGestureEventBuilder):
* src/WebInputEventConversion.h:
(WebCore):
(WebKit):
(WebMouseEventBuilder):
(WebMouseWheelEventBuilder):
(WebTouchEventBuilder):
(WebGestureEventBuilder):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::handleMouseEvent):
(WebKit::WebPluginContainerImpl::handleWheelEvent):

Tools:

Update the test plugin to print event details for mouse and gesture events.

* DumpRenderTree/chromium/TestWebPlugin.cpp:
(printEventDetails):

LayoutTests:

Added tests to make sure that events are transformed properly. Note that
for touch-events, each point in the three touch-point lists in the
touch-event is printed, so the same touch-point is printed out three
times.

* platform/chromium/plugins/transformed-events-expected.txt: Added.
* platform/chromium/plugins/transformed-events.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Mark svg/text/selection-tripleclick.svg as flaky on WK2.

* platform/efl-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Add chromium-mac specific results for these tests. They
differ from the expected results only in text rendering.

* platform/chromium-mac-snowleopard/fast/text/hyphenate-character-expected.png:
* platform/chromium-mac-snowleopard/fast/text/hyphens-expected.png:
* platform/chromium-mac/fast/text/hyphenate-character-expected.png: Added.
* platform/chromium-mac/fast/text/hyphenate-limit-before-after-expected.png: Added.
* platform/chromium-mac/fast/text/hyphens-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/Platform: Change PeerConnection getStats function to single value local / remote
elements in RTCStatsReport.
https://bugs.webkit.org/show_bug.cgi?id=98753

Patch by Harald Alvestrand <hta@google.com> on 2012-10-09
Reviewed by Adam Barth.

* chromium/public/WebRTCStatsResponse.h:
(WebRTCStatsResponse):

Source/WebCore: Change PeerConnection getStats function to single value local / remote
elements in RTCStatsReport.

https://bugs.webkit.org/show_bug.cgi?id=98753

Patch by Harald Alvestrand <hta@google.com> on 2012-10-09
Reviewed by Adam Barth.

IDL of RTCStatsReport has been changed to make local/remote
single valued RTCStatsElement attributes.
The RTCStatsReport argument to index the list of RTCStatsElement
in the local and remote functions has been removed.

Tested by modifications to RTCPeerConnection-stats.html

* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::addElement):
(WebCore::RTCStatsReport::addStatistic):
* Modules/mediastream/RTCStatsReport.h:
(WebCore::RTCStatsReport::local):
(WebCore::RTCStatsReport::remote):
(RTCStatsReport):
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::addElement):
(WebCore::RTCStatsResponse::addStatistic):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* platform/chromium/support/WebRTCStatsResponse.cpp:
(WebKit::WebRTCStatsResponse::addElement):
(WebKit::WebRTCStatsResponse::addStatistic):
* platform/mediastream/RTCStatsResponseBase.h:
(RTCStatsResponseBase):

Tools: Change PeerConnection getStats function to single value local / remote
elements in RTCStatsReport.
https://bugs.webkit.org/show_bug.cgi?id=98753

Patch by Harald Alvestrand <hta@google.com> on 2012-10-09
Reviewed by Adam Barth.

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::getStats):

LayoutTests: Change PeerConnection getStats function to single value local / remote
elements in RTCStatsReport.
https://bugs.webkit.org/show_bug.cgi?id=98753

Patch by Harald Alvestrand <hta@google.com> on 2012-10-09
Reviewed by Adam Barth.

* fast/mediastream/RTCPeerConnection-stats-expected.txt:
* fast/mediastream/RTCPeerConnection-stats.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed gardening.

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Remove myself from QtWebKit2 subscriptions.

* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Test expectation updates for Android
https://bugs.webkit.org/show_bug.cgi?id=98786

Unreviewed test expectation update.

Update the test expectations for Android. Nineteen bugs were filed,
which are all blocking bug 96398.

* platform/chromium-android/TestExpectations:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r130680.
http://trac.webkit.org/changeset/130680
https://bugs.webkit.org/show_bug.cgi?id=98720

this patch has a typo so was ineffective (Requested by
cabanier on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-09

* Configurations/FeatureDefines.xcconfig:

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