1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Properly fixed opening popup windows for QtWebKit 2.3

The workaround is now only used for QtWebKit 2.3 and
it checks only for x, widht and height in QRect
This commit is contained in:
nowrep 2013-01-21 22:11:46 +01:00
parent 743c402603
commit 01f07a4a2a

View File

@ -57,10 +57,15 @@ PopupWebPage::PopupWebPage(QWebPage::WebWindowType type, QupZilla* mainClass)
void PopupWebPage::slotGeometryChangeRequested(const QRect &rect)
{
/* Very ugly hack for QtWebKit 2.3
* It now sends QRect(0, 25, 100x100) if the popup window
* It now sends QRect(0, y, 100x100) if the popup window
* geometry was not set in window.open call.
*/
if (rect.isValid() && rect != QRect(0, 25, 100, 100)) {
if (rect.isValid()
#if QTWEBKIT_FROM_2_3
&& rect.size() != QSize(100, 100) && rect.y() != 0
#endif
) {
m_geometry = rect;
m_createNewWindow = true;
}