WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34802
[Qt] REGRESSION: QWebSettings::setUserStyleSheetUrl is not working with a data URL (Base64)
https://bugs.webkit.org/show_bug.cgi?id=34802
Summary
[Qt] REGRESSION: QWebSettings::setUserStyleSheetUrl is not working with a dat...
Chenca
Reported
2010-02-10 08:14:49 PST
This simple test case is not working anymore. #include <QApplication> #include <QWebView> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWebView view; //p { background-color: red }; QUrl css("data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;"); view.page()->settings()->setUserStyleSheetUrl(css); view.setHtml("<html><body><p>RED TEST</p></body></html>"); view.show(); app.exec(); return 0; }
Attachments
Fix documentation
(1.79 KB, patch)
2010-02-24 12:03 PST
,
Diego Gonzalez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Diego Gonzalez
Comment 1
2010-02-11 15:38:04 PST
The last ; int the base64 code (cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;) is break the decoding. Removing the ; the style is applied. I seems ; is not part the data: pattern according:
http://tools.ietf.org/html/rfc2397
http://en.wikipedia.org/wiki/Data_URI_scheme
but off course we can treat this type of error on Qt side or maybe in WebCore. Suggestions?
Simon Hausmann
Comment 2
2010-02-12 04:33:57 PST
(In reply to
comment #1
)
> The last ; int the base64 code (cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;) is > break the decoding. Removing the ; the style is applied. > > I seems ; is not part the data: pattern according: >
http://tools.ietf.org/html/rfc2397
>
http://en.wikipedia.org/wiki/Data_URI_scheme
> > but off course we can treat this type of error on Qt side or maybe in WebCore. > > Suggestions?
Whoops, sounds like at least the API docs need fixing :-). Maybe the semicolon slipped in accidentially. It would be nice if QUrl could detect this, but otherwise I don't think there's much we can or should do. It's technically invalid input.
Diego Gonzalez
Comment 3
2010-02-24 12:03:41 PST
Created
attachment 49420
[details]
Fix documentation Fix the documentation. Maybe after a Qt bug could be opened to QUrl treat this sittuation
Simon Hausmann
Comment 4
2010-02-26 00:56:12 PST
Comment on
attachment 49420
[details]
Fix documentation Thanks Diego!
WebKit Commit Bot
Comment 5
2010-02-26 08:53:29 PST
Comment on
attachment 49420
[details]
Fix documentation Clearing flags on attachment: 49420 Committed
r55288
: <
http://trac.webkit.org/changeset/55288
>
WebKit Commit Bot
Comment 6
2010-02-26 08:53:33 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