Changeset 61504 in webkit


Ignore:
Timestamp:
Jun 20, 2010 4:46:17 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-06-20 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>

Reviewed by Simon Hausmann.

The QWebHistory regression fix.

After change r51629 and r61207 QWebHistory's function back(),
forward(), goToItem() got broken.

Use page->goToItem() instead of direct actions on the BackForwardList.

[Qt] REGRESSION(r61207): qwebhistory unit test hangs
https://bugs.webkit.org/show_bug.cgi?id=40672

  • Api/qwebhistory.cpp: (QWebHistory::back): (QWebHistory::forward): (QWebHistory::goToItem):
  • tests/qwebhistory/tst_qwebhistory.cpp: (tst_QWebHistory::init): (tst_QWebHistory::back): (tst_QWebHistory::forward):
Location:
trunk/WebKit/qt
Files:
3 edited

Legend:

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

    r61056 r61504  
    364364{
    365365    if (canGoBack()) {
    366         d->lst->goBack();
    367366        WebCore::Page* page = d->lst->page();
    368         page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
     367        page->goToItem(d->lst->backItem(), WebCore::FrameLoadTypeIndexedBackForward);
    369368    }
    370369}
     
    379378{
    380379    if (canGoForward()) {
    381         d->lst->goForward();
    382380        WebCore::Page* page = d->lst->page();
    383         page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
     381        page->goToItem(d->lst->forwardItem(), WebCore::FrameLoadTypeIndexedBackForward);
    384382    }
    385383}
     
    392390void QWebHistory::goToItem(const QWebHistoryItem &item)
    393391{
    394     d->lst->goToItem(item.d->item);
    395392    WebCore::Page* page = d->lst->page();
    396     page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
     393    page->goToItem(item.d->item, WebCore::FrameLoadTypeIndexedBackForward);
    397394}
    398395
  • trunk/WebKit/qt/ChangeLog

    r61487 r61504  
     12010-06-20  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        The QWebHistory regression fix.
     6
     7        After change r51629 and r61207 QWebHistory's function back(),
     8        forward(), goToItem() got broken.
     9
     10        Use page->goToItem() instead of direct actions on the BackForwardList.
     11
     12        [Qt] REGRESSION(r61207): qwebhistory unit test hangs
     13        https://bugs.webkit.org/show_bug.cgi?id=40672
     14
     15        * Api/qwebhistory.cpp:
     16        (QWebHistory::back):
     17        (QWebHistory::forward):
     18        (QWebHistory::goToItem):
     19        * tests/qwebhistory/tst_qwebhistory.cpp:
     20        (tst_QWebHistory::init):
     21        (tst_QWebHistory::back):
     22        (tst_QWebHistory::forward):
     23
    1242010-06-19  Yael Aharon  <yael.aharon@nokia.com>
    225
  • trunk/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp

    r59815 r61504  
    8585    page = new QWebPage(this);
    8686    frame = page->mainFrame();
    87     connect(page, SIGNAL(loadFinished(bool)), &waitForLoadFinished, SLOT(quit()));
     87    connect(page, SIGNAL(loadFinished(bool)), &waitForLoadFinished, SLOT(quit()), Qt::QueuedConnection);
    8888
    8989    for (int i = 1;i < 6;i++) {
     
    127127    //try one more time (too many). crash test
    128128    hist->back();
     129    QCOMPARE(page->mainFrame()->toPlainText(), QString("page1"));
    129130}
    130131
     
    147148    //try one more time (too many). crash test
    148149    hist->forward();
     150    QCOMPARE(page->mainFrame()->toPlainText(), QString("page") + QString::number(histsize));
    149151}
    150152
Note: See TracChangeset for help on using the changeset viewer.