[WTR] process unresponsiveness is reported to the wrong test
https://bugs.webkit.org/show_bug.cgi?id=88404

Reviewed by Zoltan Herczeg.

Do resetting to consistent state after the finished test,
not before the next. This way we can report unresponsiveness
to the test that triggered it, and we do a restart before the
next test so it will start in a functional state.

* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitDriver._check_for_driver_crash):
Print the error line for unresponsive web process, otherwise
it's hard to tell what happened.
* WebKitTestRunner/TestController.cpp:
(WTR):
Decreased the default short timeout so we can detect unresponsiveness
before the timer of the test harness times out. It was unnecessarily
high anyway, we should get answer from the web process in those cases
when the short timeout is used in less than a second.
(WTR::TestController::runTest):
(WTR::TestController::run):
* WebKitTestRunner/TestController.h:
(TestController):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::dump):
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h:
(TestInvocation): Make the dump function static as it doesn't need an object.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add missing include to build on Mac OS 10.8

Reviewed by Ossy.

* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WTR] process unresponsiveness is reported to the wrong test
https://bugs.webkit.org/show_bug.cgi?id=88404

Unreviewed buildfix. Also made the change on the array size
suggested on review because I forgot it when landed.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][DRT] fast/loader/stop-provisional-loads.html fails
https://bugs.webkit.org/show_bug.cgi?id=92219

Patch by Joone Hur <joone.hur@intel.com> on 2012-08-03
Reviewed by Kenneth Rohde Christiansen.

This patch adds the ability to tell DRT to call ewk_frame_stop
inside of a didStartProvisionalLoadForFrame signal handler.
It allows to pass fast/loader/stop-provisional-loads.html.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::onFrameProvisionalLoad):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WTR] process unresponsiveness is reported to the wrong test
https://bugs.webkit.org/show_bug.cgi?id=88404

2nd unreviewed buildfix.

* WebKitTestRunner/TestInvocation.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Always save CONFIG & DEFINES in default_pre

Always doing it is cheaper than checking whether it needs to be done.
apart from that, it would break configuration initiated from another
project.

Patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-08-03
Reviewed by Tor Arne Vestbø.

* qmake/mkspecs/features/default_pre.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for GTK after r124581.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(runTest): Fix wrong variable name in ASSERT.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] LayerTreeCoordinator can disallow tile updates in forceRepaint
https://bugs.webkit.org/show_bug.cgi?id=93077

Reviewed by Jocelyn Turcotte.

Force tile updates when doing a forced repaint.

* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::forceRepaint):
(WebKit::LayerTreeCoordinator::layerTreeTileUpdatesAllowed):
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening of failing tests
https://bugs.webkit.org/show_bug.cgi?id=93098

Unreviewed EFL gardening. Add failing tests to the Test Expectations.

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-08-03

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add keyboard support for color suggestion popup
https://bugs.webkit.org/show_bug.cgi?id=93069

Reviewed by Kent Tamura.

Source/WebCore:

This adds support for keyboard inside the color suggestion popup.
Tab or arrow keys to move around. Return or space to select the color.
Escape closes the popup.

No new tests. Covered in platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html.

* Resources/colorSuggestionPicker.css:
(.color-swatch):
(.color-swatch:focus):
* Resources/colorSuggestionPicker.js:
(ColorPicker):
(ColorPicker.prototype._layout):
(ColorPicker.prototype.selectColorAtIndex): Selects color at index.
(ColorPicker.prototype._handleMouseMove): Set focus to the swatch under the mouse cursor.
(ColorPicker.prototype._handleKeyDown): Move focused element on arrow keys.
(ColorPicker.prototype._handleMouseDown): Prevents blur on click.

LayoutTests:

* platform/chromium-mac/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png:
* platform/chromium/TestExpectations:
* platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fixed WinCE compilation after r124589.

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
(WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Move build config default to build-webkit instead of default_pre

Allows the qmake buildsystem have its own default.

Patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-08-03
Reviewed by Tor Arne Vestbø.

* Scripts/webkitdirs.pm:
(buildQMakeProjects):
* qmake/mkspecs/features/default_pre.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Populate .qmake.cache from the top-level project file

This makes it possible to build webkit without using the perl build
script. The duplicated logic in build-webkit will be removed when we
remove the Qt4 code paths. The build-webkit script will then simply
call 'qmake WebKit.pro' from WEBKITOUTPUTDIR.

Patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-08-03
Reviewed by Tor Arne Vestbø.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add a null check for media implementation to fix a crash.
https://bugs.webkit.org/show_bug.cgi?id=93107

Reviewed by Rob Buis.

Fixes media/video-size.html.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMediaSliderTrack): Add null check.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[nrwt] fix unit tests after turned pixel testing to be a per test setting
https://bugs.webkit.org/show_bug.cgi?id=93112

Reviewed by Csaba Osztrogonác.

Change unit tests in accordance of per test switching of pixel testing.

* Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
(ChromiumAndroidDriverTest.test_command_from_driver_input):
* Scripts/webkitpy/layout_tests/port/driver_unittest.py:
(DriverTest.test_no_timeout):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
StringImpl created from literal should be BufferInternal
https://bugs.webkit.org/show_bug.cgi?id=92940

Reviewed by Anders Carlsson.

Source/WTF: 

The ownership of string created from literal should be BufferInternal so that
StringImpl never tries to delete the characters.

The ownership was accidentaly set to BufferOwned in r123689.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral): Update to use the new constructor.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
Add a new constructor making the construction from literal explicit.
Add the flag s_hashFlagHasTerminatingNullCharacter since the data has the terminating
null character.

Tools: 

Add tests for the contruction of strings from literal.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/AtomicString.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/StringImpl.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium mac] DumpRenderTree compile fails with warning/error in LayoutTestHelper.mm with 10.7sdk
https://bugs.webkit.org/show_bug.cgi?id=92820

Reviewed by Jochen Eisinger.

When building with the 10.7 SDK, use newer functions to switch color
profiles. Note that these newer functions aren't available on 10.6,
but we don't intend to ship DRT to users, and no bots that currently
build with the 10.7 SDK ship their binaries to 10.6 testers.

The new code was copied from Apple's DRT/mac/LayoutTestHelper.m.

* DumpRenderTree/chromium/LayoutTestHelper.mm:
(installLayoutTestColorProfile):
(restoreUserColorProfile):
(saveCurrentColorProfile):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for GTK after r124479.

.:

* Source/autotools/symbols.filter: Removed unneeded symbol.

Source/WebKit2:

* UIProcess/WebInspectorProxy.cpp:
(WebKit): Moved static const definitions from header file.
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy): Don't give values to static const members
here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][jhbuild] Switch to GStreamer 0.11 build
https://bugs.webkit.org/show_bug.cgi?id=91727

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Add a new function to encapsulate the GStreamer API removal of
GST_OBJECT_IS_FLOATING in the upcoming 1.0 release. Use of this
macro can now be replaced by calling the g_object_is_floating
function.

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
(gstObjectIsFloating):
* platform/graphics/gstreamer/GStreamerVersioning.h:

Tools:

Switch build-webkit --gtk to GStreamer 0.11 support and build the
necessary GStreamer git modules from JHBuild.

* Scripts/webkitdirs.pm:
(buildAutotoolsProject): Build WebKit with GStreamer 0.11 support.
* gtk/jhbuild.modules: GStreamer build support.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Overlays display checkerboard that doesn't resolve
https://bugs.webkit.org/show_bug.cgi?id=93099

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-08-03
Reviewed by Antonio Gomes.

The WebKit-thread overlays, like tap highlight, inspector highlight and
selection are all part of a separate graphics layer tree rooted in
WebPagePrivate::m_overlayLayer.

When LayerRenderer needs to schedule a commit to reactively render
tiles and resolve checkerboard, it does so through the root layer.
Since the overlay layer root didn't have a GraphicsLayerClient, there
was no implementation of GraphicsLayerClient::notifySyncRequired() to
call, and a commit was never scheduled, thus checkerboard never
resolved.

Fixed by adding a fallback implementation of GraphicsLayerClient in
WebPagePrivate and hooking up the overlay root to it. Also, this
implementation can be shared by the various overlays to avoide code
duplication, specifically to implement notifySyncRequired(),
showDebugBorders() and showRepaintCounter() only once.

Fixing this revealed a bug where the web page would get stuck in an
endless sequence of commits. It turned out that
WebPagePrivate::updateDelegatedOverlays() was called right in the
middle of the commit operation, after performing the webkit thread part
of the commit operation but before we continued on the compositing
thread. Since updateDelegatedOverlays() typically mutates layers, this
is very bad (layers should not be mutated mid-commit). The mutations
also cause a new commit to scheduled from within the current, which
results in an endless sequence of commits.

Fixed this latter bug by moving the updateDelegatedOverlays() call to
the beginning of the method where it can cause no harm. This is before
we mark the web page as no longer needing commit, so even if the
implementation flips the "needs commit" bit, we will immediately flip
it back and proceed with commit as usual.

PR 187458, 184377

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::overlayLayer):
(BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::notifySyncRequired):
(BlackBerry::WebKit::WebPagePrivate::showDebugBorders):
(BlackBerry::WebKit::WebPagePrivate::showRepaintCounter):
* Api/WebPage_p.h:
(WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::notifyAnimationStarted):
(BlackBerry::WebKit::WebPagePrivate::paintContents):
* WebCoreSupport/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::notifySyncRequired):
(WebCore::InspectorOverlay::showDebugBorders):
(WebCore::InspectorOverlay::showRepaintCounter):
* WebKitSupport/DefaultTapHighlight.cpp:
(BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired):
(BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
(WebKit):
(BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
* WebKitSupport/DefaultTapHighlight.h:
(DefaultTapHighlight):
* WebKitSupport/SelectionOverlay.cpp:
(BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
(BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
(WebKit):
(BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
* WebKitSupport/SelectionOverlay.h:
(SelectionOverlay):

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