Changeset 53615 in webkit


Ignore:
Timestamp:
Jan 21, 2010 1:12:25 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-21 Robert Hogan <robert@roberthogan.net>

Reviewed by Simon Hausmann.

Qt DRT: respect window.close() and window.closed()

Qt DRT needs to maintain a correct count of open windows
for windowCount(). It also needs to delete windows that
have been closed by window.close().

This fixes the following tests:

plugins/destroy-during-npp-new.html
fast/dom/Document/early-document-access.html
fast/dom/Window/window-early-properties.html
fast/events/open-window-from-another-frame.html
fast/events/popup-blocking-click-in-iframe.html

https://bugs.webkit.org/show_bug.cgi?id=32953

  • platform/qt/Skipped:

2010-01-21 Robert Hogan <robert@roberthogan.net>

Reviewed by Simon Hausmann.

Qt DRT: respect window.close() and window.closed()

Qt DRT needs to maintain a correct count of open windows
for windowCount(). It also needs to delete windows that
have been closed by window.close().

This fixes the following tests:

plugins/destroy-during-npp-new.html
fast/dom/Document/early-document-access.html
fast/dom/Window/window-early-properties.html
fast/events/open-window-from-another-frame.html
fast/events/popup-blocking-click-in-iframe.html

https://bugs.webkit.org/show_bug.cgi?id=32953

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp: (WebCore::DumpRenderTree::DumpRenderTree): (WebCore::DumpRenderTree::createWindow): (WebCore::DumpRenderTree::windowCloseRequested):
  • DumpRenderTree/qt/DumpRenderTreeQt.h:
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::maybeDump):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53612 r53615  
     12010-01-21  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        Qt DRT: respect window.close() and window.closed()
     6
     7        Qt DRT needs to maintain a correct count of open windows
     8        for windowCount(). It also needs to delete windows that
     9        have been closed by window.close().
     10
     11        This fixes the following tests:
     12
     13        plugins/destroy-during-npp-new.html
     14        fast/dom/Document/early-document-access.html
     15        fast/dom/Window/window-early-properties.html
     16        fast/events/open-window-from-another-frame.html
     17        fast/events/popup-blocking-click-in-iframe.html
     18
     19        https://bugs.webkit.org/show_bug.cgi?id=32953
     20
     21        * platform/qt/Skipped:
     22
    1232010-01-20  Philippe Normand  <pnormand@igalia.com>
    224
  • trunk/LayoutTests/platform/qt/Skipped

    r53564 r53615  
    521521fast/text/international/002.html
    522522
    523 plugins/destroy-during-npp-new.html
    524523plugins/embed-attributes-setting.html
    525524plugins/get-url-that-the-resource-load-delegate-will-disallow.html
     
    50245023fast/dom/javascript-url-crash-function.html
    50255024fast/dom/location-new-window-no-crash.html
    5026 fast/dom/Document/early-document-access.html
    5027 fast/dom/Window/window-early-properties.html
    5028 fast/events/open-window-from-another-frame.html
    5029 fast/events/popup-blocking-click-in-iframe.html
    50305025inspector/console-clear.html
    50315026http/tests/misc/set-window-opener-to-null.html
  • trunk/WebKitTools/ChangeLog

    r53609 r53615  
     12010-01-21  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        Qt DRT: respect window.close() and window.closed()
     6
     7        Qt DRT needs to maintain a correct count of open windows
     8        for windowCount(). It also needs to delete windows that
     9        have been closed by window.close().
     10
     11        This fixes the following tests:
     12
     13        plugins/destroy-during-npp-new.html
     14        fast/dom/Document/early-document-access.html
     15        fast/dom/Window/window-early-properties.html
     16        fast/events/open-window-from-another-frame.html
     17        fast/events/popup-blocking-click-in-iframe.html
     18
     19        https://bugs.webkit.org/show_bug.cgi?id=32953
     20
     21        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     22        (WebCore::DumpRenderTree::DumpRenderTree):
     23        (WebCore::DumpRenderTree::createWindow):
     24        (WebCore::DumpRenderTree::windowCloseRequested):
     25        * DumpRenderTree/qt/DumpRenderTreeQt.h:
     26        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     27        (LayoutTestController::maybeDump):
     28
    1292010-01-20  Eric Seidel  <eric@webkit.org>
    230
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r53543 r53615  
    345345    connect(m_page, SIGNAL(loadStarted()),
    346346            m_controller, SLOT(resetLoadFinished()));
     347    connect(m_page, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
    347348
    348349    connect(m_page->mainFrame(), SIGNAL(titleChanged(const QString&)),
     
    783784    connectFrame(page->mainFrame());
    784785    connect(page, SIGNAL(loadFinished(bool)), m_controller, SLOT(maybeDump(bool)));
     786    connect(page, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
    785787    return page;
     788}
     789
     790void DumpRenderTree::windowCloseRequested()
     791{
     792    QWebPage* page = qobject_cast<QWebPage*>(sender());
     793    QObject* container = page->parent();
     794    windows.removeAll(container);
     795    container->deleteLater();
    786796}
    787797
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h

    r53543 r53615  
    110110    void dumpDatabaseQuota(QWebFrame* frame, const QString& dbName);
    111111    void statusBarMessage(const QString& message);
     112    void windowCloseRequested();
    112113
    113114Q_SIGNALS:
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r53281 r53615  
    8989void LayoutTestController::maybeDump(bool success)
    9090{
    91     Q_ASSERT(sender() == m_topLoadingFrame->page());
     91    // It is possible that we get called by windows created from the main page that have finished
     92    // loading, so we don't ASSERT here. At the moment we do not gather results from such windows,
     93    // but may need to in future.
     94    if (sender() != m_topLoadingFrame->page())
     95      return;
    9296
    9397    m_loadFinished = true;
Note: See TracChangeset for help on using the changeset viewer.