Changeset 54550 in webkit


Ignore:
Timestamp:
Feb 9, 2010 7:55:06 AM (14 years ago)
Author:
yael.aharon@nokia.com
Message:

[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:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r54440 r54550  
    19561956    the request to QWebView's createWindow() function; otherwise it returns a null pointer.
    19571957
     1958    If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window.
     1959
    19581960    \sa acceptNavigationRequest()
    19591961*/
  • trunk/WebKit/qt/ChangeLog

    r54440 r54550  
     12010-02-09  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Webkit in Qt does not have window.showModalDialog
     6        https://bugs.webkit.org/show_bug.cgi?id=25585
     7
     8        Create a new eventloop when runModal() is called.
     9        Added comemnt in QWebPage::createWindow that the application is responsible
     10        for setting the modality of the appropriate window.
     11
     12        * Api/qwebpage.cpp:
     13        * WebCoreSupport/ChromeClientQt.cpp:
     14        (WebCore::ChromeClientQt::ChromeClientQt):
     15        (WebCore::ChromeClientQt::~ChromeClientQt):
     16        (WebCore::ChromeClientQt::canRunModal):
     17        (WebCore::ChromeClientQt::runModal):
     18        * WebCoreSupport/ChromeClientQt.h:
     19
    1202010-01-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    221
  • trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

    r53847 r54550  
    4545
    4646#include <qdebug.h>
     47#include <qeventloop.h>
    4748#include <qtextdocument.h>
    4849#include <qtooltip.h>
     
    6364ChromeClientQt::ChromeClientQt(QWebPage* webPage)
    6465    : m_webPage(webPage)
     66    , m_eventLoop(0)
    6567{
    6668    toolBarsVisible = statusBarVisible = menuBarVisible = true;
     
    6971ChromeClientQt::~ChromeClientQt()
    7072{
    71 
     73    if (m_eventLoop)
     74        m_eventLoop->exit();
    7275}
    7376
     
    174177bool ChromeClientQt::canRunModal()
    175178{
    176     notImplemented();
    177     return false;
     179    return true;
    178180}
    179181
     
    181183void ChromeClientQt::runModal()
    182184{
    183     notImplemented();
     185    m_eventLoop = new QEventLoop();
     186    QEventLoop* eventLoop = m_eventLoop;
     187    m_eventLoop->exec();
     188    delete eventLoop;
    184189}
    185190
  • trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h

    r54069 r54550  
    3535#include "PlatformString.h"
    3636
     37class QEventLoop;
    3738class QWebPage;
    3839
     
    159160        bool statusBarVisible;
    160161        bool menuBarVisible;
     162        QEventLoop* m_eventLoop;
    161163    };
    162164}
  • trunk/WebKitTools/ChangeLog

    r54549 r54550  
     12010-02-09  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Webkit in Qt does not have window.showModalDialog
     6        https://bugs.webkit.org/show_bug.cgi?id=25585
     7
     8        Set the modality flag when createWindow is called with window type WebWindowDialog.
     9
     10        * QtLauncher/main.cpp:
     11        (WebPage::createWindow):
     12
    1132010-02-09  Andras Becsi  <abecsi@webkit.org>
    214
  • trunk/WebKitTools/QtLauncher/main.cpp

    r54512 r54550  
    521521}
    522522
    523 QWebPage* WebPage::createWindow(QWebPage::WebWindowType)
     523QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
    524524{
    525525    LauncherWindow* mw = new LauncherWindow;
     526    if (type == WebModalDialog)
     527        mw->setWindowModality(Qt::ApplicationModal);
    526528    mw->show();
    527529    return mw->page();
Note: See TracChangeset for help on using the changeset viewer.