Summary: | [Qt][WK2] ASSERT in QWebIconImageProvider::requestImage() | ||
---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> |
Component: | WebKit2 | Assignee: | Tor Arne Vestbø <vestbo> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | hausmann, menard, vestbo |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 87133 | ||
Bug Blocks: |
Description
zalan
2012-05-21 12:17:38 PDT
fails on the following icon request: qrc:///qml/BrowserWindow.qml:261:13: QML Image: Failed to get image from provider: image://webicon/1/1868935#https://accounts.google.com/ServiceLogin?service=adwords&hl=en_US<mpl=jfk&passive=true&ifr=false&alwf=true&continue=https://adwords.google.com/um/gaiaauth?apt=None<mpl=jfk&sacu=1&sarp=1&sourceid=awo&subid=ww-ww-et-ads_lrn repro: load google.com -> click on 'Advertising programs' (bottom-left link) -> scroll a little down and click on 'learn more' (link) When querying IconDatabase::iconImageForPageURL() for a favicon, it expects the URL in the same format as it was set. However, while constructing the following URL 'image://webicon/<context id>/<icon id>#original page url' to utilize qquickpixmapcache, the original page url, as fragment, gets decoded. When setting a fragment, QUrl decodes things like percent character sequences (and some others too). Similar decoding takes place when setting query as part of the url (resolving #) Here is a quick example: original url:https://a.b.com/s?s=https://a.b.com/um/g?apt%3DNone#%20and a space QUrl using query: image://webicon/a.b/c.html?https://a.b.com/s?s=https://a.b.com/um/g?apt%3DNone%23 and a space QUrl using fragment: image://webicon/a.b/c.html#https://a.b.com/s?s=https://a.b.com/um/g?apt=None# and a space KURL using query: image://webicon/a.b/c.html?https://a.b.com/s?s=https://a.b.com/um/g?apt%3DNone#%20and a space KURL using fragment: image://webicon/a.b/c.html#https://a.b.com/s?s=https://a.b.com/um/g?apt%3DNone#%20and a space Notice that QUrl decodes some part of the input string, though differently depending on what part of the url is set. However KURL leaves it as is. This behavior makes us unable to pass url strings as QUrl and expect the url back in the exact same format. Switching away from QUrl internally (and on API level) can reduce the issues that might arise in the future in this context, however when the url string leaves the boundary of qtwebkit, it's out of our hands. Even if qtwebkit API returned the url as QString, and QWebIconImageProvider::requestImage() also had QString as input parameter for the url, the fact that pixmap cache's internal representation of the url string is a QUrl object makes the API type enforcing useless. Thoughts? Just for the record, Tor Arne, Zalan and I had a discussion with Thiago and for this particular issue we concluded that the only way to make sure that the web page url we encode _into_ the web icon url is _exactly_ the same that we extract later is by encoding the url in something like base64 before setting the fragment. === Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines. |