Commit 15f9de1d authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent aa14bb16
......@@ -134,7 +134,7 @@ void MailWebEngineView::selectAll()
void MailWebEngineView::slotZoomChanged(qreal zoom)
{
setZoomFactor(zoom*100);
setZoomFactor(zoom * 100);
}
void MailWebEngineView::scamCheck()
......
......@@ -18,7 +18,6 @@
#include "testwebengineaccesskey.h"
#include "../mailwebengineview.h"
#include "messageviewer/messageviewersettings.h"
#include <QApplication>
#include <QHBoxLayout>
......
......@@ -162,7 +162,7 @@ void TestScriptWidget::fillScriptCombo(QComboBox *scriptCombo)
scriptCombo->addItem(QStringLiteral("scroll up"), WebEngineViewer::WebEngineScript::scrollUp(0));
scriptCombo->addItem(QStringLiteral("scroll percentage"), WebEngineViewer::WebEngineScript::scrollPercentage(0));
scriptCombo->addItem(QStringLiteral("clear selection"), WebEngineViewer::WebEngineScript::clearSelection());
#if 0
#if 0
WebEngineViewer::WebEngineScript::setElementByIdVisible(const QString & elementStr, bool visibility);
WebEngineViewer::WebEngineScript::setStyleToElement(const QString & elementStr, const QString & style);
WebEngineViewer::WebEngineScript::scrollToRelativePosition(int pos);
......
......@@ -126,11 +126,11 @@ QString WebEngineScript::searchElementPosition(const QString &elementStr)
QString WebEngineScript::scrollPercentage(int percent)
{
const QString source = QString::fromLatin1("var current = document.body.scrollTop;"
"var body = document.body;"
"html = document.documentElement;"
"var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );"
"var newPosition = current + height * %1 /100;"
"window.scrollTo(window.scrollX, newPosition); [window.scrollX, window.scrollY];").arg(percent);
"var body = document.body;"
"html = document.documentElement;"
"var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );"
"var newPosition = current + height * %1 /100;"
"window.scrollTo(window.scrollX, newPosition); [window.scrollX, window.scrollY];").arg(percent);
qDebug() << "QString WebEngineScript::scrollPercentage(int percent) " << source;
return source;
......
......@@ -35,7 +35,6 @@ protected:
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) Q_DECL_OVERRIDE;
virtual void forwardWheelEvent(QWheelEvent *event);
virtual void forwardKeyPressEvent(QKeyEvent *event);
virtual void forwardKeyReleaseEvent(QKeyEvent *event);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment