SVN commit 712197 by aacid: Patch by Germain Garand to fix the bug i reported yesterday, you rock ;-) In his words "The git of it is to skip positioned/floating objects while scanning for inlines." "Ported" from WebCore BUGS: 149809 M +21 -15 render_block.cpp --- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #712196:712197 @@ -385,25 +385,31 @@ // inlines yet. // // |stop| indicates a non-inclusive stop point. Regardless of whether |stop| - // is inline or not, we will not include it. It's as though we encountered + // is inline or not, we will not include it in a run with inlines before it. It's as though we encountered // a non-inline. - inlineRunStart = inlineRunEnd = 0; - - // Start by skipping as many non-inlines as we can. + RenderObject * curr = start; - while (curr && !curr->isInline()) + bool sawInline; + do { + while (curr && !(curr->isInline() || curr->isFloatingOrPositioned())) + curr = curr->nextSibling(); + + inlineRunStart = inlineRunEnd = curr; + + if (!curr) + return; // No more inline children to be found. + + sawInline = curr->isInline(); + curr = curr->nextSibling(); + while (curr && (curr->isInline() || curr->isFloatingOrPositioned()) && (curr != stop)) { + inlineRunEnd = curr; + if (curr->isInline()) + sawInline = true; + curr = curr->nextSibling(); + } + } while (!sawInline); - if (!curr) - return; // No more inline children to be found. - - inlineRunStart = inlineRunEnd = curr; - - curr = curr->nextSibling(); - while (curr && curr->isInline() && (curr != stop)) { - inlineRunEnd = curr; - curr = curr->nextSibling(); - } } void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint)