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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:19:31 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 2028aa443877128300a3c909fb7ccb83b8098c6e
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 14 21:14:16 2003 +0000

            Fix for 3139120.  This patch was contributed by Mitz Pettel.  It correctly
            handles the visually ordered encodings.  The patch also picks up changes
            from kde that accounts for european numbers correctly in bidiReorderLine().
    
            Reviewed by Dave.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3319 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6ad4158..23c67d8 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2003-01-13  Richard Williamson   <rjw at apple.com>
+
+        Fix for 3139120.  This patch was contributed by Mitz Pettel.  It correctly
+        handles the visually ordered encodings.  The patch also picks up changes
+        from kde that accounts for european numbers correctly in bidiReorderLine().
+        
+        Reviewed by Dave.
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLFormElementImpl::formData):
+        * khtml/misc/decoder.cpp:
+        (Decoder::setEncoding):
+        * khtml/rendering/bidi.cpp:
+        (RenderFlow::bidiReorderLine):
+        * khtml/rendering/bidi.h:
+
 2003-01-13  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6ad4158..23c67d8 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-01-13  Richard Williamson   <rjw at apple.com>
+
+        Fix for 3139120.  This patch was contributed by Mitz Pettel.  It correctly
+        handles the visually ordered encodings.  The patch also picks up changes
+        from kde that accounts for european numbers correctly in bidiReorderLine().
+        
+        Reviewed by Dave.
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLFormElementImpl::formData):
+        * khtml/misc/decoder.cpp:
+        (Decoder::setEncoding):
+        * khtml/rendering/bidi.cpp:
+        (RenderFlow::bidiReorderLine):
+        * khtml/rendering/bidi.h:
+
 2003-01-13  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index ae08d23..71eeb82 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -245,11 +245,6 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
     if(!codec)
         codec = QTextCodec::codecForLocale();
 
-    // we need to map visual hebrew to logical hebrew, as the web
-    // server alsways expects responses in logical ordering
-    if ( codec->mibEnum() == 11 )
-	codec = QTextCodec::codecForMib( 85 );
-
 #if APPLE_CHANGES
     QString encCharset = codec->name();
     QChar encChars[encCharset.length()];
diff --git a/WebCore/khtml/misc/decoder.cpp b/WebCore/khtml/misc/decoder.cpp
index 227ec60..0517ff3 100644
--- a/WebCore/khtml/misc/decoder.cpp
+++ b/WebCore/khtml/misc/decoder.cpp
@@ -303,13 +303,14 @@ void Decoder::setEncoding(const char *_encoding, bool force)
 #endif
     bool b;
     m_codec = KGlobal::charsets()->codecForName(enc, b);
-#if !APPLE_CHANGES
+
     if(m_codec->mibEnum() == 11)  {
-        // iso8859-8 (visually ordered)
-        m_codec = QTextCodec::codecForName("iso8859-8-i");
-        visualRTL = true;
+        // visually ordered unless one of the following
+        if( !(enc == "iso-8859-8-i" || enc == "iso_8859-8-i"
+                || enc == "csiso88598i" || enc == "logical") )
+            visualRTL = true;
     }
-#endif
+
     if( !b ) // in case the codec didn't exist, we keep the old one (fixes some sites specifying invalid codecs)
 	m_codec = old;
     else
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index ab220f1..ecbdcff 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -491,6 +491,8 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                             else
                                 eor = last;
                             appendRun();
+                            dir = QChar::DirL;
+                            status.eor = QChar::DirL;
                         } else {
                             if(status.eor == QChar::DirR) {
                                 appendRun();
@@ -572,8 +574,8 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                     case QChar::DirET:
 			if ( status.lastStrong == QChar::DirR || status.lastStrong == QChar::DirAL ) {
 			    appendRun();
-			    dir = QChar::DirAN;
-			    status.eor = QChar::DirAN;
+                            dir = QChar::DirEN;
+                            status.eor = QChar::DirEN;
 			}
 			// fall through
                     case QChar::DirEN:
@@ -586,7 +588,7 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                     case QChar::DirAN:
                         appendRun();
 			status.eor = QChar::DirEN;
-                        dir = QChar::DirAN; break;
+                        dir = QChar::DirEN; break;
                     case QChar::DirES:
                     case QChar::DirCS:
                         if(status.eor == QChar::DirEN) {
@@ -601,7 +603,8 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                             // neutrals go to R
                             eor = last;
                             appendRun();
-                            dir = QChar::DirAN;
+                            dir = QChar::DirEN;
+                            status.eor = QChar::DirEN;
                         }
                         else if( status.eor == QChar::DirL ||
                                  (status.eor == QChar::DirEN && status.lastStrong == QChar::DirL)) {
@@ -613,7 +616,8 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                                 eor = last;
                                 dir = QChar::DirR;
                                 appendRun();
-                                dir = QChar::DirAN;
+                                dir = QChar::DirEN;
+                                status.eor = QChar::DirEN;
                             } else {
                                 eor = current; status.eor = dirCurrent;
                             }
@@ -635,6 +639,7 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                 case QChar::DirAL:
                 case QChar::DirEN:
                     appendRun();
+                    dir = QChar::DirAN; status.eor = QChar::DirAN;
                     break;
                 case QChar::DirCS:
                     if(status.eor == QChar::DirAN) {
@@ -652,6 +657,7 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                         eor = last;
                         appendRun();
                         dir = QChar::DirAN;
+                        status.eor = QChar::DirAN;
                     } else if( status.eor == QChar::DirL ||
                                (status.eor == QChar::DirEN && status.lastStrong == QChar::DirL)) {
                         eor = current; status.eor = dirCurrent;
@@ -663,6 +669,7 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
                             dir = QChar::DirR;
                             appendRun();
                             dir = QChar::DirAN;
+                            status.eor = QChar::DirAN;
                         } else {
                             eor = current; status.eor = dirCurrent;
                         }
@@ -730,6 +737,12 @@ void RenderFlow::bidiReorderLine(const BidiIterator &start, const BidiIterator &
             case QChar::DirBN:
                 // ignore these
                 break;
+            case QChar::DirEN:
+                if ( status.last == QChar::DirL ) {
+                    status.last = QChar::DirL;
+                    break;
+                }
+                // fall through
             default:
                 status.last = dirCurrent;
             }
diff --git a/WebCore/khtml/rendering/bidi.h b/WebCore/khtml/rendering/bidi.h
index aca42f7..c1b185d 100644
--- a/WebCore/khtml/rendering/bidi.h
+++ b/WebCore/khtml/rendering/bidi.h
@@ -62,12 +62,12 @@ namespace khtml {
 
 	    // add level of run (cases I1 & I2)
 	    if( level % 2 ) {
-		if(dir == QChar::DirL || dir == QChar::DirAN)
+		if(dir == QChar::DirL || dir == QChar::DirAN || dir == QChar::DirEN)
 		    level++;
 	    } else {
 		if( dir == QChar::DirR )
 		    level++;
-		else if( dir == QChar::DirAN )
+		else if( dir == QChar::DirAN || dir == QChar::DirEN)
 		    level += 2;
 	    }
 	}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list