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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/rendering
From:       Charles Samuels <charles () kde ! org>
Date:       2006-09-30 7:29:44
Message-ID: 1159601384.472557.24964.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 590440 by charles:

fix Bug 119167: page rendered incorrectly at larger font sizes

see the comment within for info

BUG:119167

now I'm gonna need to find some gauze and stop the blood from gushing out of my eyes \
and ears.



 M  +10 -3     render_block.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #590439:590440
@@ -223,15 +223,22 @@
         // punctuation and white-space
         if(oldText->l >= 1) {
             oldText->ref();
-            unsigned int length = 0;
+            // begin: we need skip leading whitespace so that \
RenderBlock::findNextLineBreak +            // won't think we're continuing from a \
previous run  +            unsigned int begin = 0; // the position that first-letter \
begins +            unsigned int length = 0; // the position that "the rest" begins
+            while ( length < oldText->l && (oldText->s+length)->isSpace() )
+                length++;
+            begin = length;
             while ( length < oldText->l &&
-                    ( (oldText->s+length)->isSpace() || \
(oldText->s+length)->isPunct()) ) +                    ( \
(oldText->s+length)->isPunct()) || (oldText->s+length)->isSpace() )  length++;
             if ( length < oldText->l &&
                     !( (oldText->s+length)->isSpace() || \
(oldText->s+length)->isPunct() ))  length++;
             while ( length < oldText->l && (oldText->s+length)->isMark() )
                 length++;
+
             // we need to generated a remainingText object even if no text is left
             // because it holds the place and style for the old textObj
             RenderTextFragment* remainingText =
@@ -246,7 +253,7 @@
             firstLetterContainer->addChild(remainingText, nextObj);
 
             RenderTextFragment* letter =
-                new (renderArena()) RenderTextFragment(remainingText->node(), \
oldText, 0, length); +                new (renderArena()) \
RenderTextFragment(remainingText->node(), oldText, begin, length-begin);  \
letter->setIsAnonymous( remainingText->isAnonymous() );  RenderStyle* newStyle = new \
RenderStyle();  newStyle->inheritFrom(pseudoStyle);


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

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