Bug 42566

Summary: [Qt] Resolving urls used in css fails.
Product: WebKit Reporter: Karsten Heimrich <karsten.heimrich>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: benjamin, cmarcelo, karsten.heimrich
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
sample app to reproduce issu none

Description Karsten Heimrich 2010-07-19 07:44:55 PDT
Created attachment 61951 [details]
sample app to reproduce issu

In Assistant we use our own implementation of QNetworkAccessManager which simply owerwrites the createRequest(...) method. This has to be done to get the actual html file out of a qt compressed help file (sql database). For some reason everything works fine except files (png) that are referenced inside a css file. The path seems to be resolved in a wrong way.

For example an image inside the style.css is referenced like this: url(../images/header_bg.png).

The folder structure looks like this:
SomePath/html
    -index.html
    -style
        -style.css
    -images
        -header_bg.png

While looking at the url return from NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, ...):
QUrl url = request.url();
url will show SomePath/images/header_bg.png while it should be SomePath/html/images/header_bg.png

Same can be reproduce with the attached example, here the the content is loaded from an resource file using QFile.
Comment 1 Benjamin Poulain 2011-01-30 04:44:35 PST
Please follow http://trac.webkit.org/wiki/QtWebKitBugs when reporing bugs here (missing Qt keyword).
Comment 2 Benjamin Poulain 2011-01-30 05:16:17 PST
I can reproduce on trunk. My wild guess on the cause is that resolving the URL fails because qrc:/ is not a valid scheme.

Is it a blocker for you on Assistant/Creator? If yes I will change to P1/blocker.
Comment 3 Jocelyn Turcotte 2014-02-03 03:16:38 PST
=== 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.