[Webkit-unassigned] [Bug 87037] [Qt][WK2] ASSERT in QWebIconImageProvider::requestImage()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 21 13:14:49 PDT 2012


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





--- Comment #2 from Zalan Bujtas <zbujtas at gmail.com>  2012-05-21 13:13:54 PST ---
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?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list