Changeset 46367 in webkit


Ignore:
Timestamp:
Jul 24, 2009, 11:05:58 AM (16 years ago)
Author:
kenneth@webkit.org
Message:

2009-07-24 Antonio Gomes <antonio.gomes@openbossa.org>

Reviewed by Adam Treat.

As per discussion on IRC, changed originalUrl by requestedUrl.

  • Api/qwebframe.cpp: (QWebFrame::requestedUrl):
  • Api/qwebframe.h:
  • tests/qwebframe/tst_qwebframe.cpp:
Location:
trunk/WebKit/qt
Files:
4 edited

Legend:

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

    r46366 r46367  
    283283    The QWebFrame class also offers methods to retrieve both the URL currently
    284284    loaded by the frame (see url()) as well as the URL originally requested
    285     to be loaded (see originalUrl()). These methods make possible the retrieval
     285    to be loaded (see requestedUrl()). These methods make possible the retrieval
    286286    of the URL before and after a DNS resolution or a redirection occurs during
    287     the load process. The originalUrl() also matches to the URL added to the
     287    the load process. The requestedUrl() also matches to the URL added to the
    288288    frame history (\l{QwebHistory}) if load is successful.
    289289
     
    530530/*!
    531531    \since 4.6
    532     \property QWebFrame::originalUrl
    533 
    534     The original url loaded by the frame currently viewed. The URL may differ from
     532    \property QWebFrame::requestedUrl
     533
     534    The URL requested to loaded by the frame currently viewed. The URL may differ from
    535535    the one returned by url() if a DNS resolution or a redirection occurs.
    536536
    537537    \sa url(), setUrl()
    538538*/
    539 QUrl QWebFrame::originalUrl() const
     539QUrl QWebFrame::requestedUrl() const
    540540{
    541541    if (!d->frame->loader()->activeDocumentLoader()
  • trunk/WebKit/qt/Api/qwebframe.h

    r46366 r46367  
    108108    Q_PROPERTY(QString title READ title)
    109109    Q_PROPERTY(QUrl url READ url WRITE setUrl)
    110     Q_PROPERTY(QUrl originalUrl READ originalUrl)
     110    Q_PROPERTY(QUrl requestedUrl READ requestedUrl)
    111111    Q_PROPERTY(QUrl baseUrl READ baseUrl)
    112112    Q_PROPERTY(QIcon icon READ icon)
     
    143143    void setUrl(const QUrl &url);
    144144    QUrl url() const;
    145     QUrl originalUrl() const;
     145    QUrl requestedUrl() const;
    146146    QUrl baseUrl() const;
    147147    QIcon icon() const;
  • trunk/WebKit/qt/ChangeLog

    r46366 r46367  
     12009-07-24  Antonio Gomes   <antonio.gomes@openbossa.org>
     2
     3        Reviewed by Adam Treat.
     4
     5        As per discussion on IRC, changed originalUrl by requestedUrl.
     6
     7        * Api/qwebframe.cpp:
     8        (QWebFrame::requestedUrl):
     9        * Api/qwebframe.h:
     10        * tests/qwebframe/tst_qwebframe.cpp:
     11
    1122009-07-24  Andre Pedralho  <andre.pedralho@openbossa.org>
    213
  • trunk/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp

    r46366 r46367  
    576576    void urlChange();
    577577    void domCycles();
    578     void originalUrl();
     578    void requestedUrl();
    579579    void setHtml();
    580580    void setHtmlWithResource();
     
    22222222};
    22232223
    2224 void tst_QWebFrame::originalUrl()
     2224void tst_QWebFrame::requestedUrl()
    22252225{
    22262226    QWebPage page;
     
    22352235    QTest::qWait(200);
    22362236    QCOMPARE(spy.count(), 1);
    2237     QCOMPARE(frame->originalUrl(), QUrl("qrc:/test1.html"));
     2237    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/test1.html"));
    22382238    QCOMPARE(frame->url(), QUrl("qrc:/test2.html"));
    22392239
     
    22412241    QTest::qWait(200);
    22422242    QCOMPARE(spy.count(), 2);
    2243     QCOMPARE(frame->originalUrl(), QUrl("qrc:/non-existent.html"));
     2243    QCOMPARE(frame->requestedUrl(), QUrl("qrc:/non-existent.html"));
    22442244    QCOMPARE(frame->url(), QUrl("qrc:/non-existent.html"));
    22452245
     
    22472247    QTest::qWait(200);
    22482248    QCOMPARE(spy.count(), 3);
    2249     QCOMPARE(frame->originalUrl(), QUrl("http://abcdef.abcdef/"));
     2249    QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/"));
    22502250    QCOMPARE(frame->url(), QUrl("http://abcdef.abcdef/"));
    22512251}
Note: See TracChangeset for help on using the changeset viewer.