Summary: | Webkit (in Konqueror) ignores custom css files. | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kwebkitpart | Reporter: | Peter Lewis <pete> |
Component: | general | Assignee: | webkit-devel |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | adawit, dap78, davidpjames |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kwebkitpart/292f32fda933b2ead5a61ff1ec457f839fad5c85 | Version Fixed In: | 1.4 (kwebkitpart) |
Sentry Crash Report: | |||
Attachments: | Testcase for custom CSS Webkit |
Description
Peter Lewis
2010-08-03 12:38:27 UTC
SVN commit 1158765 by adawit: Use the user-defined style sheet if present. CCBUG: 246599 M +8 -3 webkitsettings.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1158765 The above commit should allow you to specify your own custom (user-defined) CSS file under Konqueror's settings dialog (Web Browsing->Appearance->Stylesheets). It is important to note that the stylesheet you use for khtml rendering engine might not necessarily produce the desired result for webkit and vise-versa. That is the reason why we do not use the default khtml CSS file (html4.css) in kwebkitpart. Let us know if the above fix works fine for you. Thanks Dawit. Yes, that works fine if I define a user-defined stylesheet in Konqueror's settings (which is probably the best way, as you point out). Thanks :-) A question though - if I select "use user defined stylesheet" rather than "use default stylesheet", am I missing some useful style information which I might want to copy from the default to my user defined one? Or will my user defined stylesheet just provide overrides? It might be helpful to clarify this in the GUI. Thanks again! (In reply to comment #3) > Thanks Dawit. > > Yes, that works fine if I define a user-defined stylesheet in Konqueror's > settings (which is probably the best way, as you point out). Thanks :-) > > A question though - if I select "use user defined stylesheet" rather than "use > default stylesheet", am I missing some useful style information which I might > want to copy from the default to my user defined one? Or will my user defined > stylesheet just provide overrides? It might be helpful to clarify this in the > GUI. Good question. Not sure because the code that handles it is upstream in qtwebkit. It needs to be investigated. I believe it simply uses its own internal version and overrides those values that are defined in the custom stylesheet. IOW, it does not simply ignore its own internal version, but that needs to be validated ofcourse... This has been completely addressed in the current development branch. In KDE 4.9.0 even the CSS config dialog in Konqueror will correctly start using the browser engine defined that was defined as the default. I'm using 4.9.5 (Fedora 18) and the custom CSS selected under settings->web browsing->appearance is ignored by WebKit (works with KHTML). The built in "accessiblity stylesheet" works with both engine. Are the changes reflected in the provided view when you change the style sheet ? Can you provide the custom stylesheet you are using ? I'm not sure what do you mean by "provided view"; The radio button and the text input field in settings dialog reflects my selection, but the current html page does not. (With KHTML the changes apply instantly when I select custom css file. Changes to the css file reflected on page reload.) My css file is very simple, just for testing: body { background-color: blue !important; } label { color: red !important; } Git commit 7e5ab58ceb0849c38592ebdde7389ffbed33f6d1 by Dawit Alemayehu. Committed on 17/02/2013 at 03:32. Pushed by adawit into branch 'master'. Make user defined custom style sheet work. FIXED-IN: 1.4 (kwebkitpart) M +1 -1 src/settings/webkitsettings.cpp http://commits.kde.org/kwebkitpart/7e5ab58ceb0849c38592ebdde7389ffbed33f6d1 Git commit 292f32fda933b2ead5a61ff1ec457f839fad5c85 by Dawit Alemayehu. Committed on 17/02/2013 at 03:32. Pushed by adawit into branch '1.3'. Make user defined custom style sheet work. FIXED-IN: 1.4 (kwebkitpart) (cherry picked from commit 7e5ab58ceb0849c38592ebdde7389ffbed33f6d1) M +1 -1 src/settings/webkitsettings.cpp http://commits.kde.org/kwebkitpart/292f32fda933b2ead5a61ff1ec457f839fad5c85 Created attachment 91276 [details]
Testcase for custom CSS Webkit
This bug appears to have reappeared, and is present in both Konqueror(Webkit) and Rekonq. I've attached a testcase that demonstrates how to make the bug appear.
|