WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29424
[Qt] QWebFrame: When a relative url is loaded then it will make it absolute internally, however this strips out any query/fragments
https://bugs.webkit.org/show_bug.cgi?id=29424
Summary
[Qt] QWebFrame: When a relative url is loaded then it will make it absolute i...
Tor Arne Vestbø
Reported
2009-09-18 07:42:52 PDT
This bug report originated from issue QTBUG-3889 <
http://bugreports.qt.nokia.com/browse/QTBUG-3889
> --- Description --- QWebFrame: When a relative url is loaded then it will make it absolute internally, however this strips out any query/fragments
Attachments
Testcase
(807 bytes, text/x-c++src)
2010-03-15 08:56 PDT
,
Kent Hansen
no flags
Details
Patch for review
(1.56 KB, patch)
2011-02-15 12:37 PST
,
Aparna Nandyal
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Hansen
Comment 1
2010-03-15 08:56:10 PDT
Created
attachment 50712
[details]
Testcase
Kent Hansen
Comment 2
2010-03-15 08:56:41 PDT
Reproduced with
r55986
.
Jesus Sanchez-Palencia
Comment 3
2010-05-14 07:43:36 PDT
Reproduced on Snow Leopard with Qt 4.7 trunk (HEAD 03f8f1df0d88f5ffe0b3120cffce614cbeefdb70) and WebKit trunk (
r59155
).
Aparna Nandyal
Comment 4
2011-02-15 12:37:54 PST
Created
attachment 82506
[details]
Patch for review In function ensureAbsoluteUrl, call is made to QUrl::toLocalFile() which strips the query, fragment part out. Patch corrects this to resolve it before returning absolute url.
Andreas Kling
Comment 5
2011-02-15 12:40:05 PST
Comment on
attachment 82506
[details]
Patch for review Needs a test. :)
Aparna Nandyal
Comment 6
2011-02-16 00:34:04 PST
(In reply to
comment #5
)
> (From update of
attachment 82506
[details]
) > Needs a test. :)
Kling as discussed yesterday, I am able to write an automation test. The patch can get tested only when a relative url is passed to QWebView. But the way automation test framework is designed, the test html files are stored in resources directory and an absolute path like qrc:///resources/local.html needs to be passed. When this is passed, the code that needs to be tested is not hit. Tested the below code by passing relative url and it works fine. void tst_QWebView::loadRelativeUrl() { QWebView view; QSignalSpy spy(view.page(), SIGNAL(loadFinished(bool))); // This is the line that should be in the final test. But its absolute path // QUrl url("qrc:///resources/local.html"); // This url actually tests the patch QUrl url("local.html"); url.setFragment("Overview"); view.load(url); ::waitForSignal(&view, SIGNAL(loadFinished(bool))); QCOMPARE(spy.count(), 1); QUrl loadedUrl = view.page()->mainFrame()->url(); QVERIFY(loadedUrl.hasFragment()); } Any suggestions to get around this problem.
WebKit Commit Bot
Comment 7
2011-02-16 02:47:34 PST
Comment on
attachment 82506
[details]
Patch for review Clearing flags on attachment: 82506 Committed
r78688
: <
http://trac.webkit.org/changeset/78688
>
WebKit Commit Bot
Comment 8
2011-02-16 02:47:39 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug