WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
21499
HTML content set by QWebView::setHtml can't access local files
https://bugs.webkit.org/show_bug.cgi?id=21499
Summary
HTML content set by QWebView::setHtml can't access local files
Bernhard Rosenkraenzer
Reported
2008-10-09 02:48:20 PDT
Loading images from the local filesystem (file:/ URLs) fails in current snapshots if the HTML code has been set by QWebView::setHtml (e.g. HTML code generated on the fly by a local application) as opposed to having been loaded from a file:/ URL. This is caused by current WebKit defaulting FrameLoader::localLoadPolicy to AllowLocalLoadsForLocalOnly (as opposed to AllowLocalLoadsForLocalAndSubstituteData), and the QtWebKit API not having the functionality to override this. There should be a way to set FrameLoader::localLoadPolicy through the QtWebKit API (QWebSettings::globalSettings()->setAttribute(QWebSettings::allowLocalLoads); or something?). For compatibility with some legacy applications, it may also make sense to have the option to set localLoadPolicy to AllowLocalLoadsForAll, the way it used to be in older WebKit versions.
Attachments
Suggested fix
(1.60 KB, patch)
2008-10-09 07:24 PDT
,
Bernhard Rosenkraenzer
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Bernhard Rosenkraenzer
Comment 1
2008-10-09 07:24:42 PDT
Created
attachment 24231
[details]
Suggested fix Suggested fix
nacho
Comment 2
2009-01-22 03:10:02 PST
ok this bug is solved changing in FrameLoader.cpp the code static FrameLoader::LocalLoadPolicy localLoadPolicy = FrameLoader::AllowLocalLoadsForLocalOnly for static FrameLoader::LocalLoadPolicy localLoadPolicy = FrameLoader::AllowLocalLoadsForAll. But now, I can't to access an image provided by a AdServer. Are there any restrictions on access to external images?
Simon Hausmann
Comment 3
2009-11-23 05:28:14 PST
Fixed in
http://trac.webkit.org/changeset/38493
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