[Qt] Unreviewed gardening. Rebaselining after r147530.

* platform/qt-5.0-wk2/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* platform/qt-5.0-wk2/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* platform/qt-5.0-wk2/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* platform/qt-5.0-wk2/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* platform/qt-5.0-wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* platform/qt-5.0-wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
* platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* platform/qt/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* platform/qt/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Decouple layout viewport from visual viewport
https://bugs.webkit.org/show_bug.cgi?id=113829

Reviewed by Carlos Garcia Campos.

Setting the visual viewport would force the layout viewport equal to
the visual viewport. Decouple the viewports by allowing the user to
specify a layout viewport when setting the viewport(s). The layout
viewport could be the exact same value passed for visual viewport, if
the old behavior is desired.

Also reevaluate any viewport arguments when (only) the layout viewport
changes in WebPage::setDefaultLayoutSize() since the layout viewport is
used as input to the calculation.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setScreenOrientation):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPage::setViewportSize):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
(BlackBerry::WebKit::WebPage::defaultLayoutSize):
* Api/WebPage.h:
* Api/WebPage_p.h:
(WebPagePrivate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: crash in WebCore::InspectorLayerTreeAgent::buildObjectForLayer if a layer is created for an anonymous RenderObject (:first-letter)
https://bugs.webkit.org/show_bug.cgi?id=113768

Source/WebCore:

The InspectorLayerTreeAgent now knows how to deal with anonymous RenderObjects
for the :first-letter and :first-line pseudo-elements.

Reviewed by Timothy Hatcher.

Test: inspector-protocol/layers/layers-anonymous.html

* inspector/Inspector.json:
Change the Layer type in the LayerTree domain to have more accurate terminology
(pseudo-element vs. pseudo-class) and a new optional isAnonymous flag for layers
associated to anonymous RenderObjects.

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
Check for anonymous RenderObjects and set the parent renderer's node as the node
for this layer since anonymous renderers have the Document as their node and this
would not be satisfactory to show in a front-end. We also check for anonymous
RenderObjects for the :first-letter and :first-line pseudo-elements and set them
in the pseudoElement property of the Layer object created such that a front-end
could correctly identify what type of pseudo-element for the associated node
yielded this layer.

(WebCore::InspectorLayerTreeAgent::idForNode):
Here we fix the actual crash by first checking if the node provided is null and
returning 0 if there's no such node. This ensures that any scenario where there
is no node associated with the RenderObject simply informs of the front-end that
no such node exists and we do not crash.

LayoutTests:

Reviewed by Timothy Hatcher.

* inspector-protocol/layers/layers-anonymous-expected.txt: Added.
* inspector-protocol/layers/layers-anonymous.html: Added.
New test for layers created for CSS anonymous boxes or blocks.

* inspector-protocol/layers/layers-generated-content.html:
Update test to use the "pseudoElement" property instead of "pseudoClass"
which was the previous, less accurate name.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] assignToHTMLImageElement no longer exists in Qt5
https://bugs.webkit.org/show_bug.cgi?id=113639

Patch by Kristof Provost <kristof@codepro.be> on 2013-04-03
Reviewed by Simon Hausmann.

No new tests: covered by ./Source/WebKit/qt/tests/hybridPixmap/test.html

* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapRuntime::getClassRef):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Disable media support using QuickTime if deployment target != SDK

We link to a single libWebKitSystemInterface static lib, so unless the
deployment target matches the SDK let's not pretend like we'll be able
to run on anything lower than the SDK version.

Reviewed by Simon Hausmann.

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Update QMAKE_MAC_SDK check for Qt 5.1

Relies on QMAKE_MAC_SDK_VERSION set in features.prf

Reviewed by Simon Hausmann.

* WebCore.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refine LOG messages in WebSocket related components
https://bugs.webkit.org/show_bug.cgi?id=113852

Patch by Takeshi Yoshino <tyoshino@chromium.org> on 2013-04-03
Reviewed by Kent Tamura.

Refine LOG messages by
- Make them contain method names to ease identifying where the event occurred.
- For consistency, make all messages print the pointer of the origin instance.
- Quote UTF8 data in LOG messages.
- For overloaded methods, add the type to clarify which one is run

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
(WebCore::WebSocket::send):
(WebCore::WebSocket::close):
(WebCore::WebSocket::contextDestroyed):
(WebCore::WebSocket::didConnect):
(WebCore::WebSocket::didReceiveMessage):
(WebCore::WebSocket::didReceiveBinaryData):
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didUpdateBufferedAmount):
(WebCore::WebSocket::didStartClosingHandshake):
(WebCore::WebSocket::didClose):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
(WebCore::WebSocketChannel::subprotocol):
(WebCore::WebSocketChannel::extensions):
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::bufferedAmount):
(WebCore::WebSocketChannel::close):
(WebCore::WebSocketChannel::fail):
(WebCore::WebSocketChannel::disconnect):
(WebCore::WebSocketChannel::willOpenSocketStream):
(WebCore::WebSocketChannel::didOpenSocketStream):
(WebCore::WebSocketChannel::didCloseSocketStream):
(WebCore::WebSocketChannel::didReceiveSocketStreamData):
(WebCore::WebSocketChannel::didFailSocketStream):
(WebCore::WebSocketChannel::didStartLoading):
(WebCore::WebSocketChannel::didReceiveData):
(WebCore::WebSocketChannel::didFinishLoading):
(WebCore::WebSocketChannel::didFail):
(WebCore::WebSocketChannel::appendToBuffer):
(WebCore::WebSocketChannel::processBuffer):
(WebCore::WebSocketChannel::startClosingHandshake):
(WebCore::WebSocketChannel::closingTimerFired):
* Modules/websockets/WebSocketDeflater.cpp:
(WebCore::WebSocketDeflater::~WebSocketDeflater):
(WebCore::WebSocketInflater::~WebSocketInflater):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readServerHandshake):
* platform/network/chromium/SocketStreamHandle.cpp:
(WebCore::SocketStreamHandleInternal::connect):
(WebCore::SocketStreamHandleInternal::send):
(WebCore::SocketStreamHandleInternal::close):
(WebCore::SocketStreamHandleInternal::didOpenStream):
(WebCore::SocketStreamHandleInternal::didSendData):
(WebCore::SocketStreamHandleInternal::didReceiveData):
(WebCore::SocketStreamHandleInternal::didClose):
(WebCore::SocketStreamHandleInternal::didFail):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Move logic of simple forwarding functions to TestRunner.
https://bugs.webkit.org/show_bug.cgi?id=113863

Reviewed by Simon Hausmann.

* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunner::setTextDirection):
(TestRunner::goBack):
(TestRunner::evaluateScriptInIsolatedWorld):
(TestRunner::addUserStyleSheet):
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunnerQt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Monospace font does not render in proper sizes
https://bugs.webkit.org/show_bug.cgi?id=93263

Reviewed by Jocelyn Turcotte.

Remove this patch's artificial dependency on Qt 5.1.

* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Switch ContextMenu implementation to CROSS_PLATFORM_CONTEXT_MENU
https://bugs.webkit.org/show_bug.cgi?id=113535

Reviewed by Simon Hausmann.

Source/WebCore:

Now Qt uses the CROSS_PLATFORM_CONTEXT_MENUS
USE flag. This flag provides a full cross-platform
representation of a ContextMenu and a ContextMenuItem.
The embedder can then decide how to show this, so neither
WebCore nor WebCore/platform need to know any platform
specifics about menus.

No new tests, no behavior changes.

* Target.pri:
* platform/ContextMenu.h:
(ContextMenu):
* platform/ContextMenuItem.h:
* platform/qt/ContextMenuItemQt.cpp:
(WebCore::ContextMenuItem::platformContextMenuItem):
* platform/qt/ContextMenuQt.cpp:
(WebCore::ContextMenu::ContextMenu):
(WebCore::ContextMenu::getContextMenuItems):
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
(WebCore::ContextMenu::platformContextMenu):

Source/WebKit/qt:

Adjust ContextMenuClientQt and QWebPageAdapter to use CROSS_PLATFORM_CONTEXT_MENUS
USE flag by implementing customizeMenu() instead of getCustomMenuFromDefaultItems()
and by calling menu->items() instead of menu->platformDescription().

* WebCoreSupport/ContextMenuClientQt.cpp:
(WebCore::ContextMenuClientQt::customizeMenu):
* WebCoreSupport/ContextMenuClientQt.h:
(ContextMenuClientQt):
* WebCoreSupport/QWebPageAdapter.cpp:
(descriptionForPlatformMenu):
(QWebPageAdapter::updatePositionDependentMenuActions):

Tools:

Adding USE_CROSS_PLATFORM_CONTEXT_MENUS to WEBKIT_CONFIG.

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] gst-plugins-good fails to build with newer Linux(v4l2)
https://bugs.webkit.org/show_bug.cgi?id=113809

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-04-03
Reviewed by Philippe Normand.

Newer Linux kernels have removed some deprecated macros from v4l2
headers, causing gst-plugins-good's build to break. We don't need it
right now, so just disable it.

* gtk/jhbuild.modules: disable v4l2 usage in gst-plugins-good.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Bump required versions of some dependencies
https://bugs.webkit.org/show_bug.cgi?id=113282

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-04-03
Reviewed by Martin Robinson.

.:

This patch updates the following dependencies:

 - libsoup 2.42.0: is the current stable release.

 - glib 2.36.0: libsoup 2.42 requires 2.35.0, but we don't want to
   depend on unstable versions and 2.36 is the next stable version
   after 2.35.

 - gtk+ 3.6.0: this is the previous stable release. We don't
   currently have any code using newer API, so we will be able to
   remove all the #ifdefed code.

 - at-spi2 2.5.3: is the version required by gtk+ 3.6.

 - GObject introspection 1.32.0: is the version required by gtk+ 3.6.

 - Pango 1.32.0: it's the current stable version and the first one
   depending on Harfbuzz.

 - Fontconfig 2.5: required by pango 1.32.0 when using Harfbuzz.

 - gtk+ 2.24.10: it allows us to remove a lot of deprecated code
   and #ifdefs.

* Source/autotools/Versions.m4:

Tools:

* gtk/jhbuild.modules: Update libsoup, glib, at-spi2 and gtk+ versions.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Should close select popup when the element loses focus
https://bugs.webkit.org/show_bug.cgi?id=113220

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-04-03
Reviewed by Kent Tamura.

Source/WebCore:

Test: fast/forms/select-popup-closes-on-blur.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler): handle the blur event, closing
the popup menu if any.
* testing/Internals.cpp:
(WebCore::Internals::isSelectPopupVisible): utility to query the select node renderer to
find out whether the popup is open or closed.
(WebCore):
* testing/Internals.h: add the new method definition.
* testing/Internals.idl: ditto.

Source/WebKit/win:

* WebKit.vcproj/WebKitExports.def.in: export WebCore::HTMLNames::selectTag for Internals

LayoutTests:

* fast/forms/select/popup-closes-on-blur-expected.txt: Added.
* fast/forms/select/popup-closes-on-blur.html: Added.
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][AC] Implement matrix keyframe animations with clutter ac backend
https://bugs.webkit.org/show_bug.cgi?id=110314

Patch by ChangSeok Oh <changseok.oh@collabora.com> on 2013-04-03
Reviewed by Gustavo Noronha Silva.

Clutter 1.12 doesn't support additive transform animations yet, So clutter ac backend
uses matrix animations for the case. This patch follows changeset 143369, 143343
to support matrix keyframe animations. I believe this change is easy if you understand
above two changesets.

Covered by existing animation tests.

* platform/graphics/clutter/PlatformClutterAnimation.cpp:
(WebCore::PlatformClutterAnimation::setValues):
(WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
(WebCore):
(WebCore::PlatformClutterAnimation::addTransformTransition):
* platform/graphics/clutter/PlatformClutterAnimation.h:
(PlatformClutterAnimation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix HAVE(QTTESTSUPPORT) logic

build_qttestsupport has not been added to WEBKIT_CONFIG in detectFeatures,
resulting in HAVE(QTTESTSUPPORT) never being true.
Move that logic down in sanitizeFeatures.

Patch by Pierre Rossi <pierre.rossi@digia.com> on 2013-04-03
Rubber-stamped by Tor Arne Vestbø.

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Updated platform specific expected files after r147492.

* platform/qt/TestExpectations:
* platform/qt/fast/dom/HTMLImageElement/image-alt-text-expected.png:
* platform/qt/fast/dom/HTMLImageElement/image-alt-text-expected.txt:
* platform/qt/fast/dom/HTMLInputElement/input-image-alt-text-expected.png:
* platform/qt/fast/dom/HTMLInputElement/input-image-alt-text-expected.txt:
* platform/qt/fast/encoding/utf-16-big-endian-expected.png:
* platform/qt/fast/encoding/utf-16-big-endian-expected.txt:
* platform/qt/fast/encoding/utf-16-little-endian-expected.png:
* platform/qt/fast/encoding/utf-16-little-endian-expected.txt:
* platform/qt/fast/forms/input-value-expected.png: Added.
* platform/qt/fast/forms/input-value-expected.txt:
* platform/qt/fast/lists/inlineBoxWrapperNullCheck-expected.png:
* platform/qt/fast/lists/inlineBoxWrapperNullCheck-expected.txt:
* platform/qt/tables/mozilla/collapsing_borders/bug41262-3-expected.png:
* platform/qt/tables/mozilla/collapsing_borders/bug41262-3-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove defaultViewportArguments check from call site of recomputeVirtualViewportFromViewportArguments
https://bugs.webkit.org/show_bug.cgi?id=113872

Reviewed by Carlos Garcia Campos.

Carlos pointed out that recomputeVirtualViewportFromViewportArguments
already contains the check, and returns an empty IntSize if it fails.
So pick up on that to make the code a bit more DRY.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fail gracefully if an OpenGL context could not be created.
https://bugs.webkit.org/show_bug.cgi?id=113784

In case we fail to create or adopt a valid platform OpenGL context
we do not want to provide a GraphicsContext3D instance.
Otherwise we would crash as soon as the instance is being used.

Reviewed by Jocelyn Turcotte.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3D::GraphicsContext3D):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Actions that require user gesture don't work in window.showModalDialog in Chromium
https://bugs.webkit.org/show_bug.cgi?id=113777

Reviewed by Jochen Eisinger.

In Chromium the window for showModalDialog is not modal which causes the
UserGestureIndicator to block actions in the sub window. We introduce a
RAII that saves the UserGestureIndicator and state, then resets it before
runModalDialog, and restore it when it's done.

No new tests. Can't cause user gesture inside modal dialog.

* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicatorDisabler::UserGestureIndicatorDisabler): Saves and resets the topmost indicator and state.
(WebCore):
(WebCore::UserGestureIndicatorDisabler::~UserGestureIndicatorDisabler): Restores topmost indicator and state.
* dom/UserGestureIndicator.h:
(WebCore):
(UserGestureIndicatorDisabler): RAII to temporarily disable UserGestureIndicator.
(UserGestureIndicator): Allow access to UserGestureIndicatorDisabler.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::showModalDialog): Disable UserGestureIndicator while runModalDialog.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gstreamer] Avoid calls to g_slist_nth_data in webKitWebAudioSrcLoop()
https://bugs.webkit.org/show_bug.cgi?id=113875

Reviewed by Philippe Normand.

webKitWebAudioSrcLoop() was iterating over 2 GSLists by using a counter and then
calling g_slist_nth_data() to get the element of each GSList. This is inefficient
because calling g_slist_nth_data() will iterate the GSList up until index 'n'.

This patch improves this by keeping pointers to the current element of each list
while iterating, so that we can simply use g_slist_next() to iterate instead
of g_slist_nth_data().

No new tests, no behavior change.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):


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