summaryrefslogtreecommitdiffstats
path: root/src/core
Commit message (Collapse)AuthorAgeFilesLines
* Enable JavascriptCanOpenWindows and LocalStorageEnabled by defaultJocelyn Turcotte2014-09-121-2/+2
| | | | | | | | | | | | | Both QWebEnginePage::createWindow and QQuickWebEngineNewViewRequest behave as if JavascriptCanOpenWindows was disabled by default, when the application isn't handling new window signals. LocalStorageEnabled should have no negative impact to be enabled beside the used disk space, but is still less inconvenient than cookies or disk cache, which are also enabled by default. Change-Id: I3f5343c2410fac50bec08b386defe22baf3df440 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Enable JavaScript touch eventsJocelyn Turcotte2014-09-121-0/+17
| | | | | | | | They are disabled by default at the moment, enable them conditionally to a touch screen being available. Change-Id: I5827fe2326b7bc019fa5613121d1cfa666608e52 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Remove unnecessary private header includesJocelyn Turcotte2014-09-116-10/+6
| | | | | | | | Most importantly, get rid of QOpenGLContextPrivate::globalShareContext which will be removed before the final. Change-Id: I5796fa822d2962c21fd8b6d8d3c196686d536e3d Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add --log-level switchPeter Varga2014-09-111-0/+17
| | | | | | | | | | | | | | | | | The --log-level switch sets the log level of the chromium messages. It affects the browser and web processes but has no impact on the Qt messages. The following levels can be set: 0 -> LOG_INFO 1 -> LOG_WARNING 2 -> LOG_ERROR 3 -> LOG_FATAL Log level 3 set per default (fatal messages are shown only) since lower level messages might be irrelevant for those who use QtWebEngine API. Change-Id: Ie2ba10718d3c86bbfe3d847471b3facb346be446 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Do a minor update to Chromium 37.0.2062.103Jocelyn Turcotte2014-09-101-0/+2
| | | | | | Change-Id: Ie9334cc9cdd240b2f5ceea0e31d82258045ea18c Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix tst_QWebEngineFrame::progressSignal API test caseSzabolcs David2014-09-091-1/+0
| | | | | | | | This test fails, because we get two loadProgress signals with the 100 value if the page load is successful. Change-Id: Idbd68c28ba81f8ff0a5b1d98aece82e7a940f1b9 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix url stored in LoadRequestPeter Varga2014-09-052-4/+4
| | | | | | | | | | The test_urlProperty() qml test has failed because the active url was stored in LoadRequest in case of LoadFailedStatus. With this fix the loadRequest stores the url of that page which implies the request. Change-Id: I6aab814a4a7d3b47043b03fccde3d9995b40d8fa Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix an assertion in net/url_request/url_request.cc:656Andras Becsi2014-09-051-3/+1
| | | | | | | | | | | | | | Instead of cancelling the request we have to set error to net::ERR_ABORTED since URLRequest::BeforeRequestComplete enforces not receiving cancelled requests with an assertion. Our API requires the symmetric LoadStarten - LoadStopped signals even on an ignored request so cancelling the request and returning early would not be a solution, since it would not emit any LoadStopped signal. Change-Id: I1b13fe6520121805bcf420e810999c520c12bd5c Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* [Win] Fix compiler error by using toQt method for string16.Michael BrĂ¼ning2014-09-031-1/+1
| | | | | Change-Id: I3412c8e7315020f517039290b03282513569ef2d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Don't forward loading of error pages to the API layerPierre Rossi2014-09-026-14/+35
| | | | | | | | | | | | | | | | | | The fact that the error pages are HTML and get loaded through the same mechanism should be kept an implementation detail and not be considered as a new load in the API sense. Also implement HasErrorPage for good measure and remove an anoying warning from the demo browser. The issue of the url not being changed remains in the QML test (but it doesn't affect a typical browser-like UI since the user input is still there untouched in the address bar), just make sure that failure does not affect the later checks. It also seems like we have a focus problem somehow, but the test should probably use a click for that matter. Change-Id: Ib5e363981a11287fdf4bfe84b93c999d96ed8087 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* [Win] Enable multiple processes again.Michael BrĂ¼ning2014-09-021-2/+0
| | | | | | | This seems to work well with the Chromium 37-based snapshot. Change-Id: If7640bf7f2428db12eb2bd01707ef82df9014cf2 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Settings for Qt quickPierre Rossi2014-09-021-2/+0
| | | | | | | | | Expose settings in experimental for now. Simply use the global/per-view mechanism as a group level in between seems like overkill. Change-Id: I7610e9c7765ccb41674702acdd24a52b87716da8 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Try harder to return accessible namesFrederik Gladhorn2014-09-012-1/+84
| | | | | | | | | Always check if there is another accessible set as title for the one queried. For text fields also return the placeholder property if nothing else is set. Change-Id: I3f10ff04338a405ad8de00e75e15dded4aaeed3b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Revert "Revert "Improve roles""Frederik Gladhorn2014-09-011-33/+70
| | | | | | | | This reverts commit 0540dc569e5761378182485aadf4c91641f67d56. The change in qtbase is in and qt5.git has been updated. Change-Id: I6c44d2d8316e4f05a4f480ed276967d026c7a130 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Avoid duplicating timers in MessagePumpForUIQtJocelyn Turcotte2014-09-011-7/+19
| | | | | | | | | | | | | | Since DoDelayedWork always returns the time of the next delayed work to process, we would create a new timer for the same event every time we process an event. This would cause a timer starvation on Windows for example. Instead of blindly creating timers, keep track of the requested delay and create a new timer only if the new delay is shorted than the currently scheduled one. Change-Id: I2606231f0a48b8feb85f058a78eb772d26b222f3 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Support using MessagePumpForUIQt in standalone base::ThreadsWebKit Team2014-09-011-3/+10
| | | | | | | | | | | | | We currently assume that MessagePumpForUIQt will only be used on Qt's GUI thread but OSX and Windows do have some cases where TYPE_UI is used for non-UI threads. This currently causes asserts in debug on OSX since the DNS thread quits prematurely. Instead of overriding all those edge cases to use TYPE_DEFAULT, properly support MessagePumpForUIQt::Run by using a QEventLoop. Change-Id: Icdb65966867ca6fd3679c75a698007f63848babc Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Wait on sync point fences instead of creating a new fenceJocelyn Turcotte2014-09-014-71/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | Posting a runnable on the GPU thread's message loop and creating a GL fence sync there assumes that there is a current GL context, and that synchronizing with this context will make sure that we wait for all GL context producing any of our consumed texture mailboxes. This is however not always the case like when: - The current GL context on the GPU thread is destroyed right before our runnable is handled, displaying errors on the console that glFlush needs a current context. - The GL driver will do extra scheduling and let the scene graph thread synchronize its GL command stream only with the GL context in which the fence sync was created. To remedy the situation, make sure that Chromium creates a fence sync for every sync points associated with a mailbox that we consume and do so directly in the GL context associated with the originating glInsertSyncPointCHROMIUM call. Wait for all those syncs on the Qt side afterward. This might also help with a few erratic behaviors noticed on some embedded GL drivers. Change-Id: I5fc60fcf51497477b2e1b3a535d0a141954fc6e5 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* React to Accessibility being enabled/disabled globallyFrederik Gladhorn2014-09-012-2/+16
| | | | | Change-Id: I57a85682d132bfefcdb0e3d1b3065f0474317e32 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix crashes when running in debug on OSXJocelyn Turcotte2014-08-291-3/+0
| | | | | | | | | | | | | | | | | | When building debug-and-release, only the release version of core_generated.gyp, defining NDEBUG, would be generated by gyp_generator.prf. Both the debug and release ninja files would be generated by gyp from that same file and we would end up defining NDEBUG for src/core source files even in debug while the rest of the content layer would be properly built without it, causing crashes with object having unexpected sizes and non-symetrical clean-up routines. Skia doesn't seem to complain anymore if I build in release without this so simply remove it. Change-Id: I021f87f2dac5aa21831992824d39dc44216b5f58 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add Qt WebEngine Widgets API for allowing certificate errorsAllan Sandfeld Jensen2014-08-299-0/+375
| | | | | | | | | | | This adds API for overriding some certificate errors. Once overridden any identical error for the same hostname and certificate will use the same override. Similar API for QtWebEngine QML should be added in a later patch. Change-Id: I144147b86d9b592e3f87346a1e48890acee0c670 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix callback mechanism in the WebContentsAdapterSzabolcs David2014-08-281-6/+6
| | | | | | | | When we dispatch a request, we register it's callback with different ID in the QWebEnginePagePrivate. Change-Id: I1fa1f778de66fbedbd6cce35f6c823d5640dbe5e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update license headers.Pierre Rossi2014-08-282-28/+19
| | | | | | | | Because the files were recent additions or for other unclear reasons, not all the files were updated to reflect the license change. Change-Id: I6898f6f4f993f1efa9489382f0b94af285f8c4f5 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Revert "Improve roles"Jocelyn Turcotte2014-08-211-70/+33
| | | | | | | | | | | This reverts commit 7ea45766f6c49de9a81a387013fb1b98ab82766d. This blocks our integration into qt5.git for now as we would need to update qtbase as well and prevent us from pushing build fixes beyond this change. Let's get it in again after the alpha. Change-Id: Ie57c99dd91fc19ae2695f8d881a0a8318e988806 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-2189-1309/+904
| | | | | | | Change-Id: Idbe0eafb51d77cc00e3a93179b81770724d5bfaa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Propagate the page's screen coordinates when the top-level window movedJocelyn Turcotte2014-08-204-18/+22
| | | | | | | | | | | | | | | | This fixes a regression after the 37 upgrade where the select popups would have the wrong position. Adjust to the new behavior and also avoid doing a mapToGlobal of the position received in InitAsPopup. RWHV::SetBounds has been giving us screen coordinates since the Chromium 33 update, but popup locations somehow managed to work properly through some side-effect sorcery. This also fixes the value of window.screen[XY] in JavaScript which wasn't updated when the window was moved. Change-Id: I544499bafedccfb7d389b4abc48f1386c398473f Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Improve rolesFrederik Gladhorn2014-08-201-33/+70
| | | | | Change-Id: I0a0d546779aa4a22411f5811880268a61e803b0e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add iconUrl() to QWebEngineHistoryItemAllan Sandfeld Jensen2014-08-192-0/+11
| | | | | Change-Id: I61bda1aafc7513acdaeda99ef493ce50363d352e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update the gyp variable used to disable tcmallocPierre Rossi2014-08-191-2/+0
| | | | | | | | This changed with chrome 37. We only need to define it unconditionally in gyp_qtwebengine as tcmalloc is never an option for us. Change-Id: I8b21eb1114582c1d9a8aa61c5f15fc8469721395 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement accessibility functionsFrederik Gladhorn2014-08-181-4/+4
| | | | | | | | These get called in the new snapshot and will lead to crashes as soon as any screen reader is running. Change-Id: If10159b85e788538c93f32007b68441cdc35dc8f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement RenderWidgetHostViewQt::AccessibilityViewHasFocusFrederik Gladhorn2014-08-182-1/+6
| | | | | Change-Id: I2cbb4860936c7780a749047b37d8c9852f54e7bc Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix accessible roles after snapshot updateFrederik Gladhorn2014-08-181-102/+100
| | | | | Change-Id: I017d2cdf1424365c1a76ab2fce507c699a1ca502 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix accessibility event enum after snapshot updateFrederik Gladhorn2014-08-181-10/+10
| | | | | Change-Id: I3d8b29739595708aa785e147aa0c7967229ab807 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix accessibility state enum after snapshot updateFrederik Gladhorn2014-08-181-22/+22
| | | | | Change-Id: I6ecd3acc848a17f3527c95e5a23d29549532481a Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix a crash in WebEngineSettings when opening a new windowJocelyn Turcotte2014-08-153-11/+7
| | | | | | | | | | | | | | | | | | A new window means that the QWebEnginePage gets its WebContentsAdapter swapped and that the pointer in WebEngineSettings must be updated. Do the WebContentsAdapter-to-WebEngineSettings binding in WebContentsAdapter::initialize to cover both cases. This also refactors the way that QWebEngineSettings is created by removing the need to pass a QWebEngineSettingsPrivate instance to be adopted, and also move the global settings construction logic in the singleton accessor instead of relying on the fact that it uses a different contructor. Change-Id: I6f8a2ed1407a4b25f9898526db9432721c354ddf Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Handle new window/tab modifiers also on normal navigationsJocelyn Turcotte2014-08-156-30/+105
| | | | | | | | | | | | | | | | | AddNewContents is only called when window.open is called from JavaScript. We also want the shift/ctrl modifiers to trigger normal links to open in the requested disposition. In this case OpenURLFromTab will pass the detected disposition and we must create a new WebContents ourselves. Use the same code path going through WebContentsAdapterClient::adoptNewWindow except that we pass a null WebContents pointer to the WebContentsAdapter constructor and let it create its own when initialized. Change-Id: I817b0e72aec12723bf92d9b7ad85c1cecbf5e408 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix uncalled callbacks with findTextJocelyn Turcotte2014-08-153-10/+27
| | | | | | | | | | | | | | | | | Calling findText successively might prevent the previous pending FindReply to be sent, which would leak the callback on the application side. This would cause a crash in qupzilla since we empty all pending callbacks in the QWebEnginePage's destructor to catch this kind of issue. This also renames lastRequestId to nextRequestId to make it clear that this is the ID generator for everything, including findText, and that lastFindRequestId is only a tracker. Change-Id: Ia78d553a58ed31af7237aad8772fa9828560c6d4 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Don't build release with debug info by default on WindowsJocelyn Turcotte2014-08-141-0/+3
| | | | | Change-Id: Idf4373bc10367dfc15445c4c530915cbda04ae9c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Exclude accessibility files on windowsJocelyn Turcotte2014-08-141-0/+13
| | | | | | | | | | This allows the BrowserAccessibilityFactoryQt and BrowserAccessibilityQt classes to also be used on Windows, and this also remove our dependency on ATL, which is only easily available for Visual Studio Professional users. Change-Id: I1a9c047f0343252a0b6fcc215b84e4c2f3d664b4 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use the toolchain from PATH on WindowsJocelyn Turcotte2014-08-141-9/+14
| | | | | | | | | | | | | | We don't want to fetch the compiler path from the mkspec on Windows the same way that we do on linux/embedded. Qt usually let the build environment decide the MSVC toolchain, as it is usually done on Windows. This patch also passes the ninja_use_custom_environment_files ninja generator option to make sure that gyp doesn't try to construct the build environment by running the env scripts itself. Change-Id: I6e04471eb994b81a9f1b8b5f149b4dbddbb320a8 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix the build on windows when qtwebengine.chromiumsrcdir isn't setJocelyn Turcotte2014-08-141-2/+1
| | | | | | | | | | | | | | | qtwe_chromium_obj_dir wasn't falling back to src/3rdparty if the config couldn't be found in git. Move the fallback logic to a getChromiumSrcDir qmake function, and use it in both places. The build system will now also print that the Chromium sources will follow the git config if found instead of the other way around, since this should now be the normal case as part of Qt5. Change-Id: I5ab972ab53156c1bd033518e2eb51013559491ac Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use the unified gesture recognizerJocelyn Turcotte2014-08-143-174/+105
| | | | | | | | | | | | | | | | | | | | | | | The ui::GestureRecognizer is now tightly coupled with Aura and won't be usable on Mac or Android. Fortunately, the reason for this is that a new gesture recognizer common to both Android and Aura, ui::GestureProvider has been introduced. Using it allows us to stop pulling touch event types from Aura build files. Most of the change is about using ui::MotionEvent instead of ui::TouchEvent, and to feed them to the GestureProvider. A major difference is that the touch events sent to the renderer are not passed through the gesture recognizer only when the come back unhandled. They are instead always sent to both the renderer and the GestureProvider, and the call to OnTouchEventAck on the gesture filter tells it if the next event in the queue was handled or not, deciding if the gesture should be cancelled. Change-Id: Ifccebf85800cdf0ef29cf52b13f1bd659428e3f6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update the QtWebEngineCore library to run on top of Chromium 37Jocelyn Turcotte2014-08-1445-453/+279
| | | | | | | | | | | | | | | Most of the patch is about upstream classes/methods that changed. Other important details: - icu data files are now used by default - cygwin is no longer required to build on Windows - RenderFrameHost has been replacing RenderViewHost in a few places, following the separate process iframes support in Chromium - The user agent is accessed through ContentClient::GetUserAgent instead of from the command line switches Change-Id: I86cc93aff7ce31176a80b0b4a5d54025674a451c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Disable chromium error pagesPeter Varga2014-08-141-1/+1
| | | | | Change-Id: I6b70b6199f0502ef67043325e7b7680529bd33fa Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Ground work for Settings/PreferencesPierre Rossi2014-08-0910-0/+466
| | | | | | | | | | | | Core interface to expose toggling some of the WebPreferences for now and most probably some of the WebRuntimeFeatures soon. The whole dummy settings business is meant to keep things from breaking too much when bisecting, because it is assumed that there are always valid settings for a given adapterClient. Change-Id: Ic0a62bcb5af8c0254436dc770b43cde5016c3bbd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Use VisitedLinks component.Pierre Rossi2014-08-0810-3/+251
| | | | | | | | | This allows to resolve visited links in the render process. The newly introduced API at the Core layer should allow exposing this functionality to our widgets and Qt quick API layers. Change-Id: I256376afcfe79014dc274e2dddbac1986a884a93 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Remove duplicate code for egl extensions and native display queryingAndras Becsi2014-08-064-20/+12
| | | | | | | This is now possible through GLSurfaceQt, and GLContextHelper respectively. Change-Id: I06e13ccdea9737dc41b034befb4f01aa08d72c2a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Get rid of QOpenGLContextPrivate::setGlobalShareContexJocelyn Turcotte2014-08-061-2/+6
| | | | | | | | | | | Manually import qt_(set_)gl_global_share_context from QtGui instead. The binary compatibility of those symbols should be maintained in QtGui, allowing us to avoid depending on private API. Change-Id: I1f954ec10a793c3195d3aec01409dde1bc767d64 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use QSGEngine instead of the private QSGRenderContextJocelyn Turcotte2014-08-065-39/+19
| | | | | | | | | QSGEngine was added in Qt 5.4 to allow using the scene graph without QQuickWindow. Use it for our FBO as well as for the QOpenGLWidget rendering. Change-Id: If4665d4f33c9dad69d2d4269309163bb5ffbd8e3 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add QQuick API for intercepting navigation requestsAndras Becsi2014-08-064-12/+184
| | | | | | | | | | | | Add missing navigationRequested API to be able to intercept navigation requests. This is useful for ignoring requests for example in kiosk-like applications that want to restrinct navigation to a specific url or domain, or want to disable specific types of navigation requests (e.g. reloading, clicking links, form submissions). Change-Id: Ie375e635a3c3566527972d05f5d99b39489c5ca8 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Expose better error information in loadRequest.Pierre Rossi2014-08-0413-9/+152
| | | | | | | | | | | | Use the chromium localized error strings for that purpose, otherwise the error description is always empty. While we're at it, let's tap into the chromium error pages, which should hopefully make sense for most errors, and add some static asserts to check that the qt quick enum and the core one are in sync. Change-Id: Icf8fa7c3bf4a674c60a10950422135fb6930447a Reviewed-by: Andras Becsi <andras.becsi@digia.com>