Changeset 61056 in webkit


Ignore:
Timestamp:
Jun 12, 2010 12:36:06 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-06-12 Robert Hogan <robert@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Back-forward list dumping is incorrect

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

Support dumping child history items in DRT.

Unskip:

fast/loader/frame-src-change-added-to-history.html
fast/loader/frame-src-change-not-added-to-history.html
fast/loader/frame-location-change-not-added-to-history.html

  • platform/qt/Skipped:

2010-06-12 Robert Hogan <robert@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Back-forward list dumping is incorrect

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

Support dumping child history items in DRT.

Unskip:

fast/loader/frame-src-change-added-to-history.html
fast/loader/frame-src-change-not-added-to-history.html
fast/loader/frame-location-change-not-added-to-history.html

  • Api/qwebhistory.cpp: (QWebHistoryItemPrivate::core):
  • Api/qwebhistory.h:
  • Api/qwebhistory_p.h:
  • WebCoreSupport/DumpRenderTreeSupportQt.cpp: (DumpRenderTreeSupportQt::isTargetItem): (DumpRenderTreeSupportQt::historyItemTarget): (DumpRenderTreeSupportQt::getChildHistoryItems):
  • WebCoreSupport/DumpRenderTreeSupportQt.h:

2010-06-12 Robert Hogan <robert@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Back-forward list dumping is incorrect

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

Support dumping child history items in DRT.

Unskip:

fast/loader/frame-src-change-added-to-history.html
fast/loader/frame-src-change-not-added-to-history.html
fast/loader/frame-location-change-not-added-to-history.html

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp: (WebCore::dumpHistoryItem):
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61054 r61056  
     12010-06-12  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Back-forward list dumping is incorrect
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=36392
     8
     9        Support dumping child history items in DRT.
     10
     11        Unskip:
     12
     13        fast/loader/frame-src-change-added-to-history.html
     14        fast/loader/frame-src-change-not-added-to-history.html
     15        fast/loader/frame-location-change-not-added-to-history.html
     16
     17        * platform/qt/Skipped:
     18
    1192010-06-11  Eric Seidel  <eric@webkit.org>
    220
  • trunk/LayoutTests/platform/qt/Skipped

    r60970 r61056  
    25222522# https://bugs.webkit.org/show_bug.cgi?id=35973
    25232523fast/multicol/hit-test-above-or-below.html
    2524 
    2525 # [Qt] Back-forward list dumping is incorrect
    2526 # https://bugs.webkit.org/show_bug.cgi?id=36392
    2527 fast/loader/frame-src-change-added-to-history.html
    2528 fast/loader/frame-src-change-not-added-to-history.html
    2529 fast/loader/frame-location-change-not-added-to-history.html
    25302524
    25312525# fast/loader/stateobjects/replacestate-in-iframe.html caused infinite loop
  • trunk/WebKit/qt/Api/qwebhistory.cpp

    r59660 r61056  
    556556    return QWebFramePrivate::kit(lst->page()->mainFrame())->page()->handle();
    557557}
     558
     559WebCore::HistoryItem* QWebHistoryItemPrivate::core(QWebHistoryItem* q)
     560{
     561    return q->d->item;
     562}
  • trunk/WebKit/qt/Api/qwebhistory.h

    r50224 r61056  
    6262    friend class WebCore::FrameLoaderClientQt;
    6363    friend class QWebHistoryItemPrivate;
     64    friend class DumpRenderTreeSupportQt;
    6465    //friend QDataStream & operator<<(QDataStream& out,const QWebHistoryItem& hist);
    6566    //friend QDataStream & operator>>(QDataStream& in,QWebHistoryItem& hist);
  • trunk/WebKit/qt/Api/qwebhistory_p.h

    r48688 r61056  
    4646    }
    4747
     48    static WebCore::HistoryItem* core(QWebHistoryItem* q);
     49
    4850    WebCore::HistoryItem* item;
    4951};
  • trunk/WebKit/qt/ChangeLog

    r61034 r61056  
     12010-06-12  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Back-forward list dumping is incorrect
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=36392
     8
     9        Support dumping child history items in DRT.
     10
     11        Unskip:
     12
     13        fast/loader/frame-src-change-added-to-history.html
     14        fast/loader/frame-src-change-not-added-to-history.html
     15        fast/loader/frame-location-change-not-added-to-history.html
     16
     17        * Api/qwebhistory.cpp:
     18        (QWebHistoryItemPrivate::core):
     19        * Api/qwebhistory.h:
     20        * Api/qwebhistory_p.h:
     21        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     22        (DumpRenderTreeSupportQt::isTargetItem):
     23        (DumpRenderTreeSupportQt::historyItemTarget):
     24        (DumpRenderTreeSupportQt::getChildHistoryItems):
     25        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     26
    1272010-06-11  Jesus Sanchez-Palencia  <jesus@webkit.org>
    228
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r60917 r61056  
    3636#include "FrameView.h"
    3737#include "GCController.h"
     38#include "HistoryItem.h"
    3839#include "HTMLInputElement.h"
    3940#include "InspectorController.h"
     
    5657#include "qwebframe.h"
    5758#include "qwebframe_p.h"
     59#include "qwebhistory.h"
     60#include "qwebhistory_p.h"
    5861#include "qwebpage.h"
    5962#include "qwebpage_p.h"
     
    566569}
    567570
     571bool DumpRenderTreeSupportQt::isTargetItem(const QWebHistoryItem& historyItem)
     572{
     573    QWebHistoryItem it = historyItem;
     574    if (QWebHistoryItemPrivate::core(&it)->isTargetItem())
     575        return true;
     576    return false;
     577}
     578
     579QString DumpRenderTreeSupportQt::historyItemTarget(const QWebHistoryItem& historyItem)
     580{
     581    QWebHistoryItem it = historyItem;
     582    return (QWebHistoryItemPrivate::core(&it)->target());
     583}
     584
     585QList<QWebHistoryItem> DumpRenderTreeSupportQt::getChildHistoryItems(const QWebHistoryItem& historyItem)
     586{
     587    QWebHistoryItem it = historyItem;
     588    HistoryItem* item = QWebHistoryItemPrivate::core(&it);
     589    const WebCore::HistoryItemVector& children = item->children();
     590
     591    unsigned size = children.size();
     592    QList<QWebHistoryItem> kids;
     593    for (unsigned i = 0; i < size; ++i) {
     594        QWebHistoryItem kid(new QWebHistoryItemPrivate(children[i].get()));
     595        kids.prepend(kid);
     596    }
     597    return kids;
     598}
     599
    568600// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
    569601
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r60566 r61056  
    3030class QWebFrame;
    3131class QWebPage;
     32class QWebHistoryItem;
    3233
    3334enum NotificationPermission {
     
    119120    static void setCheckPermissionFunction(CheckPermissionFunctionType*);
    120121    static void setRequestPermissionFunction(RequestPermissionFunctionType*);
     122
     123    static QList<QWebHistoryItem> getChildHistoryItems(const QWebHistoryItem& historyItem);
     124    static bool isTargetItem(const QWebHistoryItem& historyItem);
     125    static QString historyItemTarget(const QWebHistoryItem& historyItem);
     126
    121127};
    122128
  • trunk/WebKitTools/ChangeLog

    r61047 r61056  
     12010-06-12  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Back-forward list dumping is incorrect
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=36392
     8
     9        Support dumping child history items in DRT.
     10
     11        Unskip:
     12
     13        fast/loader/frame-src-change-added-to-history.html
     14        fast/loader/frame-src-change-not-added-to-history.html
     15        fast/loader/frame-location-change-not-added-to-history.html
     16
     17        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     18        (WebCore::dumpHistoryItem):
     19
    1202010-06-10  Ojan Vafai  <ojan@chromium.org>
    221
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r60586 r61056  
    709709    }
    710710
    711     // FIXME: Wrong, need (private?) API for determining this.
    712     result.append(QLatin1String("  **nav target**"));
     711    QString target = DumpRenderTreeSupportQt::historyItemTarget(item);
     712    if (!target.isEmpty())
     713        result.append(QString(QLatin1String(" (in frame \"%1\")")).arg(target));
     714
     715    if (DumpRenderTreeSupportQt::isTargetItem(item))
     716        result.append(QLatin1String("  **nav target**"));
    713717    result.append(QLatin1String("\n"));
     718
     719    QList<QWebHistoryItem> children = DumpRenderTreeSupportQt::getChildHistoryItems(item);
     720    for (int i = 0; i < children.size(); ++i)
     721        result += dumpHistoryItem(children.at(i), 12, false);
    714722
    715723    return result;
Note: See TracChangeset for help on using the changeset viewer.