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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:16:58 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 38a9e98dd020d05d1ac6b16e9eac9b3626af96a2
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 21 01:56:42 2002 +0000

            Reviewed by Trey.
    
    	- fixed 3133801 -- REGRESSION: Japanese page comes up hash
    
            * khtml/khtml_part.cpp: (KHTMLPart::write): Roll back to original KHTML code here,
    	removing the "all ASCII" optimization.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3165 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index eaeee7a..36ceb07 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,12 @@
+2002-12-20  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- fixed 3133801 -- REGRESSION: Japanese page comes up hash
+
+        * khtml/khtml_part.cpp: (KHTMLPart::write): Roll back to original KHTML code here,
+	removing the "all ASCII" optimization.
+
 2002-12-20  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3133081, slashdot messed up when changing font sizes.
@@ -141,8 +150,6 @@
 
 2002-12-20  Darin Adler  <darin at apple.com>
 
-2002-12-20  Darin Adler  <darin at apple.com>
-
         Reviewed by John.
 
 	- fixed 3129824 -- crash in QWidget::getView in KWQKHTMLPart::passSubframeEventToSubframe
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index eaeee7a..36ceb07 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2002-12-20  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- fixed 3133801 -- REGRESSION: Japanese page comes up hash
+
+        * khtml/khtml_part.cpp: (KHTMLPart::write): Roll back to original KHTML code here,
+	removing the "all ASCII" optimization.
+
 2002-12-20  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3133081, slashdot messed up when changing font sizes.
@@ -141,8 +150,6 @@
 
 2002-12-20  Darin Adler  <darin at apple.com>
 
-2002-12-20  Darin Adler  <darin at apple.com>
-
         Reviewed by John.
 
 	- fixed 3129824 -- crash in QWidget::getView in KWQKHTMLPart::passSubframeEventToSubframe
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index dedbc7d..33d79fe 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -1417,44 +1417,22 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
 
 void KHTMLPart::write( const char *str, int len )
 {
-  bool allASCII = !d->m_decoder;
-  const char *p = str;
-  if ( len == -1 ) {
-    len = 0;
-    unsigned char c;
-    while ( (c = *p++) ) {
-      ++len;
-      if (c > 0x7F)
-        allASCII = false;
-    }
-  } else {
-    int l = len;
-    while ( allASCII && l-- ) {
-      unsigned char c = *p++;
-      if (c > 0x7F)
-        allASCII = false;
+    if ( !d->m_decoder ) {
+        d->m_decoder = new khtml::Decoder();
+        if (!d->m_encoding.isNull())
+            d->m_decoder->setEncoding(d->m_encoding.latin1(), d->m_haveEncoding);
+        else
+            d->m_decoder->setEncoding(settings()->encoding().latin1(), d->m_haveEncoding);
     }
-  }
-
   if ( len == 0 )
     return;
 
-  QString decoded;
-  if (allASCII)
-    decoded = QString(str, len);
-  else {
-    if ( !d->m_decoder ) {
-      d->m_decoder = new khtml::Decoder;
-      if (!d->m_encoding.isNull())
-        d->m_decoder->setEncoding(d->m_encoding.latin1(), d->m_haveEncoding);
-      else
-        d->m_decoder->setEncoding(settings()->encoding().latin1(), d->m_haveEncoding);
-      // ### this is still quite hacky, but should work a lot better than the old solution
-      if(d->m_decoder->visuallyOrdered()) d->m_doc->setVisuallyOrdered();
-    }
-    decoded = d->m_decoder->decode( str, len );
-    if(decoded.isEmpty()) return;
-  }
+  if ( len == -1 )
+    len = strlen( str );
+
+  QString decoded = d->m_decoder->decode( str, len );
+
+  if(decoded.isEmpty()) return;
 
   if(d->m_bFirstData) {
       // determine the parse mode
@@ -1462,6 +1440,8 @@ void KHTMLPart::write( const char *str, int len )
       d->m_bFirstData = false;
 
   //kdDebug(6050) << "KHTMLPart::write haveEnc = " << d->m_haveEncoding << endl;
+      // ### this is still quite hacky, but should work a lot better than the old solution
+      if(d->m_decoder->visuallyOrdered()) d->m_doc->setVisuallyOrdered();
       d->m_doc->recalcStyle( NodeImpl::Force );
   }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list