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).
Created attachment 15178 [details] Initial display
Created attachment 15179 [details] Scrolling to the right
Created attachment 15180 [details] Copy of the example page
Looks like a table quirk to me. Floats always ought to size to max width.
Created attachment 15184 [details] patch and a quirk it is...
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.
Created attachment 16739 [details] test case All floated objects are tables, except the blue container at bottom which contains floated divs.
Created attachment 16740 [details] test case All floated objects are tables, except the blue container at bottom which contains floated divs.
Created attachment 16741 [details] new patch
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;