summaryrefslogtreecommitdiff
path: root/Source/WebKit
Commit message (Collapse)AuthorAgeFilesLines
* Fix warnings found by the headerclean testThiago Macieira2014-04-022-4/+4
| | | | | | | Extra semi-colons at the end of lines, arguments shadowing members, etc. Change-Id: I8163ed42da31b6a5bb37a56d8cf4c7b2e32139d3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Set image drag hotspot from drag image origin.Allan Sandfeld Jensen2014-03-281-3/+4
| | | | | | | | | | | QtWebKit does not currently set the drag image origin, this cause any dragged image to always visibly jump as soon as the drag start. By setting the hotspot any dragged image will start at its origin and only move when then the mouse moves. Change-Id: I6cdfa1bdbcf79a63f26fc62442978f65aabd493b Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Doc: Put \qtvariable in module page backv5.3.0-beta1Sergio Ahumada2014-03-211-0/+1
| | | | | | | | | It was removed by d441d6f39bb846989d95bcf5caf387b42414718d for some reason. Change-Id: I333cf71dc5bf69b3a1f5aa04f5089e9fbd617c6b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix static buildsAllan Sandfeld Jensen2014-03-191-0/+2
| | | | | | | | | Disable WebKit2 since WTF from qtdeclarative conflicts with ours, and renable use of thin archives for static builds, except only use it for the intermediate staticlibs. Change-Id: Iee625c5d25f01d1700d4c89028578e4d1288e2ba Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix a documentation oversightPierre Rossi2014-03-171-2/+2
| | | | | | | | | We had forgotten a few substitutions in the process it would seem. Change-Id: I37297c39bea84b0d277784edb80e72eab8de7ca7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix doc warningsJocelyn Turcotte2014-03-177-49/+18
| | | | | | | | | | - Qt for Embedded Linux Requirements isn't available since Qt5 - NOTIFY signal documentations are now ignored and are part of their property - The QtQuick1 WebView code isn't available anymore - Adjust to other renamed and removed pages Change-Id: Ife04becb1a847fb0bfb11dfafa6db2caa36aa9f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Fix missing image in QWebView class documentation.Michael Brüning2014-03-102-1/+1
| | | | | | | | | | Add a current image of a QWebView showing the Qt Project Homepage previewed in Qt Creator. Task-number: QTBUG-37208 Change-Id: Iedfee6965aa0ef35ba2a532a937e8054c4a0a9d5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix documentation of the selector APIAllan Sandfeld Jensen2014-03-103-5/+22
| | | | | | | | | | | We support all CSS selectors WebKit supports since the methods map internally to the DOM Selectors API. We should therefore update the documentation to claim more than CSS2 selector support. Task-number: QTBUG-37208 Change-Id: I4eae7c897f13bbb17221995ef764020d9341d1f8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Avoid deleting QtWebComboBox it's own nested QEventLoopAllan Sandfeld Jensen2014-03-043-2/+28
| | | | | | | | | | A race condition meant that sometimes a QtWebComboBox would be deleted in an eventloop run while hiding itself. This patch adds a flags and delays scheduling a deletion until after the nested eventloop. Task-number: QTBUG-29844 Change-Id: Ia5e03954756afa29c0be0a2d7f49ae8d1dbba250 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-127-3/+59
|\ | | | | | | Change-Id: Iea6cf3f34fb33f2d138b72243b0e688958d9424e
| * Fix build with QT_NO_GRAPHICSVIEWSergio Martins2014-02-092-0/+6
| | | | | | | | | | Change-Id: Ia909a560db58d6cdc6ec4bbac879249eb5e286ef Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
| * Update device pixel ratio on screen changeAllan Sandfeld Jensen2014-02-075-6/+40
| | | | | | | | | | | | | | | | | | This patch makes QWebPage listen to QWindow::screenChangedEvent and update the device pixel ratio when it is received. Task-number: QTBUG-36190 Change-Id: Ia28571ef241a3a2f970876f6e474b01c1ac001e1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| * TextureMapperGL must take hiDPI transform into accountAllan Sandfeld Jensen2014-02-061-1/+10
| | | | | | | | | | | | | | | | | | | | Since TextureMapperGL does its own native rendering it must itself apply the all transforms QPainter would normally do behind the scenes. Task-number: QTBUG-36508 Change-Id: Id4a0ee64ff7ac5c5cb51e45ffd2e4e25ed7fce74 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| * Forward devicePixelRatio to WebCore PageAllan Sandfeld Jensen2014-01-313-0/+7
| | | | | | | | | | | | | | | | | | The device pixel ratio must be set on Page for CSS image set and CSS media queries to work correctly. Task-number: QTBUG-36190 Change-Id: I76694c1375194f35df7f62e942bc8565f065a3bc Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* | Make indexed database follow Qt web settings if enabledAllan Sandfeld Jensen2014-01-163-14/+27
|/ | | | | | | | | | | | | Forwards the websettings for offline database storage which so far has been used for web SQL database to indexed database. Note that this does not add new API and does not make it possible to control web sql database and indexed database separately. The patch also adds a config test for leveldb which indexed db requires. Change-Id: I8808356c9910848c43c5f47e6279a1c632f17ad1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* [Qt] Re-enable plugins on Mac.Jocelyn Turcotte2014-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=116622 Reviewed by Tor Arne Vestbø. Source/WebCore: * platform/FileSystem.h: * platform/qt/FileSystemQt.cpp: (WebCore::unloadModule): - Q_WS_* aren't defined since Qt5, use Q_OS_MACX instead. * plugins/mac/PluginPackageMac.cpp: (WebCore::PluginPackage::fetchInfo): (WebCore::PluginPackage::load): - createCFString now does the adoption itself. * plugins/mac/PluginViewMac.mm: - Add missing include. Source/WebKit/qt: * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::windowResizerRect): - Add missing parenthese. Tools: Plugins on Mac were only enabled if !embedded but the later was set if QPA is enabled, which is the default since Qt 5.0. Remove references to 'embedded' and fix various build issues, PluginViewMac.mm and PluginPackageMac.cpp haven't been compiled since a few months. * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro: * qmake/mkspecs/features/features.prf: * qmake/mkspecs/features/unix/default_pre.prf: Task-number: QTBUG-35899 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151109 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: I49692a234a66c205099c5dde8eb24ffb6eadba0f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Do not accept all touch eventsAllan Sandfeld Jensen2013-12-203-9/+15
| | | | | | | | | | | | | | | | QtWebKit currently accepts all touch events to prevent the lack of accept on a TouchBegin from preventing receiving TouchUpdate and TouchEnd. This behavior prevents QGuiApplication from converting touch events to mouse events, and makes the WebView widget impossible to interact with by touch. This patch modifies the behavior slighly so that QtWebKit only accepts touch events if they are needed for the active document. Task-number: QTBUG-31938 Change-Id: Iba80ebfaf31c93f82356e3f0622039120921172a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove superfluous assert from WebKitQmlPlugin::initializeEngineMichael Brüning2013-12-021-1/+1
| | | | | | | | | The uri parameter is unused in this method and the ones called by it, so it should not be asserted on. Task-number: QTBUG-34066 Change-Id: I184fbad3e6e3d4786b4cc4e9f768f1c006309295 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Account for when the QGraphicsView is a top level widgetv5.2.0-rc1Andy Shaw2013-11-251-1/+4
| | | | | | | | | | | | | | When the QGraphicsView was a top level widget then it would not account for the transformations as it did not translate the point from the scene to the view. [ChangeLog][QtWebKitWidgets][QGraphicsWebView] Make sure that mouse events for QGraphicsWebView items in a top level QGraphicsView. Task-number: QTBUG-32179 Change-Id: I2c26580a7e7e5eaec08d71768298e961d3e9d13b Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Trigger layout after resizing the FrameView.Michael Brüning2013-11-161-0/+3
| | | | | | | | | | | | | | There are problems with QGLWidget based web plugins due to the fact that WebKit forces us to relayout during paint events, which in turn might resize widgets, causing the shared backing store's QImages to be corrupted and hence causing crashed. This patch triggers a layout upon resizing the FrameView, which reduces the likely hood of resizing plugins during a subsequent paintEvent. Task-number: QTBUG-34277 Change-Id: Id35c72a3cc68ac6633a74fba0669c2d8fbfabc88 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Fix fullscreen support with GStreamerAllan Sandfeld Jensen2013-11-076-8/+31
| | | | | | | | | | | | | Fullscreen support has not been working with GStreamer since Qt 4.8, the issue was the native fullscreen window was not fully ported, and was affected by some bitrot. This patch fixes the native fullscreen window for GStreamer, ensures the fullscreen options are available on WebKit1, and adds a context menu and web action to toggle fullscreen mode. Change-Id: I9c6c5a1e36fbbc8e1d1fae371bdf9abc1aee7775 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix ABI violation in QWebSettings::CSSCompositingEnabledAllan Sandfeld Jensen2013-10-313-5/+2
| | | | | | | | | | | | QWebSettings::CSSCompositingEnabled was added in the middle of the enum instead of being put at the end. Since it controlled a RuntimeEnabledFeatures which are global and does not work per page like QWebSettings should. The setting has been removed but kept enabled by default. Change-Id: I5dc35eee78c3846c8482e044c6dd5cd34410969c Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove unused runtime enabled featuresAllan Sandfeld Jensen2013-10-312-8/+1
| | | | | | | | | | | | | | | | | | | Reverts the addition of CanvasPathEnabled setting. It had no effect since it only changed the unused RuntimeEnabledFeatures. WebKit ChangeLog: https://bugs.webkit.org/show_bug.cgi?id=123509 Some of the runtime enabled features were only ever used by the V8 bindings and can be removed as no WebKit code sets or reads them. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): * bindings/generic/RuntimeEnabledFeatures.h: Change-Id: Ie15d05d6e27e5edb62cc5ce00fd59258df8ec2d7 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158269 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Prospective build fix for builds with video disabledSimon Hausmann2013-10-301-0/+2
| | | | | Change-Id: I65f8b063cdac252941d2e4dd91bd2a367b101cbc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Support HTML5 media context menu itemsAllan Sandfeld Jensen2013-10-288-5/+103
| | | | | | | | Support most of the items WebCore populates the context menu with when the user right clicks an HTML5 audio or video element. Change-Id: I331a3271f68075fe70d914e2675620f617d53b42 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix build for boot2qt eAndroidAllan Sandfeld Jensen2013-10-212-2/+2
| | | | | | | | | | | | | | Reverts the removal of Android support in WTF, and brings the support up to date. Merged change to MacroAssemblerARM.cpp from QtScript. Replaces use of statvfs with statfs in one place. Replaces shm-based shared memory with ashmem-based in WebKit2. Change-Id: I440b1fbd94bb4148f7ba764d77de65230d13ed90 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Missing QWebSettingsAllan Sandfeld Jensen2013-10-152-1/+11
| | | | | | | | | | | We have enabled the Canvas Path Object as compile-time feature, but being disabled by default we give the user no way of using it. CSS Grid layout is also disabled by default, but is already exposed but not documented. Change-Id: Ie7a7ac4c2ad24978ed83996ac37327acb2870fe0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Crash on GeoLocation demoAllan Sandfeld Jensen2013-10-044-6/+6
| | | | | | | | Apply missing QtLocation -> QtPositioning renaming. This was causing GeoLocationController to never be set. Change-Id: Id6b110ee2df3047b11e1c13ff5a1d2eb9d8b4c40 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* [Qt] Fix build with Qt 5.2 QtPosition moduleAllan Sandfeld Jensen2013-09-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=121089 Reviewed by Simon Hausmann. .: QtLocation -> QtPositioning * Source/sync.profile: Source/WebKit: QtLocation -> QtPositioning * WebKit1.pri: Source/WebKit/qt: QtLocation -> QtPositioning * WebCoreSupport/GeolocationClientQt.cpp: Source/WebKit2: QtLocation -> QtPositioning * Target.pri: * UIProcess/qt/WebGeolocationProviderQt.cpp: * WebKit2.pri: Tools: QtLocation -> QtPositioning. Make sure we set build type before doing configure checks that might depend on them. * qmake/mkspecs/features/default_pre.prf: * qmake/mkspecs/features/features.prf: Change-Id: I96a16559373a21513c4d83e53b6cee9f27682649 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156395 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* [Qt] RepaintRequested signal sometimes not emittedAllan Sandfeld Jensen2013-09-261-0/+2
| | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=121790 Reviewed by Simon Hausmann. We should also emit repaintRequested after calling PageClient::update(). * WidgetSupport/PageClientQt.cpp: (WebCore::PageClientQWidget::repaintViewport): (WebCore::PageClientQGraphicsWidget::repaintViewport): Change-Id: Ib8664ef0b25b7b9c51f3fd32925d018be3906299 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156329 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* [Qt] Crash when trying to download blob urlAllan Sandfeld Jensen2013-09-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=121681 Reviewed by Simon Hausmann. Source/WebCore: Resolve any blob URLs before creating a QUrl. * platform/network/qt/ResourceRequestQt.cpp: (WebCore::appendBlobResolved): (WebCore::resolveBlobUrl): (WebCore::ResourceRequest::toNetworkRequest): Source/WebKit/qt: Do not crash if a download was triggered on a resource WebCore handles internally. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::convertMainResourceLoadToDownload): Change-Id: I9191eb991be81f69df4328ab54132da3dde15241 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156330 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Import Qt5x2 branch of QtWebkit for Qt 5.2Allan Sandfeld Jensen2013-09-191679-362497/+47914
| | | | | | | Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Update location of qaccessiblewidget.hAllan Sandfeld Jensen2013-09-191-1/+1
| | | | | | | The definition of QAccessibleWidget has moved again. Change-Id: Ibeebdd236d5a5d40e4e811975524e5c3c5ee0673 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-133-8/+16
|\ | | | | | | | | | | | | Conflicts: Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp Change-Id: Iaa6209d0d611d18b8c916bcd165c8bf5b7441b7b
| * [Qt] Images scaled poorly on composited canvasAllan Sandfeld Jensen2013-09-031-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=120632 Reviewed by Jocelyn Turcotte. Explicitly set a imageInterpolationQuality on the TextureMapper, because InterpolationDefault may be interpreted differently by nested GraphicsContexts. * WebCoreSupport/TextureMapperLayerClientQt.cpp: (TextureMapperLayerClientQt::renderCompositedLayers): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154985 268f45cc-cd09-0410-ab3c-d52691b4dbfc Task-number: QTBUG-33081 Change-Id: Iec90f53da38c4520cef2aac0519e36af74dd5a50 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| * [Qt] Tiled-backing store not clipped to frame or visible rectAllan Sandfeld Jensen2013-09-031-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=120606 Reviewed by Jocelyn Turcotte. Clip painting from the tiled-backing store to the frame rect. * WebCoreSupport/QWebFrameAdapter.cpp: (QWebFrameAdapter::renderFromTiledBackingStore): Change-Id: Ic6947ae8cf58ce597ef82e2f465fc66d5674e0bd git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154983 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| * [Qt] Option key combinations do not work in Input Elements.Zeno Albisser2013-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=120423 Q_WS_MAC is obsolete. We should use Q_OS_MAC instead. This caused QTBUG-32388. * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::handleKeyboardEvent): Change-Id: Id884a2da61066e59bf733a83fd47346c270f7b8d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* | [Qt] Add Page Visibility API supportBenjamin Dupont2013-08-095-1/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Unprefix Page Visibility APIsimon.fraser@apple.com2013-08-094-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [Mac] Update PageVisibilityState when WebView is hidden / visiblejoepeck@webkit.org2013-08-082-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Improve PageVisibility API with enumsjoepeck@webkit.org2013-08-082-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'stable' into devSergio Ahumada2013-08-051-2/+0
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic3d3ef471f7b64dde6b7965d8514fc6916012c2f
| * [Qt][WK1] navigator.plugins shows too few entries.Michael Brüning2013-07-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=119332 Reviewed by Jocelyn Turcotte. Based on input by Choon Sik Cho. PlatformStrategiesQt::getPluginInfo was using the WTF::Vector::resize method wrongly. This patch removes the call to Vector::resize as Vector::append will take care of increasing capacity if needed. * WebCoreSupport/PlatformStrategiesQt.cpp: (PlatformStrategiesQt::getPluginInfo): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153517 268f45cc-cd09-0410-ab3c-d52691b4dbfc Task-Number: QTBUG-30141 Change-Id: Ic6dd9d6402251d5243e6793dd0d1170c685425d3 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | Doc: Setting \qtvariable in module page.Jerome Pasion2013-08-021-0/+2
|/ | | | | | | \qtvariable indicates the QT variable needed in .pro files. Change-Id: Ib26005e2c35d79090d36ee0be78c80a1b7cf208a Reviewed-by: Martin Smith <martin.smith@digia.com>
* [Qt] Handle Return key without key textAllan Sandfeld Jensen2013-07-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=117239 Reviewed by Andreas Kling. Source/WebCore: Test added to tst_qwebpage.cpp. * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::keyTextForKeyEvent): Source/WebKit/qt: Test for QKeyEvent(Return_Key) without key text. * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::inputMethods): Change-Id: I2e6ee33d90fd740ed2cb17580b1a6fa2f196943f git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151213 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-124-23/+66
|\ | | | | | | Change-Id: I66f94d7e3dea401f7a89a00fb474532377baf6c4
| * [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.Jocelyn Turcotte2013-06-061-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=116035 Reviewed by Allan Sandfeld Jensen. Source/WebCore: The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl which expects its QNetworkAccessManager to still be alive. Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer instead. The QNetworkReply doesn't need to be aborted in this case anyway. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper): (WebCore::QNetworkReplyWrapper::release): (WebCore::QNetworkReplyWrapper::stopForwarding): Rename resetConnections to stopForwarding since not all connections are related to data forwarding to the client anymore. (WebCore::QNetworkReplyWrapper::receiveMetaData): (WebCore::QNetworkReplyWrapper::replyDestroyed): (WebCore::QNetworkReplyWrapper::didReceiveFinished): * platform/network/qt/QNetworkReplyHandler.h: (QNetworkReplyWrapper): Source/WebKit/qt: * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::networkReplyParentDidntChange): Change test to match the new expectation. (tst_QWebPage::destroyQNAMBeforeAbortDoesntCrash): Change-Id: I5e82b8ccc8fccf496669af8de76888e367480f67 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150120 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
| * [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.Jocelyn Turcotte2013-06-061-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=116035 Reviewed by Simon Hausmann. Source/WebCore: Reproduced with arora which does destroy the QNetworkAccessManager in some situations. The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper): Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper. (WebCore::QNetworkReplyWrapper::release): Source/WebKit/qt: * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::networkReplyParentChanged): Change-Id: Id53db216a6252f8471d6fa97093312843213e48d git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150057 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
| * [Qt] Re-enable plugins on Mac.Jocelyn Turcotte2013-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=116622 Reviewed by Tor Arne Vestbø. Source/WebCore: * platform/FileSystem.h: * platform/qt/FileSystemQt.cpp: (WebCore::unloadModule): - Q_WS_* aren't defined since Qt5, use Q_OS_MACX instead. * plugins/mac/PluginPackageMac.cpp: (WebCore::PluginPackage::fetchInfo): (WebCore::PluginPackage::load): - createCFString now does the adoption itself. * plugins/mac/PluginViewMac.mm: - Add missing include. Source/WebKit/qt: * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::windowResizerRect): - Add missing parenthese. Tools: Plugins on Mac were only enabled if !embedded but the later was set if QPA is enabled, which is the default since Qt 5.0. Remove references to 'embedded' and fix various build issues, PluginViewMac.mm and PluginPackageMac.cpp haven't been compiled since a few months. * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro: * qmake/mkspecs/features/features.prf: * qmake/mkspecs/features/unix/default_pre.prf: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151109 268f45cc-cd09-0410-ab3c-d52691b4dbfc Conflicts: Source/WebCore/platform/FileSystem.h Source/WebCore/plugins/mac/PluginPackageMac.cpp Change-Id: I38dc6170ca868b54f8092aa6b271ace4911a2390 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
| * [Qt][Win] Input events aren't mapped properly with windowless plugins.Jocelyn Turcotte2013-06-042-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=116094 Reviewed by Tor Arne Vestbø. Source/WebCore: The events are first sent properly but Flash then immediately repaints and this causes flickering painting. The issue is that Flash seems to be doing some input event tracking of its own internally, using the HWND returned through NPN_GetValue(NPNVnetscapeWindow). We are currently using two coordinate systems for windowless plugins on Windows with Qt: - FrameView coordinates: Used for input events and ajusted with the WM_WINDOWPOSCHANGED message - Drawable coordinates: Used by WM_PAINT and adjusted with NPP_SetWindow This patch fixes the bug by mapping input events to the native window returned as NPNVnetscapeWindow instead of the FrameView to ensure that those coordinates will match the ones used by Flash internally. With this we shouldn't be using FrameView coordinates anywhere for windowless plugins on Windows with Qt. * platform/qt/QWebPageClient.h: (QWebPageClient): Added mapToOwnerWindow to the interface, mapping from the FrameView up to the wrapping nativeParentWidget. * plugins/win/PluginViewWin.cpp: (WebCore::contentsToNativeWindow): (WebCore::PluginView::paintIntoTransformedContext): (WebCore::PluginView::handleMouseEvent): Source/WebKit/qt: * WidgetSupport/PageClientQt.cpp: (WebCore::PageClientQWidget::mapToOwnerWindow): (WebCore::PageClientQGraphicsWidget::makeOpenGLContextCurrentIfAvailable): (WebCore::PageClientQGraphicsWidget::screenNumber): (WebCore::PageClientQGraphicsWidget::geometryRelativeToOwnerWidget): (WebCore::PageClientQGraphicsWidget::mapToOwnerWindow): (WebCore::PageClientQGraphicsWidget::graphicsItemVisibleRect): (WebCore::PageClientQGraphicsWidget::firstGraphicsView): Extracted this common logic from makeOpenGLContextCurrentIfAvailable, screenNumber, geometryRelativeToOwnerWidget and graphicsItemVisibleRect to be able to use it in mapToOwnerWindow. * WidgetSupport/PageClientQt.h: (PageClientQWidget): (PageClientQGraphicsWidget): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150749 268f45cc-cd09-0410-ab3c-d52691b4dbfc Conflicts: Source/WebCore/plugins/win/PluginViewWin.cpp Change-Id: I11ec6b6a9377c3e09b775d24fffb8572decbd0a5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>