Fix tst_QWebEngineFrame::setUrlWithFragment test

Change this test to rely on urlChanged() instead loadFinished(),
because we don't get loadFinished signal if the load was handled
by the same page.

Change-Id: I65aa06afa4512fa845074ad97b87ecba16da687e
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Do away without QWebEngineWidgets::initialize

If we consider the plugin scenario is unlikely and decide it's
unsupported for widgets, we can simplify our tests and examples
a bit on this front.

Change-Id: Idc96032c127b4ee74fb5c7b3d2cdfdf99c3a722e
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
s/QWebEngine/QtWebEngine/g

and make it a namespace

Change-Id: I15c1af8c7d0d8ab213cdf7945109263fe461d2ac
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Expose better error information in loadRequest.

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>
Add QQuick API for intercepting navigation requests

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>
Clean up opaque pointer handling for QQuickWebEngineLoadRequest

Hide QObject's d_ptr member and use the macros when accessing
the private class. This patch also adds missing qt namespace
macros to the implementation.

Change-Id: I004e3ea52bf21618835724d218f2a405f77ca4d1
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Move the runJavaScript function from experimental to public API

This is essential API that should be public.

Change-Id: Ifbd86171933936112e2495ebed074faa2e52464d
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Use QSGEngine instead of the private QSGRenderContext

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>
Get rid of QOpenGLContextPrivate::setGlobalShareContex

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>
Remove duplicate code for egl extensions and native display querying

This is now possible through GLSurfaceQt, and GLContextHelper respectively.

Change-Id: I06e13ccdea9737dc41b034befb4f01aa08d72c2a
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Add findText to Quick API

Change-Id: Ic0de45c1fe2a5537d61ad446c96fe8fda7c30966
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Use VisitedLinks component.

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>
Ground work for Settings/Preferences

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>