[Webkit-unassigned] [Bug 25585] [Qt] Webkit in Qt does not have window.showModalDialog
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 9 07:58:06 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=25585
Yael <yael.aharon at nokia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #48412|review+, commit-queue? |
Flag| |
--- Comment #9 from Yael <yael.aharon at nokia.com> 2010-02-09 07:58:05 PST ---
(From update of attachment 48412)
> Index: WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
> ===================================================================
> --- WebKit/qt/WebCoreSupport/ChromeClientQt.cpp (revision 54545)
> +++ WebKit/qt/WebCoreSupport/ChromeClientQt.cpp (working copy)
> @@ -44,6 +44,7 @@
> #include "SecurityOrigin.h"
>
> #include <qdebug.h>
> +#include <qeventloop.h>
> #include <qtextdocument.h>
> #include <qtooltip.h>
>
> @@ -62,13 +63,15 @@
>
> 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 @@
>
> 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;
> }
>
>
> Index: WebKit/qt/WebCoreSupport/ChromeClientQt.h
> ===================================================================
> --- WebKit/qt/WebCoreSupport/ChromeClientQt.h (revision 54545)
> +++ WebKit/qt/WebCoreSupport/ChromeClientQt.h (working copy)
> @@ -34,6 +34,7 @@
> #include "KURL.h"
> #include "PlatformString.h"
>
> +class QEventLoop;
> class QWebPage;
>
> namespace WebCore {
> @@ -158,6 +159,7 @@
> bool toolBarsVisible;
> bool statusBarVisible;
> bool menuBarVisible;
> + QEventLoop* m_eventLoop;
> };
> }
>
> Index: WebKit/qt/ChangeLog
> ===================================================================
> --- WebKit/qt/ChangeLog (revision 54547)
> +++ WebKit/qt/ChangeLog (working copy)
> @@ -1,3 +1,22 @@
> +2010-02-09 Yael Aharon <yael.aharon at nokia.com>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + [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.
> Index: WebKit/qt/Api/qwebpage.cpp
> ===================================================================
> --- WebKit/qt/Api/qwebpage.cpp (revision 54545)
> +++ WebKit/qt/Api/qwebpage.cpp (working copy)
> @@ -1955,6 +1955,8 @@
> 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 should call setWindowModality(Qt::ApplicationModal) on the new window.
> +
> \sa acceptNavigationRequest()
> */
> QWebPage *QWebPage::createWindow(WebWindowType type)
> Index: WebKitTools/ChangeLog
> ===================================================================
> --- WebKitTools/ChangeLog (revision 54547)
> +++ WebKitTools/ChangeLog (working copy)
> @@ -1,3 +1,15 @@
> +2010-02-09 Yael Aharon <yael.aharon at nokia.com>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + [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 Chang Shu <Chang.Shu at nokia.com>
>
> Reviewed by Laszlo Gombos.
> Index: WebKitTools/QtLauncher/main.cpp
> ===================================================================
> --- WebKitTools/QtLauncher/main.cpp (revision 54545)
> +++ WebKitTools/QtLauncher/main.cpp (working copy)
> @@ -520,9 +520,11 @@
> #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();
> }
Clearing flags.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list