Bug 73573 - [test case] khtml doesn't render tr with display: inline (regression)
Summary: [test case] khtml doesn't render tr with display: inline (regression)
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-26 23:18 UTC by Pedro Celestino Reis Rodrigues
Modified: 2004-02-23 15:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
A complete example (597 bytes, text/html)
2004-01-26 23:20 UTC, Pedro Celestino Reis Rodrigues
Details
test case (102 bytes, text/html)
2004-02-16 22:02 UTC, Stephan Kulow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Celestino Reis Rodrigues 2004-01-26 23:18:07 UTC
Version:           3.2.0 (using KDE 3.2.0 RC1, compiled sources)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.6.0-1mdk

if a table row like this is present
  <TR id="idContr" style="display: inline">
it is not rendered
if the : is removed like follows
  <TR id="idContr" style="display inline">
it is rendered
Comment 1 Pedro Celestino Reis Rodrigues 2004-01-26 23:20:13 UTC
Created attachment 4368 [details]
A complete example
Comment 2 Pedro Celestino Reis Rodrigues 2004-01-26 23:22:39 UTC
It works fine in kde 3.1.3
Comment 3 Sashmit Bhaduri 2004-01-27 06:49:57 UTC
confirmed with a few days old head
Comment 4 Stephan Kulow 2004-02-16 22:02:46 UTC
Created attachment 4741 [details]
test case

it's already way too complicated.

Interesting side note: safari got the same regression
Comment 5 Stephan Kulow 2004-02-23 15:54:42 UTC
CVS commit by coolo: 

fixing #73573 (reviewed by Dirk - suggested by Dave and Germain)
CCMAIL: 73573-done@bugs.kde.org


  M +5 -0      ChangeLog   1.214
  M +4 -15     rendering/render_inline.cpp   1.6


--- kdelibs/khtml/ChangeLog  #1.213:1.214
@@ -1,2 +1,7 @@
+2004-02-23  Stephan Kulow  <coolo@kde.org>
+
+        * rendering/render_inline.cpp: check if the containingBlock is displayed 
+        as block before using it as continuation (#73573)
+
 2004-02-22  Frerich Raabe  <raabe@kde.org>
 

--- kdelibs/khtml/rendering/render_inline.cpp  #1.5:1.6
@@ -197,9 +197,8 @@ void RenderInline::splitFlow(RenderObjec
                              RenderObject* newChild, RenderFlow* oldCont)
 {
-    RenderBlock *pre = 0;
-    RenderStyle* newStyle = 0;
+    RenderBlock* pre = 0;
     RenderBlock* block = containingBlock();
     bool madeNewBeforeBlock = false;
-    if (block->isAnonymous()) {
+    if (block->isAnonymous() && block->style()->display() == BLOCK) {
         // We can reuse this block and make it the preBlock of the next continuation.
         pre = block;
@@ -208,19 +207,9 @@ void RenderInline::splitFlow(RenderObjec
     else {
         // No anonymous block available for use.  Make one.
-        newStyle = new RenderStyle();
-        newStyle->inheritFrom(block->style());
-        newStyle->setDisplay(BLOCK);
-        pre = new (renderArena()) RenderBlock(document() /* anonymous */);
-        pre->setStyle(newStyle);
-        pre->setChildrenInline(true);
+        pre = block->createAnonymousBlock();
         madeNewBeforeBlock = true;
     }
 
-    newStyle = new RenderStyle();
-    newStyle->inheritFrom(block->style());
-    newStyle->setDisplay(BLOCK);
-    RenderBlock *post = new (renderArena()) RenderBlock(document() /* anonymous */);
-    post->setStyle(newStyle);
-    post->setChildrenInline(true);
+    RenderBlock* post = block->createAnonymousBlock();
 
     RenderObject* boxFirst = madeNewBeforeBlock ? block->firstChild() : pre->nextSibling();