| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the code and API in a few ways:
- Expose a more discoverable "request" argument in the signal.
- Use the request as the carrier of the backend WebContentsAdapter
and get rid of our handle.
- Put the adoption method (renamed to openIn) on the request object
and keep the view API clean of a context-specific adoptHandle method.
- Use an enum instead of strings for the new view destination.
- Do not let JavaScript own the request object since it won't be
necessary until we want to support asynchronous view attachment.
We can create the request object on the heap and let the JavaScript
engine own the object once we want to support it.
- Move the request class to its own header.
- Replace tabs.currentView by currentWebView in the quicknanobrowser
qml code since we now need this property on the root object anyway.
Change-Id: I40d7d15255f516ead9f3e414dd587bf345e6ca4b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-36472
Change-Id: I60267d6b9e2e99b20ddf604a0d6b0d8f2c8f1b27
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Break up the delegate implementation into two distinct subclasses.
The first one offers a way for the WebPage to tap into the
RenderWidgetHostView directly, while a different implementation
that is backed by a top-level widget can be used to show WebUI
popups on screen.
This has the benefit of not having a child widget in the webview
among other things. It also fixes our popups and allows them to fall
outside the window frame.
Change-Id: I80dc1e4f21bb91ff47c75a626d330f88eacce8c6
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
| |
Implement unreachableUrl support for WebContentsAdapter::setContent
and add loadProgressAfterLoadHtml QML test case.
Change-Id: I2d0d7834cbbf8f508de4fa9cb72240f2ac6ebf83
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|
|
|
|
|
|
|
|
| |
QQuickWebEngineViewPrivate needs a destructor to work right with
WebContentsAdapter.
Change-Id: I3df1b452eeaf3a7516eace9268884ff6d1211e44
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
MSVC thinks the firs part of that string is wide while the second
part is narrow and it won't allow to concetanete them directly.
Adding literal for wide string before ".qml" on Windows will
resolve it.
Change-Id: I934fed6fe9e9401461a8165a524e8110cec3c3fa
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a property isFullScreen and a signal
fullScreenRequested to QQuickWebEngineViewExperimental.
The signal fullScreenRequested is emitted when some web content
requests fullscreen through the javascript API.
The property isFullScreen is supposed to be set
programmatically when the view is being shown fullscreen.
This information is then available to the WebContentsDelegateQt
when checking if the fullscreen request has been accepted.
Change-Id: I04cbb45f263a188d26cc87d70ac53b0fbab63936
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Chromium calls RenderViewHostDelegate::TakeFocus when the
last focusable item within the page was reached.
We then have to move the focus on to the next/previous
QQuickItem.
Change-Id: Id0128053602ff1220c1bced1b218050b66fef659
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|
|
|
|
|
|
|
|
| |
This is needed to get text input working again on Mac.
Underlines are currently being ignored.
Change-Id: I2a1074a1151e9be6f96ebe12fd0bb40a0eb63d6a
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support reparenting, we make the compositing surface independent of
the window by using gfx::TEXTURE_TRANSPORT. We also need to be able to
keep frame data across window changes so we can reconstruct the QSGNode
tree in a new context, so extract that data into DelegatedFrameNodeData
class. Any context-specific data is still stored in DelegatedFrameNode.
Also hook up window changes to WebContents::WasShown/Hidden for Quick.
Remove checking of Qt isVisible state, this mechanism is used to sync
Chromium with Qt, not the other way around. WasShown/Hidden is
orthogonal to Show/Hide, and can use different triggers. However for
Widgets it probably makes sense to hook both up to widget visibility.
Change-Id: I1ef4b50cd61b8e54b791e03f0b41929c42fec8bf
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
| |
And unskip the corresponding autotest.
Change-Id: Ida2dcee38b261b2ba4ad0c5c016f5510ed1590a4
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should provide us with an initial empty document, which our
imported autotests tend to assume all over the place.
Initialization of the adapter is moved further down in
QQuickWebEngineView's constructor so that the value of
q_ptr is set and valid by the time we end up in
WebContentsViewQt::CreateViewForWidget.
Change-Id: I45d8d61e65caa3a690461b6da44adea9f8981e7e
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should not include chromium headers outside of core since
they might depend on defines or other build options only set in
the gyp/ninja environment.
This patch removes the need to include net/base/net_errors.h
in the API implementation of the QQuickWebEngineView and also
removes the chromium source directory from the global include
path. This prevents including chromium headers outside of core
by mistake and also makes it possible to load the project in
QtCreator without disabling indexing.
Change-Id: Icd13b6caa52509ef2a1b6b44eaffb34d8ae4addf
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
|
|
|
|
|
| |
Change-Id: I56c78aa7e60194888123d372c6dbbb60624856c5
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those methods are now made asynchronous and need to be given a
callback to handle the result.
Update the code in the browser and fancybrowser examples using
std::bind when using C++11 or tr1::bind with C++03 (which should be
available with compilers on platforms that we support).
Add a (currently failing) earlyToHtml test to make sure that an empty
page doesn't crash because of a possibly incomplete attachment of
the QtRenderViewObserver.
Change-Id: I3ab7cb6f25b91b584dd80df5e4e9ad1e3214348e
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prepares the way for other API made async like toHtml and
toPlainText.
Use a callback class with an implicit templated constructor to carry
the functor across the API boundary and avoid the intermediate helper
method as the ABI that we have to maintain.
Also pass the callback result through WebContentsAdapterClient using
a bookkeeping ID instead of transferring the callback to
WebContentsAdapter. This will allow other calls, which might not
already allow passing a callback functor, to use a consisten way
of carrying back the result to the top API layer.
Change-Id: Ia923767b9c1021a108c26da17d4c41878ef7cb95
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
|
|
|
|
|
| |
Change-Id: I6195c49f1647c78b16d9d47770ab37ba998a61a5
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Refactor JavaScriptDialogManagerQt to support a Qt Quick dialogs
friendly approach.
Qt Quick dialogs are still missing a prompt, so we use a "handmade"
one. This should be solved before 5.3 though.
Change-Id: I965df66837b2e81d6e4618a8da1167a37661c26e
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with the context Menus for QtQuick.
Add default UI delegates as a subproject. We allow ourselves to use
Qt Quick Controls there for in order to get a nice "out of the box"
experience for things like context menus, dialogs, etc while leaving
the door open for system embedders to override this.
Opting out of the deployment of these QML files is still very primitive
but can be done by passing WEBENGINE_CONFIG+=no_ui_delegates at qmake
time.
Customization of context menus could be done via a qml component, which
is probably best kept in experimental for now while we address its
shortcomings.
Change-Id: I0705b20d5ddd3bb010f9371b65a181c6b02a03e1
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new version of chooseFiles in QWebEnginePage.
The existing API in WebKit1 seemed a bit dusty in any case (multiple
only supported via extensions).
Changes are:
* oldFile becomes oldFiles, so that we could at a later stage expose
the already selected files in the "multiple" case.
* a type is introduced, for now limited to multiple selection, but
over time, we might consider additions such as directory upload.
Change-Id: I14cfea64ce95e892a0a1877c8cb914c5a421409f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
| |
It contains information about a requested load of a web page.
Change-Id: Ie45706adb51ee5bce98e7af01252d9a8389db57d
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|
|
|
|
|
|
| |
Change-Id: I403e7e3c89bd1881b96b1cc345ccdf115ceea5e9
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements adoptNewWindow for QQuickWebEngineView.
The API is only intended to be used through QML to avoid delegating
the QQuickWebEngineViewHandle ownership through a signal parameter.
Another limitation of the implementation is currently to fail the
handle adoption unless it is done synchronously within the
adoptNewWindow call. To support this we would need to delay the call
to WebContentsAdapter::initialize which will leave the adapter
without a client when returning to the event loop and would require
putting null checks everywhere it is used.
So I would prefer to keep the API limited and avoid potential crashes.
If we want to support asynchronous Loader elements or QML files
fetched from the network in the future, the API should be able to
scale to the task once we've adjusted the implementation.
This also adds basic tabs support in the quicknanobrowser example.
The url property is now set imperatively to avoid overwriting the
adopted WebContentsAdapter's loading URL.
Change-Id: Iba5c5dc3ffa21045f356be131ca15c01b9aee7c8
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
|
|
|
|
|
| |
Change-Id: I5130a10d56cc7c25da0eabf51c3657ef58cebaa7
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This specifies a devicePixelRatio to be used by web content instead of
the QScreen::devicePixelRatio(). This is necessary on non-iOS mobile
devices to remain compatible with the mobile web which assumes
devicePixelRatio is computed as the ratio of actual dpi to 160 dpi.
Non-iOS mobile platforms may use different criteria to determine the
QScreen::devicePixelRatio(), depending on the history of the platform,
or simply leave it at 1.0.
For QNX, this setting gets a reasonable default value so developers
don't have to regularly use this experimental API.
These changes were inspired by the Android Chromium port which uses a
GetDpiScale() to accomplish the same in
content/browser/android/content_view_core_impl.cc.
Change-Id: I1bc8878a47dabcdb6986c4fe5c8c4ac230ae2514
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NOTE: To build after this you should rerun init-repository.py or run
$> git submodule sync
$> git submodule update
$> git config qtwebengine.chromiumsrcdir src/3rdparty
This makes everything build by adjusting paths.
Other mixed-in changes:
- Rename qtwebengine_src variables in scripts to qtwebengine_root to
avoid confusion.
- Cleanup the release and debug extra targets that were in lib.pro.
This file has also been split into src.pro and core.pro.
Change-Id: Ieee9158a65f526b15244eaca59e779b7069d337e
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
|
|
This only move files without adjusting any paths.
This moves:
- lib/quick -> src/webengine/api (API files)
lib/quick -> src/webengine (other files)
This contains the main QtWebEngine module library since
<ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>.
- lib/widgets -> src/webenginewidgets
Also rename this directory to match its module name and rename Api to api.
- lib -> src/core
- process -> src/process
- resources -> src/core/resources
- tools/* -> tools/scripts/
The build directory is spread as follow:
- build/build.pro -> src/core/gyp_run.pro
- build/qmake_extras/* -> src/core/ (for the host and target .pro files)
- build/qmake -> tools/qmake
- Build related scripts -> tools/buildscripts
Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|