Summary: | Konqueror 3.1: first alternate CSS stylesheet replaces default stylesheet. Javascript can't change style | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Magnus Kessler <magnus.kessler> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Magnus Kessler
2003-02-09 13:49:10 UTC
I can confirm the same wrong behaviour of khtml, with 3.1.2. An easy example is in: http://www.w3.org/Style Konqueror loads "blue shadows" by default, but it shouldn't, because that's an alternate stylesheet (it's the first stylesheet linked, but that fact, must be ignored). The default selected stylesheet, must be "Gold (right, fixed) + navbar", which has the "stylesheet" value for "rel" attribute. The explanation is in the specification ;-) : http://www.w3.org/TR/1999/REC-html401-19991224/present/styles.html#style-external both examples wfm. I can confirm the same behaviour (style change has no effect) with http://frenchmozilla.org and konqueror 3.1.3 (from kdebase-3.1.3-4tex) This is odd. With Konq cvs the http://www.w3.org/Style page works as intended and you can switch between the sheets fine. However, like in bug: 63348, if you go to www.kde.org first and then to w3's style page, the style sheets do not get 'chosen' correctly. You still have the ability to view and choose each of them, but the first one that gets loaded is "Basic Page Style" -- this is the first one in the list -- not the desired "Gold (right, fixed) + navbar" style. Seems that it's a matter of Konqueror not selecting the correct style sheet when more than one is available. I think this is related. http://toast.debian.net/~jmtd/konq/index.html This test page has two link tags - the first is an alternate stylesheet, the second a normal stylesheet. Konqueror opts for the former rather than the latter. It appears konq does not make a distinction between alternate stylesheet and stylesheet, and opts for the first one it comes across in the source. Same wrong behaviour of khtml with 3.1.4 on GentooLinux I could confirm this bug with kde 3.1.4 and KDE-HEAD from 03/10/19 as well. For an example see http://www.dipe.org - just switch there the styles at the top right... With cvs-head from yesterday there seems to be still some bigger css-problems. As example just take a lookat the url given above with konqi and with moz. I guess this bug is really somewhat major cause there are more and more pages using css in replacment for blind tables, so I mark it as major :-) Subject: kdelibs/khtml CVS commit by ggarand: - as discussed on kfm-devel: add an Automatic Detection mode in the "Use Stylesheet" menu. In this mode, the preferred sheet is chosen by the document, following the standard rules of precedence. If another sheet is manually chosen, then it gains a higher precedence and overrides the document's choice, thus becoming "sticky". - for manually chosen sheets: if the wanted stylesheet is still missing after <body> has been parsed, choose the document's preferred stylesheet until parsing ends(#63348). CCMAIL: 54335-done@bugs.kde.org CCMAIL: 63348-done@bugs.kde.org M +11 -0 ChangeLog 1.112 M +8 -4 khtml_part.cpp 1.943 M +9 -4 xml/dom_docimpl.cpp 1.264 |