Bug 123830 - window content not updating after horizontal scrolling
Summary: window content not updating after horizontal scrolling
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandriva RPMs IRIX
: NOR normal (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-18 08:30 UTC by Andrey Borzenkov
Modified: 2006-06-22 09:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Initial display (153.59 KB, image/png)
2006-03-18 08:31 UTC, Andrey Borzenkov
Details
Scrolling to the right (135.29 KB, image/png)
2006-03-18 08:32 UTC, Andrey Borzenkov
Details
Copy of the example page (24.48 KB, text/html)
2006-03-18 08:33 UTC, Andrey Borzenkov
Details
patch (741 bytes, patch)
2006-03-18 14:23 UTC, Germain Garand
Details
test case (3.19 KB, text/html)
2006-06-21 15:08 UTC, Germain Garand
Details
test case (3.19 KB, text/html)
2006-06-21 15:17 UTC, Germain Garand
Details
new patch (2.30 KB, patch)
2006-06-21 15:21 UTC, Germain Garand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Borzenkov 2006-03-18 08:30:45 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Mandriva RPMs
OS:                Irix

Using resolution 1024x768 with 9pt default fonts. Attached page (704.html) initially displays with horizontal scroll bar; but when I scroll window to the right, hidden text is neither displayed nor wrapped. The same is easily reproducible with copy of page I attach (original requires registration).
Comment 1 Andrey Borzenkov 2006-03-18 08:31:54 UTC
Created attachment 15178 [details]
Initial display
Comment 2 Andrey Borzenkov 2006-03-18 08:32:48 UTC
Created attachment 15179 [details]
Scrolling to the right
Comment 3 Andrey Borzenkov 2006-03-18 08:33:29 UTC
Created attachment 15180 [details]
Copy of the example page
Comment 4 Germain Garand 2006-03-18 14:10:30 UTC
Looks like a table quirk to me. Floats always ought to size to max width.
Comment 5 Germain Garand 2006-03-18 14:23:17 UTC
Created attachment 15184 [details]
patch

and a quirk it is...
Comment 6 Germain Garand 2006-06-21 15:00:56 UTC
ha, that first try was quite wrong. The real quirk is more subtle.

All non-khtml based engines reflow floated tables in quirk mode to try to fit within linewidth, instead of using shrink-wrap algorithm.

Will attach testcase.
Comment 7 Germain Garand 2006-06-21 15:08:40 UTC
Created attachment 16739 [details]
test case

All floated objects are tables, except
the blue container at bottom which contains floated divs.
Comment 8 Germain Garand 2006-06-21 15:17:49 UTC
Created attachment 16740 [details]
test case

All floated objects are tables, except
the blue container at bottom which contains floated divs.
Comment 9 Germain Garand 2006-06-21 15:21:42 UTC
Created attachment 16741 [details]
new patch
Comment 10 Germain Garand 2006-06-22 09:44:06 UTC
SVN commit 553805 by ggarand:

implement floating auto-width table quirk

BUG: 123830

tests/floats/table-quirk.html



 M  +8 -0      ChangeLog  
 M  +20 -0     rendering/render_block.cpp  


--- branches/KDE/3.5/kdelibs/khtml/ChangeLog #553804:553805
@@ -1,3 +1,11 @@
+2006-06-22  Germain Garand  <germain@ebooksfrance.org>
+
+        Implement floating auto-width table quirk
+
+        * rendering/render_block.cpp (positionNewFloats): in quirkmode, floated auto-width
+        tables try to fit within remaining linewidth, so look for minWidth, and relayout if 
+        position found ends up being narrower than current table width.
+
 2006-06-20  Germain Garand  <germain@ebooksfrance.org>
 
         Don't let a float serie grow an object's maxwidth beyond the available width
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #553804:553805
@@ -1872,6 +1872,12 @@
         int lo = leftOffset(); // Constant part of left offset.
         int fwidth = f->width; // The width we look for.
                                //kdDebug( 6040 ) << " Object width: " << fwidth << " available width: " << ro - lo << endl;
+
+        // in quirk mode, floated auto-width tables try to fit within remaining linewidth
+        bool ftQuirk = o->isTable() && style()->htmlHacks() && o->style()->width().isVariable();
+        if (ftQuirk)
+            fwidth = kMin( o->minWidth()+o->marginLeft()+o->marginRight(), fwidth );
+
         if (ro - lo < fwidth)
             fwidth = ro - lo; // Never look for more than what will be available.
 
@@ -1894,6 +1900,13 @@
                     fx = leftRelOffset(y,lo, false, &heightRemainingLeft);
                 }
             }
+            if (ftQuirk && (rightRelOffset(y,ro, false)-fx < f->width)) {
+                o->setPos( o->xPos(), y + o->marginTop() );
+                o->setChildNeedsLayout(true, false);
+                o->layoutIfNeeded();
+                _height = o->height() + o->marginTop() + o->marginBottom();
+                f->width = o->width() + o->marginLeft() + o->marginRight();
+            }
             if (fx<0) fx=0;
             f->left = fx;
             //kdDebug( 6040 ) << "positioning left aligned float at (" << fx + o->marginLeft()  << "/" << y + o->marginTop() << ") fx=" << fx << endl;
@@ -1912,6 +1925,13 @@
                     fx = rightRelOffset(y,ro, false, &heightRemainingRight);
                 }
             }
+            if (ftQuirk && (fx - leftRelOffset(y,lo, false) < f->width)) {
+                o->setPos( o->xPos(), y + o->marginTop() );
+                o->setChildNeedsLayout(true, false);
+                o->layoutIfNeeded();
+                _height = o->height() + o->marginTop() + o->marginBottom();
+                f->width = o->width() + o->marginLeft() + o->marginRight();
+            }
             if (fx<f->width) fx=f->width;
             f->left = fx - f->width;
             //kdDebug( 6040 ) << "positioning right aligned float at (" << fx - o->marginRight() - o->width() << "/" << y + o->marginTop() << ")" << endl;