Changeset 43015 in webkit


Ignore:
Timestamp:
Apr 29, 2009 2:38:14 PM (15 years ago)
Author:
eric@webkit.org
Message:

2009-03-27 Benjamin C Meyer <benjamin.meyer@torchmobile.com>

Reviewed by Simon Hausmann.

Update the page actions when a finishing loading even if the frame is
not the top frame such as when browsing inside of a website with frames.
https://bugs.webkit.org/show_bug.cgi?id=24890

  • WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad):
  • tests/qwebpage/frametest/frame_a.html: Added.
  • tests/qwebpage/frametest/index.html: Added.
  • tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::backActionUpdate):
Location:
trunk/WebKit/qt
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r42995 r43015  
     12009-03-27  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        Update the page actions when a finishing loading even if the frame is
     6        not the top frame such as when browsing inside of a website with frames.
     7        https://bugs.webkit.org/show_bug.cgi?id=24890
     8
     9        * WebCoreSupport/FrameLoaderClientQt.cpp:
     10        (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad):
     11        * tests/qwebpage/frametest/frame_a.html: Added.
     12        * tests/qwebpage/frametest/index.html: Added.
     13        * tests/qwebpage/tst_qwebpage.cpp:
     14        (tst_QWebPage::backActionUpdate):
     15
    1162009-04-29  Ariya Hidayat  <ariya.hidayat@nokia.com>
    217
  • trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r42728 r43015  
    388388    m_loadSucceeded = true;
    389389
    390     if (m_frame->tree()->parent() || !m_webFrame)
     390    if (!m_webFrame)
    391391        return;
    392392    m_webFrame->page()->d->updateNavigationActions();
  • trunk/WebKit/qt/tests/qwebpage/qwebpage.pro

    r35621 r43015  
    33include(../../../../WebKit.pri)
    44SOURCES  += tst_qwebpage.cpp
     5RESOURCES  += tst_qwebpage.qrc
    56QT += testlib network
    67QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
  • trunk/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

    r42516 r43015  
    106106    void textSelection();
    107107    void textEditing();
     108    void backActionUpdate();
    108109
    109110    void requestCache();
     
    10991100}
    11001101
     1102void tst_QWebPage::backActionUpdate()
     1103{
     1104    QWebView view;
     1105    QWebPage *page = view.page();
     1106    QAction *action = page->action(QWebPage::Back);
     1107    QVERIFY(!action->isEnabled());
     1108    QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
     1109    QUrl url = QUrl("qrc:///frametest/index.html");
     1110    page->mainFrame()->load(url);
     1111    QTRY_COMPARE(loadSpy.count(), 1);
     1112    QVERIFY(!action->isEnabled());
     1113    QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(10, 10));
     1114    QTRY_COMPARE(loadSpy.count(), 2);
     1115
     1116    QVERIFY(action->isEnabled());
     1117}
     1118
    11011119QTEST_MAIN(tst_QWebPage)
    11021120#include "tst_qwebpage.moc"
Note: See TracChangeset for help on using the changeset viewer.