Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I7f624a8e4ba9491c3ec635ffcb66a16c69bf8188
Update module version to 5.2.0

Change-Id: Iba23d3146a48cfaf38015cf3f0b80951ac6faacc
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ibb1f73326070b66000c54c3c722a45cb7b4791c1
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ibe8c6167bf9d9b6bd689b93ed7f5b94cdbd73ba7
Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
	.qmake.conf
	Source/sync.profile

Change-Id: Ia5f054c8e60b4b10a041de67f4752b999561fa56
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I6f93528553a73d6655415def2f49ce942a556058
Doc: Setting navigation variables.

-5.2 has a navigation bar in the documentation.

Change-Id: I96d39543d583019f480b40175a81a0f0e927f3e8
Reviewed-by: Martin Smith <martin.smith@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ibe6e706a4f315065b8cfa96d796c1f04063c58df
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I14418995f8602db318ae29e02089cab194354246
[Qt] Replace Nokia with Qt Project in service name.

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

Reviewed by Simon Hausmann.

* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Task-number: QTBUG-32390
Change-Id: I47c2e261e0f0512f6d576bbc2ad9189baf775830
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I387d45abe4c8228c8153250e64bd0b3eb4dedc87
[Qt] Avoid creating a QWindow for offscreen GraphicsContext3D

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

Reviewed by Noam Rosenthal.

In Qt 5.0 we had to create invisible windows, but in Qt 5.1
we can now create specific offscreen surfaces.

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

Change-Id: Ib5b6adadc1e60ec43883ac61595afbd4e43c5d4a
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt][WK1] Support WebGL with EGL on Linux

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

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Let GraphicsContext3D work without a GraphicsSurface.

* Target.pri:
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):

Tools:

* qmake/mkspecs/features/features.prf:

Change-Id: I6b126c9e6cd01c0db508a63166bc3c66e80f64fc
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt][WK1] Support direct painting without GraphicsSurface

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

Reviewed by Jocelyn Turcotte.

Configure the WebGL OpenGL context to share texture with
the HostWindow OpenGL if available, and paint accelerated
using the the now shared textures.

This should return the performance without GraphicsSurface
on the WK1 code path to what it was before r135995 (28/11 2012).

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

Change-Id: I3b2cdf2d06702c18b21a62eed0f6821d08033ec7
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Doc: Setting \qtvariable in module page.

\qtvariable indicates the QT variable needed in .pro files.

Change-Id: Ib26005e2c35d79090d36ee0be78c80a1b7cf208a
Reviewed-by: Martin Smith <martin.smith@digia.com>
Merge branch 'stable' into dev

Conflicts:
	.qmake.conf

Change-Id: Ic3d3ef471f7b64dde6b7965d8514fc6916012c2f
Improve PageVisibility API with enums

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

Reviewed by Sam Weinig.

Source/WebKit/mac:

* WebView/WebView.mm:
* WebView/WebViewPrivate.h:
(corePageVisibilityState):
(-[WebView _setVisibilityState:isInitialState:]):
Switch the private API form int to a WebPageVisibilityState enum.

Source/WebKit2:

* Shared/API/c/WKPageVisibilityTypes.h: Added.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toPageVisibilityState):
Create an enum for page visibility APIs and a conversion function
for the WK2 values to WebCore values.

* Target.pri:
* GNUmakefile.list.am:
* WebKit2.xcodeproj/project.pbxproj:
Add WKPageVisibilityTypes.h to the build as a private export.

* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetVisibilityState):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setVisibilityState):
UIProcess API to set visibility state. WebPageProxy already
had m_visibilityState, so update that when setter is used.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/InjectedBundle/InjectedBundle.h:
Remove the old SPI for WebKitTestRunner. Tests now use the C API.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setVisibilityState):
* WebProcess/WebPage/WebPage.messages.in:
Update the existing WebPage API to use uint32_t, which matches
other enum message types.

Tools:

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::resetPageVisibility):
(TestRunner::setPageVisibility):
Update the WK1 test code to use the new WK1 enums.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::setVisibilityState):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPageVisibility):
(WTR::TestRunner::resetPageVisibility):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setVisibilityState):
* WebKitTestRunner/TestController.h:
(TestController):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
Update the WK2 test code to use the new WK2 API and enums.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::setPageVisibilityStateWithEvalContinuation):
(TestWebKitAPI::assertSerializedScriptValueIsStringValue):
(TestWebKitAPI::didRunStep1StateChangeVisibleToHidden):
(TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender):
(TestWebKitAPI::didRunStep3StateChangePrerenderToPreview):
(TestWebKitAPI::didRunStep4InStatePreview):
(TestWebKitAPI::TEST):
Test the new WK2 API with all enum types.

Change-Id: I0a057111d7ef26cb87ade328291d4f94322480b7
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
[Mac] Update PageVisibilityState when WebView is hidden / visible

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

Source/WebKit/mac:

Reviewed by NOBODY (OOPS!).

* WebView/WebView.mm:
* WebView/WebViewPrivate.h:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Set the initial visibility of the page.

(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView _isViewVisible]):
(-[WebView _updateVisibilityState]):
(-[WebView viewDidMoveToWindow]):
(-[WebView _windowVisibilityChanged:]):
Update visibility state in the same ways WK2 does. This involves
listening for some new NSWindow delegates.

Tools:

Add a test that PageVisibility of WK1 WebViews and WK2 WKViews
automatically changes between hidden and visible as the view is added
and removed from window, or when it is in a window that changes
visibility, for instance by minimizing / deminimizing.

Reviewed by NOBODY (OOPS!).

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: Added.
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: Added.
(-[PageVisibilityStateDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
(runJavaScriptAlert):
(PageVisibilityStateWithWindowChanges):
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::initializeView):
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::deinitializeView):
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
(TestWebKitAPI::TEST_F):
Test visibility state of a page in a WebView/WKView with different window states.

* TestWebKitAPI/mac/WebKitAgnosticTest.h:
* TestWebKitAPI/mac/WebKitAgnosticTest.mm:
(TestWebKitAPI::WebKitAgnosticTest::deinitializeView):
(TestWebKitAPI::WebKitAgnosticTest::runWebKit1Test):
(TestWebKitAPI::WebKitAgnosticTest::runWebKit2Test):
Add a WK1 and WK2 deinitializeView to balance initializeView.

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

Change-Id: Ie9ef191e55f69ee32b01a0e7220820be038ac8a4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Unprefix Page Visibility API

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

Source/WebCore:

Reviewed by Tim Horton.

Remove prefixes from the document properties, and the visibilitychanged event.

Rename the "preview" state to "unloaded". The "unloaded" state is never
reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).

Add some comments to places where we should update the visibility state
when going in and out of the page cache, but cannot safely do so yet.

Tested by existing Page Visibility tests.

* dom/Document.cpp:
(WebCore::Document::pageVisibilityState):
(WebCore::Document::visibilityState):
(WebCore::Document::hidden):
(WebCore::Document::dispatchVisibilityStateChangeEvent):
* dom/Document.h:
* dom/Document.idl:
* dom/EventNames.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/Page.cpp:
(WebCore::Page::setVisibilityState):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString):
* page/PageVisibilityState.h:

Source/WebKit/efl:

Reviewed by Tim Horton.

Rename "preview" state to "unloaded" state.

* WebCoreSupport/AssertMatchingEnums.cpp:
* ewk/ewk_view.h:

Source/WebKit/mac:

Reviewed by Tim Horton.

Renaming of the "preview" state to "unloaded".

* WebView/WebView.mm:
* WebView/WebViewPrivate.h:

Source/WebKit2:

Reviewed by Tim Horton.

Renaming of the "preview" state to "unloaded".

* Shared/API/c/WKPageVisibilityTypes.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toPageVisibilityState):

Tools:

Reviewed by Tim Horton.

Rename "preview" state to "unloaded" state, and adjust the tests
to test for it.

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setPageVisibility):
* TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp:
(TestWebKitAPI::setPageVisibilityStateWithEvalContinuation):
(TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender):
(TestWebKitAPI::didRunStep3StateChangePrerenderToUnloaded):
(TestWebKitAPI::didRunStep4InStateUnloaded):
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html:
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPageVisibility):

LayoutTests:

Reviewed by Tim Horton.

Remove prefixes, adjust to state name changes.

* fast/events/page-visibility-iframe-delete-test.html:
* fast/events/page-visibility-iframe-move-test-expected.txt:
* fast/events/page-visibility-iframe-move-test.html:
* fast/events/page-visibility-iframe-propagation-test-expected.txt:
* fast/events/page-visibility-iframe-propagation-test.html:
* fast/events/page-visibility-null-view-expected.txt:
* fast/events/page-visibility-null-view.html:
* fast/events/page-visibility-transition-test-expected.txt:
* fast/events/page-visibility-transition-test.html:

Change-Id: I9751efeae0bab8136a63c7e22ad0d513fc8ceb0c
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Add Page Visibility API support

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

Patch by Benjamin Dupont <bdupont@nds.com> on 2013-08-06
Reviewed by Simon Hausmann.

* WebCoreSupport/QWebPageAdapter.cpp:
(webPageVisibilityStateToWebCoreVisibilityState):
(webCoreVisibilityStateToWebPageVisibilityState):
(QWebPageAdapter::setVisibilityState):
(QWebPageAdapter::visibilityState):
* WebCoreSupport/QWebPageAdapter.h:
* WidgetApi/qwebpage.cpp:
(QWebPage::setVisibilityState):
(QWebPage::visibilityState):
* WidgetApi/qwebpage.h:
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::changeVisibilityState):

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

[Qt] Build fix after r153751

Unreviewed build fix.

Fix build when PAGE_VISIBILITY_API is disabled.

* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::visibilityState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change-Id: I7c99337a902d7d06cde03107ebf71e3fce430fdf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>