Right now the user stylesheet location is stored as a URL. This is based off ancient history, namely that we happened to store the preference this way on Mac. Even though Safari only allows you to pick local files from its UI for user stylesheets, the preference itself is a URL. Because of this, the current code is making an assumption that remote URLs should be allowed to work as user stylesheets. On Mac and Qt only, we have a UserStyleSheetLoader object that is dealing with remote URLs. Other platforms seem to just not support this.

I would like to eliminate this object on all platforms.

The remote URL loading is asynchronous, and this is undesirable for a user stylesheet anyway. It can lead to bugs like the one fixed here (which only fixed local files):

http://trac.webkit.org/changeset/30078

There's basically no way any WebKit client could ever have been relying on remote URLs, so I'm really not concerned about breaking any existing WebKit clients by removing this feature on OS X.

I will be adding new APIs to WebKit (just as I did for user scripts) that will allow the injection of an arbitrary number of user sheets, with the full text of the sheet being supplied by the caller instead. This will allow an application to support remote stylesheets if they want to (in a proper fashion) and make sure they inject it at the time of their choosing.

However for the single user stylesheet URL pref, I would like to eliminate the remote loading capability.

Are there any objections to this change?

dave
(hy...@apple.com)

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to