Bug 123915 - Page format display is 'overlaid'
Summary: Page format display is 'overlaid'
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: 3.5
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-19 18:37 UTC by Nick Warne
Modified: 2006-09-26 20:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test case (212 bytes, text/html)
2006-03-20 09:29 UTC, Tommi Tervo
Details
Typographical change slightly to get rendering correct. (620 bytes, text/html)
2006-03-20 19:14 UTC, Nick Warne
Details
Cleaner test case (348 bytes, text/html)
2006-08-04 20:11 UTC, Allan Sandfeld
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Warne 2006-03-19 18:37:21 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
Compiler:          gcc version 3.3.4 -march=athlon-tbird
OS:                Linux

This page:

http://ffmpeg.sourceforge.net/ffmpeg-doc.html

scroll down to section '3.8 FFmpeg formula evaluator'

Some of the functions in the lists get displayed on top of each other.

This page displays OK in Epiphany, lynx and Firefox.

Nick
Comment 1 Tommi Tervo 2006-03-20 09:29:23 UTC
Created attachment 15216 [details]
test case

Simple test case. Weird one.
Comment 2 Nick Warne 2006-03-20 19:14:49 UTC
Created attachment 15223 [details]
Typographical change slightly to get rendering correct.

It looks like the 'raw' functions are being taken as that i.e. cos(x) is being
taken as a value of sorts?  The only one that is different to fix than the rest
is having to add 'sin (x1)' as opposed to just a space between 'sin' and the
leading '('.

But as you say, weird.

Nick
Comment 3 Nick Warne 2006-08-04 19:36:29 UTC
This is still apparent in KDE 3.5.4

Nick
Comment 4 Allan Sandfeld 2006-08-04 20:11:53 UTC
Created attachment 17227 [details]
Cleaner test case

The problem is display:compact elements that tries to fit into the margin of
empty collapsed blocks.
Comment 5 Charles Samuels 2006-09-26 08:24:52 UTC
SVN commit 588483 by charles:

Fix 123915: Page format display is 'overlaid'
BUG:123915

When a compact was compacted with a block that has a height less than it,
only the height of its neighboring block was considered when calculating
the height of that line.

Coming: updated baseline



 M  +14 -0     render_block.cpp  
 M  +1 -0      render_block.h  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #588482:588483
@@ -916,6 +916,18 @@
     return 0;
 }
 
+void RenderBlock::adjustSizeForCompactIfNeeded(RenderObject* child, CompactInfo& compactInfo)
+{
+    // if the compact is bigger than the block it was run into
+    // then "this" block should take the height of the compact
+    if (compactInfo.matches(child)) {
+        // We have a compact child to squeeze in.
+        RenderObject* compactChild = compactInfo.compact();
+        if (compactChild->height() > child->height())
+            m_height += compactChild->height() - child->height();
+    } 
+}
+
 void RenderBlock::insertCompactIfNeeded(RenderObject* child, CompactInfo& compactInfo)
 {
     if (compactInfo.matches(child)) {
@@ -949,6 +961,7 @@
         child->style()->setLineHeight( newLineHeight );
         child->setNeedsLayout( true, false );
         child->layout();
+
         compactChild->setPos(compactXPos, compactYPos); // Set the x position.
         compactInfo.clear();
     }
@@ -1417,6 +1430,7 @@
         // Now place the child in the correct horizontal position
         determineHorizontalPosition(child);
 
+        adjustSizeForCompactIfNeeded(child, compactInfo);
         // Update our height now that the child has been placed in the correct position.
         m_height += child->height();
 
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.h #588482:588483
@@ -330,6 +330,7 @@
     RenderObject* handleRunInChild(RenderObject* child, bool& handled);
     void collapseMargins(RenderObject* child, MarginInfo& marginInfo, int yPosEstimate);
     void clearFloatsIfNeeded(RenderObject* child, MarginInfo& marginInfo, int oldTopPosMargin, int oldTopNegMargin);
+    void adjustSizeForCompactIfNeeded(RenderObject* child, CompactInfo& compactInfo);
     void insertCompactIfNeeded(RenderObject* child, CompactInfo& compactInfo);
     int estimateVerticalPosition(RenderObject* child, const MarginInfo& info);
     void determineHorizontalPosition(RenderObject* child);
Comment 6 Nick Warne 2006-09-26 20:10:46 UTC
Thank you!  This works perfectly!

Good job -)

Nick