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
Unreviewed 32bit buildfix after r147542.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] WebKitWebNavigationAction: fix mix between dispose and finalize
https://bugs.webkit.org/show_bug.cgi?id=113794

Patch by Alban Crequy <alban.crequy@collabora.co.uk> on 2013-04-03
Reviewed by Gustavo Noronha Silva.

WebKitWebNavigationAction's dispose function was named finalize and was calling
the parent class's finalise function, causing a memory corruption. Change it to
be a proper finalize function instead.

* webkit/webkitwebnavigationaction.cpp:
(webkit_web_navigation_action_class_init):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSP blocks inline style when cloning a node
https://bugs.webkit.org/show_bug.cgi?id=112270

Patch by Felipe Zimmerle <felipe@zimmerle.org> on 2013-04-03
Reviewed by Adam Barth.

Source/WebCore:

Checks if the Element is being cloned, if so, the application of the
style is allowed otherwise it relies on default permission mechanism.

Test: http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html

* dom/Element.cpp:
(WebCore::Element::attributeChanged): Added parameter
AttributeModificationReason to the method signature.
(WebCore::Element::cloneAttributesFromElement): It is now calling
attributeChanged with AttributeModificationReason parameter. In this scope
it is always set to ModifiedByCloning.
(WebCode::Element::attributeChangedFromParserOrByCloning):
Added parameter AttributeModificationReason.
* dom/Element.h: Added AttributeModificationReason enum. Used to specify
whenever an attribute was set by a cloned oject or directly.
AttributeModificationReason added to attributeChanged with the default
value set to ModifiedDirectly.
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged): Added
AttributeModificationReason to the method signature.
(WebCore::StyledElement::styleAttributeChanged): Now it is checking the
reason of the update, if the reason is ModifiedDirectly check CSP
before set. If ModifiedByCloning set the attribute ignoring the CSP
policy.
* dom/StyledElement.h:
(StyledElement): Added AttributeModificationReason parameter to the methods:
attributeChanged and styleAttributeChanged, attributeChanged has
ModifiedDirectly as default value.
* svg/SVGElement.cpp:
(WebCore::SVGElement::attributeChanged): Added AttributeModificationReason
parameter to the method signature.
* svg/SVGElement.h:
(SVGElement): Added AttributeModificationReason parameter to the
attributeChanged signature with the default value set to:
ModifiedDirectly.

LayoutTests:

* http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Unskip /webkit2/WebKitWebContext/uri-scheme
https://bugs.webkit.org/show_bug.cgi?id=104779

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-03
Reviewed by Carlos Garcia Campos.

* Scripts/run-gtk-tests:
(TestRunner): Unskip /webkit2/WebKitWebContext/uri-scheme as it is
passing in current trunk.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BUILD FIX (r147494): -[AVAudioSession setCategory:error:] takes NSError**

Fixes the following build failure:

    Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:151:71: error: cannot initialize a parameter of type 'NSError **' with an lvalue of type 'NSError *'
        [[AVAudioSession sharedInstance] setCategory:categoryString error:error];
                                                                          ^~~~~

* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::setCategory): Add '&' operator.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BUILD FIX (r147493): Fix number of arguments to AudioDestinationIOS constructor

Fixes the following build failures:

    Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:84:25: error: no matching constructor for initialization of 'WebCore::AudioDestinationIOS'
        return adoptPtr(new AudioDestinationIOS(callback, sampleRate));
                            ^                   ~~~~~~~~~~~~~~~~~~~~
    In file included from Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:36:
    Source/WebCore/platform/audio/ios/AudioDestinationIOS.h:44:5: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
        AudioDestinationIOS(AudioIOCallback&, unsigned numberOfOutputChannels, double sampleRate);
        ^
    Source/WebCore/platform/audio/ios/AudioDestinationIOS.h:42:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
    class AudioDestinationIOS : public AudioDestination, public AudioSessionListener {
          ^
    Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:101:22: error: out-of-line definition of 'AudioDestinationIOS' does not match any declaration in 'WebCore::AudioDestinationIOS'
    AudioDestinationIOS::AudioDestinationIOS(AudioIOCallback& callback, double sampleRate)
                         ^~~~~~~~~~~~~~~~~~~
    2 errors generated.

* platform/audio/ios/AudioDestinationIOS.h:
(AudioDestinationIOS): Remove numberOfOutputChannels argument.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update the localizable strings file.

Rubber-stamped by Michael Saboff.

* English.lproj/Localizable.strings:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Add getter for JSC TestRunner to DumpRenderTreeQt.
https://bugs.webkit.org/show_bug.cgi?id=113864

Moving setDefersLoading from TestRunnerQt to TestRunner
requires access to the non-Qt TestRunner.
As long as we instantiate both TestRunner and TestRunnerQt,
we need a separate getter for the non-Qt TestRunner instance.

Reviewed by Simon Hausmann.

* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebPage::resetSettings):
* DumpRenderTree/qt/DumpRenderTreeQt.h:
(DumpRenderTree::jscTestRunner):
* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunner::setDefersLoading):
    Moving setDefersLoading from TestRunnerQt
    to TestRunner.
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunnerQt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Include Pango in jhbuild-optional.modules
https://bugs.webkit.org/show_bug.cgi?id=113878

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-03
Reviewed by Martin Robinson.

Since r147547 Pango 1.32.0 is required. Including the module in the
JHBuild optional moduleset.

* gtk/jhbuild-optional.modules: Add Pango module.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add omitted reference operator of VisiblePosition in AccessibilityObject
https://bugs.webkit.org/show_bug.cgi?id=113879

Reviewed by Darin Adler.

Seems reference operator has been omitted in startOfStyleRange function, so add it.

* accessibility/AccessibilityObject.cpp:
(WebCore::startOfStyleRange):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: DOM.highlightRect() and DOM.highlightQuad() should allow for page coordinates
https://bugs.webkit.org/show_bug.cgi?id=113869

Add a new "usePageCoordinates" parameter to DOM.highlightRect() and DOM.highlightQuad()
allowing to specify that the rect or quad to highlight should be converted to page
coordinates instead of using the default viewport coordinates.

Reviewed by Timothy Hatcher.

* inspector/Inspector.json:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightRect):
(WebCore::InspectorDOMAgent::highlightQuad):
(WebCore::InspectorDOMAgent::innerHighlightQuad):
Store the "usePageCoordinates" parameter obtained from the protocol calls onto the
highlight configuration object so that it may be used within the InspectorOverlay.

* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::highlightQuad):
Check the highlight configuration for the "usePageCoordinates" parameter and
apply the inverse of the page's scroll offset to the quad if it's true.

* inspector/InspectorOverlay.h:
(HighlightConfig):
(WebCore::Highlight::setDataFromConfig):
(Highlight):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gstreamer] Use gst_buffer_extract() in copyGstreamerBuffersToAudioChannel()
https://bugs.webkit.org/show_bug.cgi?id=113880

Reviewed by Philippe Normand.

copyGstreamerBuffersToAudioChannel() was mapping the GstBuffer content to memcpy
it to the AudioChannel buffer. This patch leverages gst_buffer_extract() to
simplify the code as it does exactly what we need: gst_buffer_map, memcpy,
gst_buffer_unmap and error handling.

Also replace GstBuffer NULL check by an assertion as we already make sure they
are not NULL before adding them to the list. Additionally, we now call
audioChannel->mutableData() only once instead of once per iteration. It is
a bit better as the getter does some work internally.

No new tests, no behavior change.

* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::copyGstreamerBuffersToAudioChannel):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] XMLHttpRequest upload events don't work with NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=113887

        Reviewed by Brady Eidson.

        Just forward didSendData client call to WebProcess.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didSendData):
        (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Tweaked a comment.
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didSendData):
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Network/WebResourceLoader.messages.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows, WinCairo] Unreviewed VS2010 Build Correction

* win/tools/scripts/auto-version2010.sh: Added properties svn:eol-style and svn:executable.
* win/tools/scripts/feature-defines2010.sh: Added properties svn:eol-style and svn:executable.



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