Bug 42566 - [Qt] Resolving urls used in css fails.
Summary: [Qt] Resolving urls used in css fails.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-07-19 07:44 PDT by Karsten Heimrich
Modified: 2014-02-03 03:16 PST (History)
3 users (show)

See Also:


Attachments
sample app to reproduce issu (102.88 KB, application/x-gzip)
2010-07-19 07:44 PDT, Karsten Heimrich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.