Bug 70080 - [test case] www.linuxfromscratch.org/lfs/news.html has buggy list behavior
Summary: [test case] www.linuxfromscratch.org/lfs/news.html has buggy list behavior
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-11 02:25 UTC by jeroen
Modified: 2005-10-30 00:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jeroen 2003-12-11 02:25:34 UTC
Version:            (using KDE KDE 3.1.94)
Installed from:    Compiled From Sources
Compiler:          gcc-3.2.3 
OS:          Linux

Select the "Two Columns" layout (default). 
The top navigation links (LFS, Beyond LFS, etc) has display: inline to generate a horizontal menu. However, when the page is reloaded by selecting a different stylesheet, the list changes to a vertical list. Example: http://linuxfromscratch.org/~jeroen/konqueror/konq_buggy_blfs.png (120Kb)
Note that the stylesheet selection list also became a vertical list. This behavior is sometimes also triggered by just navigating the site. I can't always reproduce it though, and reloading the page completely sometimes fixes it. 

Second problem is the right navigation list. The links in this list aren't clickable at all in the "Two Columns" and "Two columns, menu" layouts. The content left of it has "float: left; clear: both; width: 70%;" so the links just fill the remainder of the right side. It appears that it has a lower z-index, although making it higher doesn't fix the problem. The links can be followed by tabbing to them though. Possibly related to this is the giant gap between the top newscolumns and the bottom "Latest CVS Changes". Screenshot at http://linuxfromscratch.org/~jeroen/konqueror/konq_buggy_blfs2.png (35Kb).
Comment 1 Stephan Kulow 2004-01-28 20:22:30 UTC
hmm, it seems to work fine for me with KDE 3.2

If you still see problems, please report them with reduced test case.
Comment 2 jeroen 2004-01-30 12:30:32 UTC
Testcase on http://www.linuxfromscratch.org/~jeroen/konq32navbug/
KDE-CVS from 26-02-2004
The list should be displayed horizontally yet appears vertically, and sometimes horizontally on two lines. The issue is apparantly fixed if I do any of the following:
- remove the reference to the styleswitcher
- move the CSS into the HTML
- remove the Title= from the style link
Comment 3 jeroen 2004-01-30 12:46:14 UTC
Testcase for the second problem at http://linuxfromscratch.org/~jeroen/konq32navbug/floatbug.html

The links next to the paragraph are unclickable, while they should function as normal links.
Comment 4 Stephan Kulow 2004-01-30 14:03:18 UTC
Hmm, your #3 test case works fine for me. And the #2 sometimes works, sometimes doesn't
Comment 5 jeroen 2004-01-30 14:44:57 UTC
You mean that the links in the float example work fine for you? Is that in the 3.2 branch or in head? Is it possible to backport this fix to the 3.2 branch? See  http://linuxfromscratch.org/pipermail/website/2004-January/002201.html for confirmation of the first testcase. 
Comment 6 zblob 2004-01-30 16:45:18 UTC
The second problem in the original post and testcase in #3 indeed seem to be solved for me as well in cvs HEAD of 20040126, it wasn't a few days before this build.

Testcase in #2 (which has a wrong url, remove the www.) always appears vertically to me. The first problem in the original bug report also still exists, switching between all vertically (getting under the image) or on 2 lines (with the second line under the image)
Comment 7 fraser 2004-02-23 02:33:55 UTC
Just noticed the same unclickable link problem myself.  It's not clear to me from the comments if this is likely to be fixed in 3.2.1, any idea?

http://www.linuxfromscratch.org/lfs/news.html

Thanks
Comment 8 Dominic Chambers 2004-03-04 10:49:35 UTC
The second test case works fine for me in KDE 3.2 -- both sets of links are clickable.

The first test case is not really valid since you are trying to fix a bug that is present in Mozilla, but that Konqueror doesn't have. Whereas Mozilla supports alternate stylesheets in a stupid way (it forgets your choice as soon as you go to another page), Konqueror has sensible support for alternate stylesheets (you select a prefereed stylesheet and that is used until you change your mind and select another).

The strange results you are seeing is because you are fighting Konqueror about stylesheet selection which you don't need to do. If you just make your javascript fix Mozilla only, everything will work fine.
Comment 9 zblob 2004-03-04 16:14:32 UTC
The first test case is not about the stylesheets itself, but about the way the choice is represented. The options should be placed on one line horizontally, yet they are displayed vertically and sometimes even partially horizontally and partially vertically
Not only the stylesheet selection, but also the top navigation has the problem on the original website.
Comment 10 Dominic Chambers 2004-03-04 17:13:20 UTC
Yes, but I believe that this is caused by the stylesheet script fighting with Konqueror. I believe this is why the problem occurs only intermitently -- I am guessing the clash occurs mid-render, leading to undefined behaviour. I admit I haven't actually performed a reduction, but there were lot of clues I quickly noticed, and Jeroen did too.

He says that the problem goes away if you do any of the following:
 1. remove the reference to the styleswitcher 
 2. move the CSS into the HTML 
 3. remove the Title= from the style link 

I interpreted this as:
 1. no script, no problems.
 2. ditto -- this nullifies the script since the stylesheet it wishes to
    elect as the default no longer exists.
 3. same as above -- removing the title makes it a persistent stylesheet
    rather than a preffered or alternate stylesheet, so the script has
    no effect.

I additionally noticed that moving the javascript into the HTML rather than linking it externally stops the problem too. I interpreted this as meaning that the the problem requires the right timing conditions (the randomness of the effect shows this is likely), and setting the preferred stylesheet before rendering occurs (inline script) rather than during rendering (external script) is probably what triggers the problem.

While I was lazy and didn't do a reduction, I guessed the following conclusions:

 1. There is a bug with setPreferedStylesheet() -- undefined behaviour if it
    is used midway through a screen render
 2. Setting a new preferred stylesheet during page load is never necesarry in
    Konqueror since it has this elementary logic built right in.

On hindsight, just because something is never necesarry, doesn't mean the bug is not important. Perhaps I will create a reduction for this to proove the case if I have some extra time.

Hope that helps.
Comment 11 Stephan Kulow 2004-11-12 14:45:26 UTC
just for reference: we're talking about #2
Comment 12 Allan Sandfeld 2004-12-12 23:23:44 UTC
CVS commit by carewolf: 

Make lists more "boxy" by flowing around floats.
BUG: 70080


  M +2 -1      html4.css   1.140


--- kdelibs/khtml/css/html4.css  #1.139:1.140
@@ -274,4 +274,5 @@
         margin: 1__qem 0 1em 0;
         padding-left: 40px;
+        -khtml-flow-mode: -khtml-around-floats
 }
 
@@ -281,9 +282,9 @@
         margin: 1__qem 0 1em 0;
         padding-left: 40px;
+        -khtml-flow-mode: -khtml-around-floats
 }
 
 LI {
         display: list-item;
-        -khtml-flow-mode: -khtml-around-floats
 }
 


Comment 13 Allan Sandfeld 2004-12-30 16:36:07 UTC
I reverted the fix, because it was wrong.
Comment 14 Germain Garand 2005-10-18 23:12:30 UTC
testcase of remaining problem (#2) is no longer available (404)...
To reporter: can you please attach it here?
Comment 15 Germain Garand 2005-10-30 00:48:11 UTC
no response from reporter, testcase unavailable.