summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/config/common.pri10
-rw-r--r--src/core/config/linux.pri34
-rw-r--r--src/core/config/mac_osx.pri4
-rw-r--r--src/core/content_client_qt.cpp3
-rw-r--r--src/core/core_chromium.pri6
-rw-r--r--src/core/core_module.pro4
-rw-r--r--src/core/gn_run.pro4
-rw-r--r--src/core/render_widget_host_view_qt.cpp6
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp10
-rw-r--r--src/core/renderer/web_channel_ipc_transport.cpp2
-rw-r--r--src/core/url_request_qrc_job_qt.cpp2
-rw-r--r--src/core/web_contents_adapter.cpp12
-rw-r--r--src/core/web_contents_adapter.h1
-rw-r--r--src/core/web_contents_delegate_qt.cpp33
-rw-r--r--src/core/web_contents_delegate_qt.h7
-rw-r--r--src/core/web_event_factory.cpp20
-rw-r--r--src/core/web_event_factory.h2
17 files changed, 97 insertions, 63 deletions
diff --git a/src/core/config/common.pri b/src/core/config/common.pri
index e7010a13a..c1d5331ab 100644
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -14,7 +14,7 @@ gn_args += \
enable_swiftshader=false \
use_custom_libcxx=false
-qtConfig(printing-and-pdf) {
+qtConfig(webengine-printing-and-pdf) {
gn_args += enable_basic_printing=true enable_print_preview=true
gn_args += enable_pdf=true
} else {
@@ -22,25 +22,25 @@ qtConfig(printing-and-pdf) {
gn_args += enable_pdf=false
}
-qtConfig(pepper-plugins) {
+qtConfig(webengine-pepper-plugins) {
gn_args += enable_plugins=true enable_widevine=true
} else {
gn_args += enable_plugins=false enable_widevine=false
}
-qtConfig(spellchecker) {
+qtConfig(webengine-spellchecker) {
gn_args += enable_spellcheck=true
} else {
gn_args += enable_spellcheck=false
}
-qtConfig(webrtc) {
+qtConfig(webengine-webrtc) {
gn_args += enable_webrtc=true
} else {
gn_args += enable_webrtc=false
}
-qtConfig(proprietary-codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
+qtConfig(webengine-proprietary-codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
CONFIG(release, debug|release) {
force_debug_info {
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index 78f3e5093..c5329dfcc 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -115,20 +115,21 @@ host_build {
gn_args += host_pkg_config=\"pkg-config\"
}
- qtConfig(webengine-system-zlib): qtConfig(system-minizip) {
+ qtConfig(webengine-system-zlib): qtConfig(webengine-system-minizip) {
gn_args += use_system_zlib=true use_system_minizip=true
+ qtConfig(printing-and-pdf): gn_args += pdfium_use_system_zlib=true
}
qtConfig(webengine-system-png): gn_args += use_system_libpng=true
qtConfig(system-jpeg): gn_args += use_system_libjpeg=true
qtConfig(system-freetype): gn_args += use_system_freetype=true
qtConfig(webengine-system-harfbuzz): gn_args += use_system_harfbuzz=true
- qtConfig(system-glib): gn_args += use_glib=false
- qtConfig(pulseaudio) {
+ qtConfig(webengine-system-glib): gn_args += use_glib=false
+ qtConfig(webengine-pulseaudio) {
gn_args += use_pulseaudio=true
} else {
gn_args += use_pulseaudio=false
}
- qtConfig(alsa) {
+ qtConfig(webengine-alsa) {
gn_args += use_alsa=true
} else {
gn_args += use_alsa=false
@@ -138,18 +139,19 @@ host_build {
!packagesExist(libpci): gn_args += use_libpci=false
!packagesExist(xscrnsaver): gn_args += use_xscrnsaver=false
- qtConfig(system-libevent): gn_args += use_system_libevent=true
- qtConfig(system-libwebp): gn_args += use_system_libwebp=true
- qtConfig(system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true
- qtConfig(system-opus): gn_args += use_system_opus=true
- qtConfig(system-snappy): gn_args += use_system_snappy=true
- qtConfig(system-libvpx): gn_args += use_system_libvpx=true
- qtConfig(system-icu): gn_args += use_system_icu=true icu_use_data_file=false
- qtConfig(system-ffmpeg): gn_args += use_system_ffmpeg=true
- qtConfig(system-re2): gn_args += use_system_re2=true
+ qtConfig(webengine-system-libevent): gn_args += use_system_libevent=true
+ qtConfig(webengine-system-libwebp): gn_args += use_system_libwebp=true
+ qtConfig(webengine-system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true
+ qtConfig(webengine-system-opus): gn_args += use_system_opus=true
+ qtConfig(webengine-system-snappy): gn_args += use_system_snappy=true
+ qtConfig(webengine-system-libvpx): gn_args += use_system_libvpx=true
+ qtConfig(webengine-system-icu): gn_args += use_system_icu=true icu_use_data_file=false
+ qtConfig(webengine-system-ffmpeg): gn_args += use_system_ffmpeg=true
+ qtConfig(webengine-system-re2): gn_args += use_system_re2=true
+ qtConfig(webengine-system-lcms2): gn_args += use_system_lcms2=true
# FIXME:
- #qtConfig(system-protobuf): gn_args += use_system_protobuf=true
- #qtConfig(system-jsoncpp): gn_args += use_system_jsoncpp=true
- #qtConfig(system-libsrtp: gn_args += use_system_libsrtp=true
+ #qtConfig(webengine-system-protobuf): gn_args += use_system_protobuf=true
+ #qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true
+ #qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=true
}
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
index 57f301f18..2d820c889 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -32,8 +32,8 @@ gn_args += \
toolkit_views=false \
use_external_popup_menu=false
-qtConfig(spellchecker) {
- qtConfig(native-spellchecker): gn_args += use_browser_spellchecker=true
+qtConfig(webengine-spellchecker) {
+ qtConfig(webengine-native-spellchecker): gn_args += use_browser_spellchecker=true
else: gn_args += use_browser_spellchecker=false
} else {
gn_args += use_browser_spellchecker=false
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 1016db0d5..a3a460cb4 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -236,6 +236,7 @@ void AddPepperWidevine(std::vector<content::PepperPluginInfo>* plugins)
#elif defined(Q_OS_LINUX)
pluginPaths << QStringLiteral("/opt/google/chrome/libwidevinecdmadapter.so") // Google Chrome
<< QStringLiteral("/usr/lib/chromium/libwidevinecdmadapter.so") // Arch
+ << QStringLiteral("/usr/lib/chromium-browser/libwidevinecdmadapter.so") // Ubuntu/neon
<< QStringLiteral("/usr/lib64/chromium/libwidevinecdmadapter.so"); // OpenSUSE style
#endif
}
@@ -257,7 +258,7 @@ void AddPepperWidevine(std::vector<content::PepperPluginInfo>* plugins)
std::vector<std::string> codecs;
codecs.push_back(kCdmSupportedCodecVp8);
codecs.push_back(kCdmSupportedCodecVp9);
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
codecs.push_back(kCdmSupportedCodecAvc1);
#endif // defined(USE_PROPRIETARY_CODECS)
std::string codec_string =
diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri
index 8e24645f0..0ec6979c8 100644
--- a/src/core/core_chromium.pri
+++ b/src/core/core_chromium.pri
@@ -28,7 +28,7 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc
# Assume that we want mobile touch and low-end hardware behaviors
# whenever we are cross compiling.
-qtConfig(embedded): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
+qtConfig(webengine-embedded-build): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
qtConfig(egl): CONFIG += egl
@@ -186,7 +186,7 @@ HEADERS = \
web_engine_settings.h \
web_event_factory.h
-qtConfig(pepper-plugins) {
+qtConfig(webengine-pepper-plugins) {
SOURCES += \
renderer_host/pepper/pepper_flash_browser_host_qt.cpp \
@@ -203,7 +203,7 @@ qtConfig(pepper-plugins) {
renderer/pepper/pepper_renderer_host_factory_qt.h
}
-qtConfig(printing-and-pdf) {
+qtConfig(webengine-printing-and-pdf) {
SOURCES += \
printing_message_filter_qt.cpp \
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 78bb8baee..2409ccb12 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -115,7 +115,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
resources.path = $$[QT_INSTALL_DATA]/resources
INSTALLS += locales resources
- !qtConfig(system-icu) {
+ !qtConfig(webengine-system-icu) {
icu.CONFIG += no_check_exist
icu.path = $$[QT_INSTALL_DATA]/resources
INSTALLS += icu
@@ -127,7 +127,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
# Copy essential files to the qtbase build directory for non-prefix builds
#
- !qtConfig(system-icu) {
+ !qtConfig(webengine-system-icu) {
COPIES += icu
}
diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro
index a9089c569..dbf859100 100644
--- a/src/core/gn_run.pro
+++ b/src/core/gn_run.pro
@@ -5,7 +5,7 @@ TEMPLATE = aux
qtConfig(debug_and_release): CONFIG += debug_and_release build_all
-qtConfig(system-ninja) {
+qtConfig(webengine-system-ninja) {
QT_TOOL.ninja.binary = ninja
} else {
QT_TOOL.ninja.binary = $$shell_quote($$shell_path($$ninjaPath()))
@@ -35,7 +35,7 @@ build_pass|!debug_and_release {
gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\""
- !qtConfig(system-gn) {
+ !qtConfig(webengine-system-gn) {
gn_binary = $$system_quote($$system_path($$gnPath()))
}
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 0f071f89e..80c9121f5 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -291,7 +291,7 @@ public:
float GetHistoricalTouchMajor(size_t pointer_index, size_t historical_index) const override { return 0; }
float GetHistoricalX(size_t pointer_index, size_t historical_index) const override { return 0; }
float GetHistoricalY(size_t pointer_index, size_t historical_index) const override { return 0; }
- ToolType GetToolType(size_t pointer_index) const override { return ui::MotionEvent::TOOL_TYPE_UNKNOWN; }
+ ToolType GetToolType(size_t pointer_index) const override { return ui::MotionEvent::TOOL_TYPE_FINGER; }
int GetButtonState() const override { return 0; }
private:
@@ -1067,6 +1067,10 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event)
case QEvent::InputMethodQuery:
handleInputMethodQueryEvent(static_cast<QInputMethodQueryEvent*>(event));
break;
+ case QEvent::HoverLeave:
+ case QEvent::Leave:
+ m_host->ForwardMouseEvent(WebEventFactory::toWebMouseEvent(event));
+ break;
default:
return false;
}
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 83c4d719e..5980d7b84 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -262,11 +262,11 @@ public:
return true;
case media::EmeInitDataType::CENC:
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
return true;
#else
return false;
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
case media::EmeInitDataType::UNKNOWN:
return false;
@@ -277,7 +277,7 @@ public:
media::SupportedCodecs GetSupportedCodecs() const override
{
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
#else
return media::EME_CODEC_WEBM_ALL;
@@ -390,10 +390,10 @@ static void AddPepperBasedWidevine(std::vector<std::unique_ptr<media::KeySystemP
supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
supported_codecs |= media::EME_CODEC_WEBM_VP8;
supported_codecs |= media::EME_CODEC_WEBM_VP9;
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
supported_codecs |= media::EME_CODEC_MP4_AVC1;
supported_codecs |= media::EME_CODEC_MP4_AAC;
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
using Robustness = cdm::WidevineKeySystemProperties::Robustness;
concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties(
diff --git a/src/core/renderer/web_channel_ipc_transport.cpp b/src/core/renderer/web_channel_ipc_transport.cpp
index 554bda2a8..94a7baa1d 100644
--- a/src/core/renderer/web_channel_ipc_transport.cpp
+++ b/src/core/renderer/web_channel_ipc_transport.cpp
@@ -186,7 +186,7 @@ void WebChannelIPCTransport::installWebChannel(uint worldId)
void WebChannelIPCTransport::uninstallWebChannel(uint worldId)
{
- Q_ASSERT(worldId = m_installedWorldId);
+ Q_ASSERT(worldId == m_installedWorldId);
blink::WebView *webView = render_view()->GetWebView();
if (!webView)
return;
diff --git a/src/core/url_request_qrc_job_qt.cpp b/src/core/url_request_qrc_job_qt.cpp
index b4e960921..a2712653d 100644
--- a/src/core/url_request_qrc_job_qt.cpp
+++ b/src/core/url_request_qrc_job_qt.cpp
@@ -112,7 +112,7 @@ int URLRequestQrcJobQt::ReadRawData(IOBuffer *buf, int bufSize)
void URLRequestQrcJobQt::startGetHead()
{
// Get qrc file path.
- QString qrcFilePath = ':' + toQt(request_->url()).path(QUrl::RemovePath | QUrl::RemoveQuery);
+ QString qrcFilePath = ':' + toQt(request_->url()).path();
m_file.setFileName(qrcFilePath);
QFileInfo qrcFileInfo(m_file);
// Get qrc file mime type.
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index effd6e340..812a6f1c0 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -594,6 +594,8 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request)
}
d->webContents->GetController().LoadURLWithParams(params);
+ // Follow chrome::Navigate and invalidate the URL immediately.
+ d->webContentsDelegate->NavigationStateChanged(d->webContents.get(), content::INVALIDATE_TYPE_URL);
focusIfNecessary();
}
@@ -635,7 +637,7 @@ void WebContentsAdapter::save(const QString &filePath, int savePageFormat)
QUrl WebContentsAdapter::activeUrl() const
{
Q_D(const WebContentsAdapter);
- return toQt(d->webContents->GetLastCommittedURL());
+ return d->webContentsDelegate->url();
}
QUrl WebContentsAdapter::requestedUrl() const
@@ -670,7 +672,7 @@ QUrl WebContentsAdapter::iconUrl() const
QString WebContentsAdapter::pageTitle() const
{
Q_D(const WebContentsAdapter);
- return toQt(d->webContents->GetTitle());
+ return d->webContentsDelegate->title();
}
QString WebContentsAdapter::selectedText() const
@@ -1463,6 +1465,12 @@ void WebContentsAdapter::focusIfNecessary()
d->webContents->Focus();
}
+bool WebContentsAdapter::isFindTextInProgress() const
+{
+ Q_D(const WebContentsAdapter);
+ return d->lastFindRequestId != d->webContentsDelegate->lastReceivedFindReply();
+}
+
WebContentsAdapterClient::RenderProcessTerminationStatus
WebContentsAdapterClient::renderProcessExitStatus(int terminationStatus) {
auto status = WebContentsAdapterClient::RenderProcessTerminationStatus(-1);
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index 67fcbe7af..51fd2891d 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -184,6 +184,7 @@ public:
void viewSource();
bool canViewSource();
void focusIfNecessary();
+ bool isFindTextInProgress() const;
private:
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index f35620c86..96c7c4c41 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -131,10 +131,21 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents
void WebContentsDelegateQt::NavigationStateChanged(content::WebContents* source, content::InvalidateTypes changed_flags)
{
- if (changed_flags & content::INVALIDATE_TYPE_URL)
- m_viewClient->urlChanged(toQt(source->GetVisibleURL()));
- if (changed_flags & content::INVALIDATE_TYPE_TITLE)
- m_viewClient->titleChanged(toQt(source->GetTitle()));
+ if (changed_flags & content::INVALIDATE_TYPE_URL) {
+ QUrl newUrl = toQt(source->GetVisibleURL());
+ if (m_url != newUrl) {
+ m_url = newUrl;
+ m_viewClient->urlChanged(m_url);
+ }
+ }
+
+ if (changed_flags & content::INVALIDATE_TYPE_TITLE) {
+ QString newTitle = toQt(source->GetTitle());
+ if (m_title != newTitle) {
+ m_title = newTitle;
+ m_viewClient->titleChanged(m_title);
+ }
+ }
// NavigationStateChanged gets called with INVALIDATE_TYPE_TAB by AudioStateProvider::Notify,
// whenever an audio sound gets played or stopped, this is the only way to actually figure out
@@ -146,20 +157,6 @@ void WebContentsDelegateQt::NavigationStateChanged(content::WebContents* source,
}
}
-bool WebContentsDelegateQt::ShouldPreserveAbortedURLs(content::WebContents *source)
-{
- Q_UNUSED(source)
-
- // Allow failed URLs to stick around in the URL bar, but only when the error-page is enabled.
- WebEngineSettings *settings = m_viewClient->webEngineSettings();
- bool isErrorPageEnabled = settings->testAttribute(settings->Attribute::ErrorPageEnabled);
-
- if (isErrorPageEnabled)
- return true;
-
- return false;
-}
-
void WebContentsDelegateQt::AddNewContents(content::WebContents* source, content::WebContents* new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture, bool* was_blocked)
{
Q_UNUSED(source)
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 44fb93093..8440ec053 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -97,6 +97,9 @@ public:
void setLastSearchedString(const QString &s) { m_lastSearchedString = s; }
int lastReceivedFindReply() const { return m_lastReceivedFindReply; }
+ QUrl url() const { return m_url; }
+ QString title() const { return m_title; }
+
// WebContentsDelegate overrides
content::WebContents *OpenURLFromTab(content::WebContents *source, const content::OpenURLParams &params) override;
void NavigationStateChanged(content::WebContents* source, content::InvalidateTypes changed_flags) override;
@@ -119,7 +122,6 @@ public:
bool IsPopupOrPanel(const content::WebContents *source) const override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
void RequestToLockMouse(content::WebContents *web_contents, bool user_gesture, bool last_unlocked_by_target) override;
- bool ShouldPreserveAbortedURLs(content::WebContents *source) override;
void ShowValidationMessage(content::WebContents *web_contents, const gfx::Rect &anchor_in_root_view, const base::string16 &main_text, const base::string16 &sub_text) override;
void HideValidationMessage(content::WebContents *web_contents) override;
void MoveValidationMessage(content::WebContents *web_contents, const gfx::Rect &anchor_in_root_view) override;
@@ -165,6 +167,9 @@ private:
QSharedPointer<FilePickerController> m_filePickerController;
QUrl m_initialTargetUrl;
int m_lastLoadProgress;
+
+ QUrl m_url;
+ QString m_title;
};
} // namespace QtWebEngineCore
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 8c997335c..3193f885a 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -1019,12 +1019,14 @@ static ui::DomKey getDomKeyFromQKeyEvent(QKeyEvent *ev)
}
}
-static inline double currentTimeForEvent(const QInputEvent* event)
+static inline double currentTimeForEvent(const QEvent *event)
{
Q_ASSERT(event);
- if (event->timestamp())
- return static_cast<double>(event->timestamp()) / 1000;
+ if (const QInputEvent *inputEvent = static_cast<const QInputEvent *>(event)) {
+ if (inputEvent->timestamp())
+ return static_cast<double>(inputEvent->timestamp()) / 1000;
+ }
static QElapsedTimer timer;
if (!timer.isValid())
@@ -1190,6 +1192,7 @@ WebMouseEvent WebEventFactory::toWebMouseEvent(QMouseEvent *ev, double dpiScale)
webKitEvent.button = mouseButtonForEvent(ev);
webKitEvent.click_count = 0;
+ webKitEvent.pointer_type = WebPointerProperties::PointerType::kMouse;
return webKitEvent;
}
@@ -1204,7 +1207,18 @@ WebMouseEvent WebEventFactory::toWebMouseEvent(QHoverEvent *ev, double dpiScale)
webKitEvent.SetPositionInWidget(ev->pos().x() / dpiScale, ev->pos().y() / dpiScale);
webKitEvent.movement_x = ev->pos().x() - ev->oldPos().x();
webKitEvent.movement_y = ev->pos().y() - ev->oldPos().y();
+ webKitEvent.pointer_type = WebPointerProperties::PointerType::kMouse;
+
+ return webKitEvent;
+}
+WebMouseEvent WebEventFactory::toWebMouseEvent(QEvent *ev)
+{
+ Q_ASSERT(ev->type() == QEvent::Leave || ev->type() == QEvent::HoverLeave);
+
+ WebMouseEvent webKitEvent;
+ webKitEvent.SetTimeStampSeconds(currentTimeForEvent(ev));
+ webKitEvent.SetType(WebInputEvent::kMouseLeave);
return webKitEvent;
}
diff --git a/src/core/web_event_factory.h b/src/core/web_event_factory.h
index f4ce417cd..5b8f08968 100644
--- a/src/core/web_event_factory.h
+++ b/src/core/web_event_factory.h
@@ -50,6 +50,7 @@
#include <QtGlobal>
QT_BEGIN_NAMESPACE
+class QEvent;
class QHoverEvent;
class QKeyEvent;
class QMouseEvent;
@@ -64,6 +65,7 @@ class WebEventFactory {
public:
static blink::WebMouseEvent toWebMouseEvent(QMouseEvent*, double dpiScale);
static blink::WebMouseEvent toWebMouseEvent(QHoverEvent*, double dpiScale);
+ static blink::WebMouseEvent toWebMouseEvent(QEvent *);
#ifndef QT_NO_GESTURES
static blink::WebGestureEvent toWebGestureEvent(QNativeGestureEvent *, double dpiScale);
#endif