diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-02 18:38:22 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-02 18:40:04 -0500 |
commit | cc5fd88be313142d3996c81f8bdfc1290485858c (patch) | |
tree | 36c6e1eef900d0ef1aa05e96d786194b4c5674d9 /tdehtml/rendering/render_block.cpp | |
parent | 2c850d93a7803e435504fe9c982cb974695d7a3b (diff) | |
download | tdelibs-cc5fd88be313142d3996c81f8bdfc1290485858c.tar.gz tdelibs-cc5fd88be313142d3996c81f8bdfc1290485858c.zip |
Don't use insane (negative) layout values if layout engine does not allocate sufficient space for a text string
This resolves Bug 1950
Make most debugging statements work again
Add new debugging statements
Fix several annoying build warnings
Diffstat (limited to 'tdehtml/rendering/render_block.cpp')
-rw-r--r-- | tdehtml/rendering/render_block.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tdehtml/rendering/render_block.cpp b/tdehtml/rendering/render_block.cpp index 82d99cf41..053e51b95 100644 --- a/tdehtml/rendering/render_block.cpp +++ b/tdehtml/rendering/render_block.cpp @@ -230,11 +230,9 @@ void RenderBlock::updateFirstLetter() while ( length < oldText->l && (oldText->s+length)->isSpace() ) length++; begin = length; - while ( length < oldText->l && - ( (oldText->s+length)->isPunct()) || (oldText->s+length)->isSpace() ) + while ( (length < oldText->l && ( (oldText->s+length)->isPunct())) || (oldText->s+length)->isSpace() ) length++; - if ( length < oldText->l && - !( (oldText->s+length)->isSpace() || (oldText->s+length)->isPunct() )) + if ( length < oldText->l && !( (oldText->s+length)->isSpace() || (oldText->s+length)->isPunct() )) length++; while ( length < oldText->l && (oldText->s+length)->isMark() ) length++; @@ -1466,6 +1464,10 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren ) m_overflowHeight = kMax(effY + child->effectiveHeight(), m_overflowHeight); m_overflowTop = kMin(effY, m_overflowTop); +#ifdef PAGE_DEBUG + kdDebug(6040) << renderName() << "(RenderBlock)::layoutBlockChildren(" << relayoutChildren << ") effX: " << effX << " effY: " << effY << " child: " << child << " child->effectiveWidth(): " << child->effectiveWidth() << " child->effectiveHeight(): " << child->effectiveHeight() << endl; +#endif + // Insert our compact into the block margin if we have one. insertCompactIfNeeded(child, compactInfo); @@ -2168,6 +2170,9 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSel } } +#ifdef PAGE_DEBUG + kdDebug(6040) << renderName() << "(RenderBlock)::rightmostPosition(" << includeOverflowInterior << "," << includeSelf << ") Rightmost position: " << right << " overflow width: " << m_overflowWidth << endl; +#endif return right; } @@ -2184,6 +2189,9 @@ int RenderBlock::rightmostAbsolutePosition() const int rp = r->xPos() + r->rightmostPosition(false); right = kMax(right, rp); } +#ifdef PAGE_DEBUG + kdDebug(6040) << renderName() << " Rightmost absolute position: " << right << endl; +#endif return right; } |