Commit c597b150 authored by Laurent Montel's avatar Laurent Montel 😁

Create new lib

parent 964ded9a
......@@ -116,6 +116,9 @@ add_subdirectory(templateparser)
add_subdirectory(messagecomposer)
add_subdirectory(messagecore)
add_subdirectory(messagelist)
if (QTWEBENGINE_SUPPORT_OPTION)
add_subdirectory(webengineviewer)
endif()
install( FILES messagelib.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
project(WebEngineViewer)
ecm_setup_version(${MESSAGELIB_LIB_VERSION} VARIABLE_PREFIX WEBENGINEVIEWER
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/webengineviewer_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5WebEngineViewerConfigVersion.cmake"
SOVERSION 5
)
########### Targets ###########
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5WebEngineViewer")
ecm_configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5WebEngineViewerConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5WebEngineViewerConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5WebEngineViewerConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5WebEngineViewerConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(EXPORT KF5WebEngineViewerTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5WebEngineViewerTargets.cmake NAMESPACE KF5::)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/webengineviewer_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
add_subdirectory(src)
@PACKAGE_INIT@
find_dependency(Qt5::WebEngineWidgets "5.6")
include("${CMAKE_CURRENT_LIST_DIR}/KF5MessageViewerTargets.cmake")
add_definitions(-DTRANSLATION_DOMAIN=\"libwebengineviewer\")
if(BUILD_TESTING)
#add_subdirectory(tests)
#add_subdirectory(autotests)
#add_subdirectory(webengineaccesskey/autotests)
endif()
set(libwebengineviewer_webengine_SRCS
networkmanager/networkaccessmanagerwebengine.cpp
urlinterceptor/networkurlinterceptor.cpp
urlinterceptor/networkpluginurlinterceptorinterface.cpp
urlinterceptor/networkurlinterceptorpluginmanager.cpp
urlinterceptor/networkpluginurlinterceptor.cpp
urlinterceptor/networkurlinterceptormanager.cpp
urlinterceptor/networkpluginurlinterceptorconfigurewidget.cpp
webhittestresult.cpp
webhittest.cpp
webenginepage.cpp
webenginescript.cpp
webengineview.cpp
webengineaccesskey/webengineaccesskey.cpp
webengineaccesskey/webengineaccesskeyanchor.cpp
webengineaccesskey/webengineaccesskeyutils.cpp
)
set(libmessageviewer_web_LIB Qt5::WebEngineWidgets )
set(libwebengineviewer_SRCS
${libwebengineviewer_webengine_SRCS}
)
ecm_qt_declare_logging_category(libwebengineviewer_webengine_SRCS HEADER webengineviewer_debug.h IDENTIFIER WEBENGINEVIEWER_LOG CATEGORY_NAME log_webengineviewer)
add_library(KF5WebEngineViewer ${libwebengineviewer_webengine_SRCS})
generate_export_header(KF5WebEngineViewer BASE_NAME webengineviewer)
add_library(KF5::WebEngineViewer ALIAS KF5WebEngineViewer)
target_include_directories(KF5WebEngineViewer INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/WebEngineViewer/;${KDE_INSTALL_INCLUDEDIR_KF5}/webengineviewer>")
target_include_directories(KF5WebEngineViewer PUBLIC "$<BUILD_INTERFACE:${WebEngineViewer_SOURCE_DIR}/src;${WebEngineViewer_BINARY_DIR}/src;>")
target_link_libraries(KF5WebEngineViewer
PUBLIC
Qt5::WebEngineWidgets
PRIVATE
KF5::CoreAddons
KF5::XmlGui
)
set_target_properties(KF5WebEngineViewer PROPERTIES
VERSION ${WEBENGINEVIEWER_VERSION_STRING}
SOVERSION ${WEBENGINEVIEWER_SOVERSION}
EXPORT_NAME WebEngineViewer
)
install(TARGETS
KF5WebEngineViewer
EXPORT KF5WebEngineViewerTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
)
ecm_generate_headers(WebEngineViewer_Camelcasewebengine_accesskey_HEADERS
HEADER_NAMES
WebEngineAccessKey
REQUIRED_HEADERS WebEngineViewer_webengine_accesskey_HEADERS
PREFIX WebEngineViewer
RELATIVE webengineaccesskey
)
ecm_generate_headers(WebEngineViewer_Camelcasewebengine_urlinterceptor_HEADERS
HEADER_NAMES
NetworkUrlInterceptorPluginManager
NetworkUrlInterceptor
NetworkPluginUrlInterceptorInterface
NetworkPluginUrlInterceptor
NetworkPluginUrlInterceptorConfigureWidget
REQUIRED_HEADERS WebEngineViewer_webengine_urlinterceptor_HEADERS
PREFIX WebEngineViewer
RELATIVE urlinterceptor
)
ecm_generate_headers(WebEngineViewer_Camelcasewebengine_manager_HEADERS
HEADER_NAMES
NetworkAccessManagerWebEngine
REQUIRED_HEADERS WebEngineViewer_webengine_manager_HEADERS
PREFIX WebEngineViewer
RELATIVE networkmanager
)
ecm_generate_headers(WebEngineViewer_Camelcasewebengine_misc_HEADERS
HEADER_NAMES
WebHitTestResult
WebEnginePage
WebEngineView
WebHitTest
WebEngineScript
REQUIRED_HEADERS WebEngineViewer_webengine_misc_HEADERS
PREFIX WebEngineViewer
RELATIVE
)
ecm_generate_pri_file(BASE_NAME WebEngineViewer
LIB_NAME KF5WebEngineViewer
DEPS "" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/WebEngineViewer
)
install(FILES
${WebEngineViewer_Camelcasewebengine_accesskey_HEADERS}
${WebEngineViewer_Camelcasewebengine_urlinterceptor_HEADERS}
${WebEngineViewer_Camelcasewebengine_manager_HEADERS}
${WebEngineViewer_Camelcasewebengine_misc_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/WebEngineViewer
COMPONENT Devel
)
install(FILES
${WebEngineViewer_webengine_accesskey_HEADERS}
${WebEngineViewer_webengine_urlinterceptor_HEADERS}
${WebEngineViewer_webengine_manager_HEADERS}
${WebEngineViewer_webengine_misc_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/webengineviewer_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/webengineviewer
COMPONENT Devel
)
install(FILES
${PRI_FILENAME}
DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
ecm_add_test(webhittestresulttest.cpp ../webhittestresult.cpp
TEST_NAME webhittestresulttest
NAME_PREFIX "messageviewer-webengine-"
LINK_LIBRARIES Qt5::Test KF5::MessageViewer
)
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "webhittestresulttest.h"
#include "../webhittestresult.h"
#include <QTest>
WebHitTestResultTest::WebHitTestResultTest(QObject *parent)
: QObject(parent)
{
}
WebHitTestResultTest::~WebHitTestResultTest()
{
}
void WebHitTestResultTest::shouldHaveDefaultValues()
{
WebEngineViewer::WebHitTestResult result;
QVERIFY(result.alternateText().isEmpty());
QVERIFY(result.boundingRect().isNull());
QVERIFY(!result.imageUrl().isValid());
QVERIFY(!result.isContentEditable());
QVERIFY(!result.isContentSelected());
QVERIFY(result.isNull());
QVERIFY(result.linkTitle().isEmpty());
QVERIFY(!result.linkUrl().isValid());
QVERIFY(!result.mediaUrl().isValid());
QVERIFY(!result.mediaPaused());
QVERIFY(!result.mediaMuted());
QVERIFY(result.pos().isNull());
QVERIFY(result.tagName().isEmpty());
QVERIFY(!result.pageUrl().isValid());
}
void WebHitTestResultTest::shouldAssignPosAndUrl()
{
QPoint pos(5, 5);
QUrl url(QStringLiteral("http://www.kde.org"));
WebEngineViewer::WebHitTestResult result(pos, url, QVariant());
QVERIFY(result.alternateText().isEmpty());
QVERIFY(result.boundingRect().isNull());
QVERIFY(!result.imageUrl().isValid());
QVERIFY(!result.isContentEditable());
QVERIFY(!result.isContentSelected());
QVERIFY(result.isNull());
QVERIFY(result.linkTitle().isEmpty());
QVERIFY(!result.mediaUrl().isValid());
QVERIFY(!result.mediaPaused());
QVERIFY(!result.mediaMuted());
QVERIFY(result.tagName().isEmpty());
QVERIFY(!result.linkUrl().isValid());
QCOMPARE(result.pageUrl(), url);
QCOMPARE(result.pos(), pos);
}
void WebHitTestResultTest::shouldAssignFromQVariant()
{
QPoint pos(5, 5);
QUrl pageUrl(QStringLiteral("http://www.kde.org"));
QVariantMap map;
QString alternateText = QStringLiteral("FOO");
map.insert(QStringLiteral("alternateText"), alternateText);
bool contentEditable = true;
map.insert(QStringLiteral("contentEditable"), contentEditable);
bool contentSelected = true;
map.insert(QStringLiteral("contentSelected"), contentSelected);
QString linkTitle = QStringLiteral("GGGG");
map.insert(QStringLiteral("linkTitle"), linkTitle);
QUrl imageUrl(QStringLiteral("https://www.foo.net"));
map.insert(QStringLiteral("imageUrl"), imageUrl);
QUrl linkUrl(QStringLiteral("https://www.linux.org"));
map.insert(QStringLiteral("linkUrl"), linkUrl);
QUrl mediaUrl(QStringLiteral("https://www.media.org"));
map.insert(QStringLiteral("mediaUrl"), mediaUrl);
bool mediaPaused = true;
map.insert(QStringLiteral("mediaPaused"), mediaPaused);
bool mediaMuted = true;
map.insert(QStringLiteral("mediaMuted"), mediaMuted);
QString tagName = QStringLiteral("HHHHHH");
map.insert(QStringLiteral("tagName"), tagName);
QRect boundingRect(5, 7, 9, 11);
QVariantList lstRect;
lstRect << boundingRect.left() << boundingRect.top() << boundingRect.width() << boundingRect.height();
map.insert(QStringLiteral("boundingRect"), lstRect);
WebEngineViewer::WebHitTestResult result(pos, pageUrl, map);
QCOMPARE(result.alternateText(), alternateText);
QCOMPARE(result.boundingRect(), boundingRect);
QCOMPARE(result.imageUrl(), imageUrl);
QCOMPARE(result.isContentEditable(), contentEditable);
QCOMPARE(result.isContentSelected(), contentSelected);
QCOMPARE(result.isNull(), false);
QCOMPARE(result.linkTitle(), linkTitle);
QCOMPARE(result.linkUrl(), linkUrl);
QCOMPARE(result.mediaUrl(), mediaUrl);
QCOMPARE(result.mediaPaused(), mediaPaused);
QCOMPARE(result.mediaMuted(), mediaMuted);
QCOMPARE(result.pos(), pos);
QCOMPARE(result.tagName(), tagName);
QCOMPARE(result.pageUrl(), pageUrl);
}
void WebHitTestResultTest::shouldCopyWebHitTestResult()
{
QPoint pos(5, 5);
QUrl pageUrl(QStringLiteral("http://www.kde.org"));
QVariantMap map;
QString alternateText = QStringLiteral("FOO");
map.insert(QStringLiteral("alternateText"), alternateText);
bool contentEditable = true;
map.insert(QStringLiteral("contentEditable"), contentEditable);
bool contentSelected = true;
map.insert(QStringLiteral("contentSelected"), contentSelected);
QString linkTitle = QStringLiteral("GGGG");
map.insert(QStringLiteral("linkTitle"), linkTitle);
QUrl imageUrl(QStringLiteral("https://www.foo.net"));
map.insert(QStringLiteral("imageUrl"), imageUrl);
QUrl linkUrl(QStringLiteral("https://www.linux.org"));
map.insert(QStringLiteral("linkUrl"), linkUrl);
QUrl mediaUrl(QStringLiteral("https://www.media.org"));
map.insert(QStringLiteral("mediaUrl"), mediaUrl);
bool mediaPaused = true;
map.insert(QStringLiteral("mediaPaused"), mediaPaused);
bool mediaMuted = true;
map.insert(QStringLiteral("mediaMuted"), mediaMuted);
QString tagName = QStringLiteral("HHHHHH");
map.insert(QStringLiteral("tagName"), tagName);
QRect boundingRect(5, 7, 9, 11);
QVariantList lstRect;
lstRect << boundingRect.left() << boundingRect.top() << boundingRect.width() << boundingRect.height();
map.insert(QStringLiteral("boundingRect"), lstRect);
const WebEngineViewer::WebHitTestResult result1(pos, pageUrl, map);
WebEngineViewer::WebHitTestResult result = result1;
QCOMPARE(result.alternateText(), alternateText);
QCOMPARE(result.boundingRect(), boundingRect);
QCOMPARE(result.imageUrl(), imageUrl);
QCOMPARE(result.isContentEditable(), contentEditable);
QCOMPARE(result.isContentSelected(), contentSelected);
QCOMPARE(result.isNull(), false);
QCOMPARE(result.linkTitle(), linkTitle);
QCOMPARE(result.linkUrl(), linkUrl);
QCOMPARE(result.mediaUrl(), mediaUrl);
QCOMPARE(result.mediaPaused(), mediaPaused);
QCOMPARE(result.mediaMuted(), mediaMuted);
QCOMPARE(result.pos(), pos);
QCOMPARE(result.tagName(), tagName);
QCOMPARE(result.pageUrl(), pageUrl);
}
QTEST_MAIN(WebHitTestResultTest)
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WEBHITTESTRESULTTEST_H
#define WEBHITTESTRESULTTEST_H
#include <QObject>
class WebHitTestResultTest : public QObject
{
Q_OBJECT
public:
explicit WebHitTestResultTest(QObject *parent = Q_NULLPTR);
~WebHitTestResultTest();
private Q_SLOTS:
void shouldHaveDefaultValues();
void shouldAssignPosAndUrl();
void shouldAssignFromQVariant();
void shouldCopyWebHitTestResult();
};
#endif // WEBHITTESTRESULTTEST_H
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "networkaccessmanagerwebengine.h"
#include "urlinterceptor/networkurlinterceptormanager.h"
#include "urlinterceptor/networkurlinterceptor.h"
#include <QWebEngineProfile>
#include <QWebEngineView>
#include <WebEngineViewer/NetworkPluginUrlInterceptorInterface>
using namespace WebEngineViewer;
class WebEngineViewer::NetworkAccessManagerWebEnginePrivate
{
public:
NetworkAccessManagerWebEnginePrivate()
: mManager(Q_NULLPTR),
mNetworkUrlInterceptor(Q_NULLPTR)
{
}
WebEngineViewer::NetworkUrlInterceptorManager *mManager;
WebEngineViewer::NetworkUrlInterceptor *mNetworkUrlInterceptor;
};
NetworkAccessManagerWebEngine::NetworkAccessManagerWebEngine(QWebEngineView *webEngine, KActionCollection *ac, QObject *parent)
: QNetworkAccessManager(parent),
d(new NetworkAccessManagerWebEnginePrivate)
{
d->mManager = new WebEngineViewer::NetworkUrlInterceptorManager(webEngine, ac, this);
// Add interceptor.
d->mNetworkUrlInterceptor = new WebEngineViewer::NetworkUrlInterceptor(this);
Q_FOREACH (WebEngineViewer::NetworkPluginUrlInterceptorInterface *interface, d->mManager->interfaceList()) {
d->mNetworkUrlInterceptor->addInterceptor(interface);
}
QWebEngineProfile::defaultProfile()->setRequestInterceptor(d->mNetworkUrlInterceptor);
}
NetworkAccessManagerWebEngine::~NetworkAccessManagerWebEngine()
{
delete d;
}
void NetworkAccessManagerWebEngine::addInterceptor(WebEngineViewer::NetworkPluginUrlInterceptorInterface *interceptor)
{
d->mNetworkUrlInterceptor->addInterceptor(interceptor);
}
QList<QAction *> NetworkAccessManagerWebEngine::interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const
{
QList<QAction *> actions;
Q_FOREACH (WebEngineViewer::NetworkPluginUrlInterceptorInterface *interface, d->mManager->interfaceList()) {
actions.append(interface->interceptorUrlActions(result));
}
return actions;
}
QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> NetworkAccessManagerWebEngine::configureInterceptorList(QWidget *parent) const
{
return d->mManager->configureInterceptorList(parent);
}
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MAILNETWORKACCESSMANAGER_H
#define MAILNETWORKACCESSMANAGER_H
#include <QNetworkAccessManager>
#include "webengineviewer_export.h"
#include "urlinterceptor/networkpluginurlinterceptor.h"
class KActionCollection;
class QWebEngineView;
class QAction;
namespace WebEngineViewer
{
class WebHitTestResult;
class NetworkPluginUrlInterceptorInterface;
class NetworkAccessManagerWebEnginePrivate;
class NetworkPluginUrlInterceptorConfigureWidget;
class WEBENGINEVIEWER_EXPORT NetworkAccessManagerWebEngine : public QNetworkAccessManager
{
Q_OBJECT
public:
explicit NetworkAccessManagerWebEngine(QWebEngineView *webEngine, KActionCollection *ac, QObject *parent = Q_NULLPTR);
~NetworkAccessManagerWebEngine();
void addInterceptor(WebEngineViewer::NetworkPluginUrlInterceptorInterface *interceptor);
QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
QVector<WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent = Q_NULLPTR) const;
private:
NetworkAccessManagerWebEnginePrivate *const d;
};
}
#endif // MAILNETWORKACCESSMANAGER_H
set(webengine_test_SRCS
testwebengine.cpp
)
add_executable(webenginetest ${webengine_test_SRCS})
target_link_libraries(webenginetest
Qt5::Widgets KF5::MessageViewer Qt5::WebEngine Qt5::WebEngineWidgets
)
#####
set(webenginescript_test_SRCS
testwebenginescript.cpp
)
add_executable(webenginescripttest ${webenginescript_test_SRCS})
target_link_libraries(webenginescripttest
Qt5::Widgets KF5::MessageViewer Qt5::WebEngine Qt5::WebEngineWidgets
)
######
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
set(webengineaccesskey_test_SRCS
testwebengineaccesskey.cpp
)
add_executable(webengineaccesskeytest ${webengineaccesskey_test_SRCS})
target_link_libraries(webengineaccesskeytest
Qt5::Widgets KF5::MessageViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::WebKit Qt5::WebKitWidgets
)
endif()
####
set(scrolladdattachment_test_SRCS
testwebenginescrolladdattachment.cpp
)
add_executable(scrolladdattachmenttest ${scrolladdattachment_test_SRCS})
target_link_libraries(scrolladdattachmenttest
Qt5::Widgets KF5::MessageViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes
)
####
set(testmailwebengine_test_SRCS
testmailwebengine.cpp
)
add_executable(testmailwebengine ${testmailwebengine_test_SRCS})
target_link_libraries(testmailwebengine
Qt5::Widgets KF5::MessageViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes
)
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "testmailwebengine.h"
#include "webenginescript.h"