SVN commit 661693 by carewolf: Coalesce inline generated content with inline children, even when children are in all non-inline state. CCBUG: 143742 M +17 -15 render_container.cpp --- branches/KDE/3.5/kdelibs/khtml/rendering/render_container.cpp #661692:661693 @@ -388,11 +388,13 @@ assert(child->isRenderBlock() || child->isRenderInline()); return static_cast(child); } - else - { // check continuations + if (type == RenderStyle::AFTER) { + // check continuations if (continuation()) return continuation()->pseudoContainer(type); } + if (child && child->isAnonymousBlock()) + return static_cast(child)->pseudoContainer(type); return 0; } @@ -401,22 +403,22 @@ RenderStyle::PseudoId type = child->style()->styleType(); switch (type) { case RenderStyle::AFTER: { - RenderObject *l = 0; - if (isRenderInline()) { - RenderObject *c = continuation(); - while (c) { - l = c; - c = c->continuation(); - } - } - if (l) - l->addChild(child, 0); - else - addChild(child, 0); + RenderObject *o = this; + while (o->continuation()) o = o->continuation(); + + // Coalesce inlines + if (child->style()->display() == INLINE && o->lastChild() && o->lastChild()->isAnonymousBlock()) { + o->lastChild()->addChild(child, 0); + } else + o->addChild(child, 0); break; } case RenderStyle::BEFORE: - addChild(child, firstChild()); + // Coalesce inlines + if (child->style()->display() == INLINE && firstChild() && firstChild()->isAnonymousBlock()) { + firstChild()->addChild(child, firstChild()->firstChild()); + } else + addChild(child, firstChild()); break; case RenderStyle::REPLACED: addChild(child, pseudoContainer(RenderStyle::AFTER));