Changeset 103413 in webkit


Ignore:
Timestamp:
Dec 21, 2011 10:21:58 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt][WK2] Add tests for favicon and fix icon url decoding issue
https://bugs.webkit.org/show_bug.cgi?id=74967

Patch by Rafael Brandao <rafael.lobo@openbossa.org> on 2011-12-21
Reviewed by Simon Hausmann.

  • UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url

without the percent encoding and we should access WebIconDatabase with
an encoded url. Added a test to cover this behavior.
(QWebIconImageProvider::requestImage):

  • UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added.
  • UIProcess/API/qt/tests/qmltests/common/favicon.html: Added.
  • UIProcess/API/qt/tests/qmltests/common/favicon.png: Added.
  • UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added.
  • UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added.
  • UIProcess/API/qt/tests/qmltests/qmltests.pro:
Location:
trunk/Source/WebKit2
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r103412 r103413  
     12011-12-21  Rafael Brandao  <rafael.lobo@openbossa.org>
     2
     3        [Qt][WK2] Add tests for favicon and fix icon url decoding issue
     4        https://bugs.webkit.org/show_bug.cgi?id=74967
     5
     6        Reviewed by Simon Hausmann.
     7
     8        * UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url
     9        without the percent encoding and we should access WebIconDatabase with
     10        an encoded url. Added a test to cover this behavior.
     11        (QWebIconImageProvider::requestImage):
     12        * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added.
     13        * UIProcess/API/qt/tests/qmltests/common/favicon.html: Added.
     14        * UIProcess/API/qt/tests/qmltests/common/favicon.png: Added.
     15        * UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added.
     16        * UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added.
     17        * UIProcess/API/qt/tests/qmltests/qmltests.pro:
     18
    1192011-12-21  Sam Weinig  <sam@webkit.org>
    220
  • trunk/Source/WebKit2/UIProcess/API/qt/qwebiconimageprovider.cpp

    r103323 r103413  
    4040QImage QWebIconImageProvider::requestImage(const QString& id, QSize* size, const QSize& requestedSize)
    4141{
    42     QString encodedIconUrl = id;
    43     encodedIconUrl.remove(0, encodedIconUrl.indexOf('#') + 1);
    44     String pageURL = QUrl::fromPercentEncoding(encodedIconUrl.toUtf8());
     42    QString decodedIconUrl = id;
     43    decodedIconUrl.remove(0, decodedIconUrl.indexOf('#') + 1);
     44    String pageURL = QString::fromUtf8(QUrl(decodedIconUrl).toEncoded());
    4545
    4646    // The string identifier has the leading image://webicon/ already stripped, so we just
  • trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro

    r102573 r103413  
    2222    DesktopBehavior/tst_messaging.qml \
    2323    DesktopBehavior/tst_navigationRequested.qml \
     24    WebView/tst_favIconLoad.qml \
    2425    WebView/tst_download.qml \
    2526    WebView/tst_geopermission.qml \
Note: See TracChangeset for help on using the changeset viewer.