[Webkit-unassigned] [Bug 34884] [Qt] QWebSettings::setUserStyleSheetUrl() does nothing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 21 16:27:06 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=34884


Simon Hausmann <hausmann at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




--- Comment #7 from Simon Hausmann <hausmann at webkit.org>  2010-03-21 16:27:06 PST ---
(In reply to comment #6)
> #include <QtGui/QApplication>
> #include <QWebView>
> #include <QUrl>
> 
> int main(int argc, char *argv[])
> {
>     QApplication a(argc, argv);
>     QWebView view;
>     QByteArray css("div { background-color: red }");
> 
>     // that's  works fine
>    
> //view.settings()->setUserStyleSheetUrl(QUrl("data:text/css;charset=utf-8;base64,"
> + css.toBase64()));    
> 
>     // doesn't work
>     view.settings()->setUserStyleSheetUrl(QUrl::fromLocalFile("d:/test.css"));  
> 
>     view.load(QUrl("http://qtsoftware.com/"));
>     view.show();
>     return a.exec();
> }
> 
> It seems like 
> String KURL::fileSystemPath() const 
> returns "/d:/test.css" that QFileInfo can't understand.

Well spotted. It seems KURL::fileSystemPath() should use toLocalFile() instead
of simply path().

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list