[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/rendering
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2007-05-06 11:58:57
Message-ID: 1178452737.564123.22279.nullmailer () svn ! kde ! org
[Download RAW message or body]

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<RenderContainer*>(child);
     }
-    else
-    {   // check continuations
+    if (type == RenderStyle::AFTER) {
+        // check continuations
         if (continuation())
             return continuation()->pseudoContainer(type);
     }
+    if (child && child->isAnonymousBlock())
+        return static_cast<RenderBlock*>(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));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic