Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Commit c0cfa03

Browse files
Peter van der TakAshish Kulkarni
authored andcommitted
Implement QWebPage::setDevicePixelRatio to allow wkhtmltopdf to set the device pixel ratio.
1 parent f9a0480 commit c0cfa03

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,6 +3215,11 @@ bool QWebPage::isContentEditable() const
32153215
return d->page->isEditable();
32163216
}
32173217

3218+
void QWebPage::setDevicePixelRatio(qreal devicePixelRatio)
3219+
{
3220+
d->pixelRatio = devicePixelRatio;
3221+
}
3222+
32183223
/*!
32193224
\property QWebPage::forwardUnsupportedContent
32203225
\brief whether QWebPage should forward unsupported content

src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ class QWEBKIT_EXPORT QWebPage : public QObject {
308308
void setContentEditable(bool editable);
309309
bool isContentEditable() const;
310310

311+
void setDevicePixelRatio(qreal devicePixelRatio);
312+
311313
#ifndef QT_NO_CONTEXTMENU
312314
bool swallowContextMenuEvent(QContextMenuEvent *event);
313315
#endif

0 commit comments

Comments
 (0)