summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-10-06 12:19:11 +0200
committerLiang Qi <liang.qi@qt.io>2016-10-06 12:19:11 +0200
commit7439343d169095a510d122ad7c69646a5946cdce (patch)
tree8540b2bac1e495533585a645e216eaab66b06bd2 /src/webengine
parent3ecd61aea90cc4b283ffe9409cc10f5fd3476ecf (diff)
parentf8c132ffb7cd32d52bbfe09caa811665a3cb1069 (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: src/3rdparty src/webengine/api/qquickwebenginesettings.cpp Change-Id: Ie4abadb076c51d070cbb05f29b9ebcd9705933ad
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp6
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp10
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp2
-rw-r--r--src/webengine/api/qquickwebengineview.cpp6
-rw-r--r--src/webengine/api/qtwebengineglobal.cpp2
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp14
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.h1
7 files changed, 29 insertions, 12 deletions
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index 447937592..8bf319b85 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -163,7 +163,7 @@ void QQuickWebEngineDownloadItem::cancel()
}
/*!
- \qmlproperty quint32 WebEngineDownloadItem::id
+ \qmlproperty int WebEngineDownloadItem::id
Holds the download item's ID.
*/
@@ -222,7 +222,7 @@ qint64 QQuickWebEngineDownloadItem::receivedBytes() const
}
/*!
- \qmlproperty QString WebEngineDownloadItem::mimeType
+ \qmlproperty string WebEngineDownloadItem::mimeType
\since QtWebEngine 1.2
Holds the MIME type of the download.
@@ -235,7 +235,7 @@ QString QQuickWebEngineDownloadItem::mimeType() const
}
/*!
- \qmlproperty QString WebEngineDownloadItem::path
+ \qmlproperty string WebEngineDownloadItem::path
Holds the full target path where data is being downloaded to.
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 32161570d..1ca97adea 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -288,7 +288,7 @@ QQuickWebEngineProfile::~QQuickWebEngineProfile()
}
/*!
- \qmlproperty QString WebEngineProfile::storageName
+ \qmlproperty string WebEngineProfile::storageName
The storage name that is used to create separate subdirectories for each profile that uses
the disk for storing persistent data and cache.
@@ -367,7 +367,7 @@ void QQuickWebEngineProfile::setOffTheRecord(bool offTheRecord)
}
/*!
- \qmlproperty QString WebEngineProfile::persistentStoragePath
+ \qmlproperty string WebEngineProfile::persistentStoragePath
The path to the location where the persistent data for the browser and web content are
stored. Persistent data includes persistent cookies, HTML5 local storage, and visited links.
@@ -404,7 +404,7 @@ void QQuickWebEngineProfile::setPersistentStoragePath(const QString &path)
}
/*!
- \qmlproperty QString WebEngineProfile::cachePath
+ \qmlproperty string WebEngineProfile::cachePath
The path to the location where the profile's caches are stored, in particular the HTTP cache.
@@ -439,7 +439,7 @@ void QQuickWebEngineProfile::setCachePath(const QString &path)
}
/*!
- \qmlproperty QString WebEngineProfile::httpUserAgent
+ \qmlproperty string WebEngineProfile::httpUserAgent
The user-agent string sent with HTTP to identify the browser.
*/
@@ -574,7 +574,7 @@ void QQuickWebEngineProfile::setHttpCacheMaximumSize(int maximumSize)
}
/*!
- \qmlproperty QString WebEngineProfile::httpAcceptLanguage
+ \qmlproperty string WebEngineProfile::httpAcceptLanguage
The value of the Accept-Language HTTP request-header field.
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index 56634392c..09bf2708e 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -347,7 +347,7 @@ bool QQuickWebEngineSettings::allowRunningInsecureContent() const
}
/*!
- \qmlproperty QString WebEngineSettings::defaultTextEncoding
+ \qmlproperty string WebEngineSettings::defaultTextEncoding
\since QtWebEngine 1.2
Sets the default encoding. The value must be a string describing an encoding such as "utf-8" or
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 64f7fb5be..61f940f15 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -826,8 +826,10 @@ void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContent
// This throws away the WebContentsAdapter that has been used until now.
// All its states, particularly the loading URL, are replaced by the adopted WebContentsAdapter.
- WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis());
- adapterOwner->deleteLater();
+ if (adapter) {
+ WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis());
+ adapterOwner->deleteLater();
+ }
adapter = webContents->sharedFromThis();
adapter->initialize(this);
diff --git a/src/webengine/api/qtwebengineglobal.cpp b/src/webengine/api/qtwebengineglobal.cpp
index 801052782..a242fc6aa 100644
--- a/src/webengine/api/qtwebengineglobal.cpp
+++ b/src/webengine/api/qtwebengineglobal.cpp
@@ -62,7 +62,7 @@ namespace QtWebEngine {
/*!
\fn QtWebEngine::initialize()
- Sets up an OpenGL Context that can be shared between processes. This has to be done after
+ Sets up an OpenGL Context that can be shared between threads. This has to be done after
QGuiApplication is created, but before a Qt Quick window is created.
This has the same effect as setting the Qt::AA_ShareOpenGLContexts
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index 68b097d4a..f79b0ca22 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -343,6 +343,16 @@ void RenderWidgetHostViewQtDelegateQuick::inputMethodEvent(QInputMethodEvent *ev
void RenderWidgetHostViewQtDelegateQuick::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
{
QQuickItem::geometryChanged(newGeometry, oldGeometry);
+
+ if (window()) {
+ // TODO(pvarga): Use QQuickItem::mapToGlobal from Qt 5.7
+ const QPoint globalPos = window()->mapToGlobal(position().toPoint());
+ if (globalPos != m_lastGlobalPos) {
+ m_lastGlobalPos = globalPos;
+ m_client->windowBoundsChanged();
+ }
+ }
+
m_client->notifyResize();
}
@@ -375,6 +385,10 @@ QSGNode *RenderWidgetHostViewQtDelegateQuick::updatePaintNode(QSGNode *oldNode,
void RenderWidgetHostViewQtDelegateQuick::onWindowPosChanged()
{
+ if (window()) {
+ // TODO(pvarga): Use QQuickItem::mapToGlobal from Qt 5.7
+ m_lastGlobalPos = window()->mapToGlobal(position().toPoint());
+ }
m_client->windowBoundsChanged();
}
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h
index de3aff291..385a98a3c 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h
@@ -104,6 +104,7 @@ private:
QList<QMetaObject::Connection> m_windowConnections;
bool m_isPopup;
bool m_initialized;
+ QPoint m_lastGlobalPos;
};
} // namespace QtWebEngineCore