[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:29:33 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c64f9fc3f839964508789f02c58ab21350b6fc7d
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 14 01:25:59 2003 +0000

    	This is a fix to stop creating textruns for the whitespace at the
    	end of a block.  This is a major line layout bug that leads to the
    	height of the last line in a paragraph being wrong, especially when
    	<font> tags are used.
    
    	Example of the problem:
    	  <div><nobr>foo</nobr> </div>
    
    	The whitespace between the </nobr> and the end of the </div> was
    	being counted when it should have been stripped.  The problem was
    	an off-by-one error with the endpoint I set up.  I used a position
    	of 0, which is inclusive, so I needed a new value that meant
    	"Stop on this object and don't include any of it."  I'm using
    	UINT_MAX as this special value for the position.
    
            Reviewed by john
    
            * khtml/rendering/bidi.cpp:
            * khtml/rendering/bidi.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3827 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 9473961..fc036ae 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,25 @@
+2003-03-13  David Hyatt  <hyatt at apple.com>
+
+	This is a fix to stop creating textruns for the whitespace at the
+	end of a block.  This is a major line layout bug that leads to the
+	height of the last line in a paragraph being wrong, especially when
+	<font> tags are used.
+
+	Example of the problem:
+	  <div><nobr>foo</nobr> </div>
+
+	The whitespace between the </nobr> and the end of the </div> was
+	being counted when it should have been stripped.  The problem was
+	an off-by-one error with the endpoint I set up.  I used a position
+	of 0, which is inclusive, so I needed a new value that meant
+	"Stop on this object and don't include any of it."  I'm using
+	UINT_MAX as this special value for the position.
+	
+        Reviewed by john
+
+        * khtml/rendering/bidi.cpp:
+        * khtml/rendering/bidi.h:
+
 2003-03-13  Darin Adler  <darin at apple.com>
 
         Reviewed by Dave.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 9473961..fc036ae 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,25 @@
+2003-03-13  David Hyatt  <hyatt at apple.com>
+
+	This is a fix to stop creating textruns for the whitespace at the
+	end of a block.  This is a major line layout bug that leads to the
+	height of the last line in a paragraph being wrong, especially when
+	<font> tags are used.
+
+	Example of the problem:
+	  <div><nobr>foo</nobr> </div>
+
+	The whitespace between the </nobr> and the end of the </div> was
+	being counted when it should have been stripped.  The problem was
+	an off-by-one error with the endpoint I set up.  I used a position
+	of 0, which is inclusive, so I needed a new value that meant
+	"Stop on this object and don't include any of it."  I'm using
+	UINT_MAX as this special value for the position.
+	
+        Reviewed by john
+
+        * khtml/rendering/bidi.cpp:
+        * khtml/rendering/bidi.h:
+
 2003-03-13  Darin Adler  <darin at apple.com>
 
         Reviewed by Dave.
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 9d7aa81..a8bcc31 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -459,12 +459,13 @@ static void appendRunsForObject(int start, int end, RenderObject* obj)
         // An end midpoint has been encounted within our object.  We
         // need to go ahead and append a run with our endpoint.
         if (int(nextMidpoint.pos+1) <= end) {
-            addRun(new (obj->renderArena())
-                   BidiRun(start, nextMidpoint.pos+1, obj, context, dir));
             betweenMidpoints = true;
-            int nextPos = nextMidpoint.pos+1;
             sCurrMidpoint++;
-            return appendRunsForObject(nextPos, end, obj);
+            if (nextMidpoint.pos != UINT_MAX) { // UINT_MAX means stop at the object and don't include any of it.
+                addRun(new (obj->renderArena())
+                    BidiRun(start, nextMidpoint.pos+1, obj, context, dir));
+                return appendRunsForObject(nextMidpoint.pos+1, end, obj);
+            }
         }
         else
            addRun(new (obj->renderArena()) BidiRun(start, end, obj, context, dir));
@@ -1808,7 +1809,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start)
             BidiIterator endMid;
             endMid.obj = trailingSpaceObject;
             RenderText* text = static_cast<RenderText *>(trailingSpaceObject);
-            endMid.pos = text->length() >=2 ? text->length() - 2 : 0;
+            endMid.pos = text->length() >=2 ? text->length() - 2 : UINT_MAX;
             addMidpoint(endMid);
         }
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list