[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
yael.aharon at nokia.com
yael.aharon at nokia.com
Fri Feb 26 22:15:56 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 553d5d2b355c7bbdfbd051f1e71c70eb75cea1fb
Author: yael.aharon at nokia.com <yael.aharon at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 9 15:55:06 2010 +0000
[Qt] Webkit in Qt does not have window.showModalDialog
https://bugs.webkit.org/show_bug.cgi?id=25585
Reviewed by Kenneth Rohde Christiansen.
WebKit/qt:
Create a new eventloop when runModal() is called.
Added comemnt in QWebPage::createWindow that the application is responsible
for setting the modality of the appropriate window.
* Api/qwebpage.cpp:
* WebCoreSupport/ChromeClientQt.cpp:
* WebCoreSupport/ChromeClientQt.h:
WebKitTools:
Set the modality flag when createWindow is called with window type WebWindowDialog.
* QtLauncher/main.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index b8be7e7..f661918 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -1955,6 +1955,8 @@ bool QWebPage::shouldInterruptJavaScript()
If the view associated with the web page is a QWebView object, then the default implementation forwards
the request to QWebView's createWindow() function; otherwise it returns a null pointer.
+ If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window.
+
\sa acceptNavigationRequest()
*/
QWebPage *QWebPage::createWindow(WebWindowType type)
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index e3fb86d..48856a5 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,22 @@
+2010-02-09 Yael Aharon <yael.aharon at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Webkit in Qt does not have window.showModalDialog
+ https://bugs.webkit.org/show_bug.cgi?id=25585
+
+ Create a new eventloop when runModal() is called.
+ Added comemnt in QWebPage::createWindow that the application is responsible
+ for setting the modality of the appropriate window.
+
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::ChromeClientQt):
+ (WebCore::ChromeClientQt::~ChromeClientQt):
+ (WebCore::ChromeClientQt::canRunModal):
+ (WebCore::ChromeClientQt::runModal):
+ * WebCoreSupport/ChromeClientQt.h:
+
2010-01-19 Kenneth Rohde Christiansen <kenneth at webkit.org>
Reviewed by Dave Hyatt.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index f1e6a86..893a1b7 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -44,6 +44,7 @@
#include "SecurityOrigin.h"
#include <qdebug.h>
+#include <qeventloop.h>
#include <qtextdocument.h>
#include <qtooltip.h>
@@ -62,13 +63,15 @@ namespace WebCore {
ChromeClientQt::ChromeClientQt(QWebPage* webPage)
: m_webPage(webPage)
+ , m_eventLoop(0)
{
toolBarsVisible = statusBarVisible = menuBarVisible = true;
}
ChromeClientQt::~ChromeClientQt()
{
-
+ if (m_eventLoop)
+ m_eventLoop->exit();
}
void ChromeClientQt::setWindowRect(const FloatRect& rect)
@@ -173,14 +176,16 @@ void ChromeClientQt::show()
bool ChromeClientQt::canRunModal()
{
- notImplemented();
- return false;
+ return true;
}
void ChromeClientQt::runModal()
{
- notImplemented();
+ m_eventLoop = new QEventLoop();
+ QEventLoop* eventLoop = m_eventLoop;
+ m_eventLoop->exec();
+ delete eventLoop;
}
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 7699349..6b3017d 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -34,6 +34,7 @@
#include "KURL.h"
#include "PlatformString.h"
+class QEventLoop;
class QWebPage;
namespace WebCore {
@@ -158,6 +159,7 @@ namespace WebCore {
bool toolBarsVisible;
bool statusBarVisible;
bool menuBarVisible;
+ QEventLoop* m_eventLoop;
};
}
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 6cc6d1e..3fefbba 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-09 Yael Aharon <yael.aharon at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Webkit in Qt does not have window.showModalDialog
+ https://bugs.webkit.org/show_bug.cgi?id=25585
+
+ Set the modality flag when createWindow is called with window type WebWindowDialog.
+
+ * QtLauncher/main.cpp:
+ (WebPage::createWindow):
+
2010-02-09 Andras Becsi <abecsi at webkit.org>
Unreviewed trivial warning fix.
diff --git a/WebKitTools/QtLauncher/main.cpp b/WebKitTools/QtLauncher/main.cpp
index c8e6a66..b8c81bf 100644
--- a/WebKitTools/QtLauncher/main.cpp
+++ b/WebKitTools/QtLauncher/main.cpp
@@ -520,9 +520,11 @@ void LauncherWindow::setupUI()
#endif
}
-QWebPage* WebPage::createWindow(QWebPage::WebWindowType)
+QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
{
LauncherWindow* mw = new LauncherWindow;
+ if (type == WebModalDialog)
+ mw->setWindowModality(Qt::ApplicationModal);
mw->show();
return mw->page();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list