[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 08:31:15 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ee1bcae7e5c0b55b90b53a7eb8ea339ff2dd81b6
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Mar 29 21:36:04 2004 +0000

    	Followup fix.  Handle the case where a hard line break occurs right after a soft hyphen.  In this
    	case we were losing a letter of the word in addition to not rendering the soft hyphen.
    
            Reviewed by kocienda
    
            * khtml/rendering/bidi.cpp:
            (khtml::checkMidpoints):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 69e5681..122336e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,15 @@
 2004-03-29  David Hyatt  <hyatt at apple.com>
 
+	Followup fix.  Handle the case where a hard line break occurs right after a soft hyphen.  In this
+	case we were losing a letter of the word in addition to not rendering the soft hyphen.
+	
+        Reviewed by kocienda
+
+        * khtml/rendering/bidi.cpp:
+        (khtml::checkMidpoints):
+
+2004-03-29  David Hyatt  <hyatt at apple.com>
+
 	Fix for 3604154, support soft hyphens when rendering.  This patch implements soft hyphen support that
 	matches IE6 on Windows and Opera 7.  Soft hyphens that don't break lines end up getting collapsed away.
 	Only if the hyphen breaks a line does it render.
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 7dc8090..5c2205a 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -461,8 +461,16 @@ static void checkMidpoints(BidiIterator& lBreak, BidiState &bidi)
         if (currpoint == lBreak) {
             // We hit the line break before the start point.  Shave off the start point.
             sNumMidpoints--;
-            if (endpoint.obj->style()->whiteSpace() != PRE)
+            if (endpoint.obj->style()->whiteSpace() != PRE) {
+                if (endpoint.obj->isText()) {
+                    // Don't shave a character off the endpoint if it was from a soft hyphen.
+                    RenderText* textObj = static_cast<RenderText*>(endpoint.obj);
+                    if (endpoint.pos+1 < textObj->length() &&
+                        textObj->text()[endpoint.pos+1].unicode() == SOFT_HYPHEN)
+                        return;
+                }
                 endpoint.pos--;
+            }
         }
     }    
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list