| Summary: | Page format display is 'overlaid' | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Nick Warne <nick> |
| Component: | khtml renderer | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.5 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
test case
Typographical change slightly to get rendering correct. Cleaner test case |
||
|
Description
Nick Warne
2006-03-19 18:37:21 UTC
Created attachment 15216 [details]
test case
Simple test case. Weird one.
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
This is still apparent in KDE 3.5.4 Nick Created attachment 17227 [details]
Cleaner test case
The problem is display:compact elements that tries to fit into the margin of
empty collapsed blocks.
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);
Thank you! This works perfectly! Good job -) Nick |