[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:45:02 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b507bba0dbd5275d169d6012f527c3e0336f744f
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jun 11 20:51:20 2003 +0000

    	Fix for 3288035, the wrong value was being filled in for
    	textfields.  Fixed a bug in QString's assignment operator
    	that made empty strings become null strings upon assignment.
    	Also ensured that the form control never sets the value to
    	null but always uses empty instead.
    
            Reviewed by john
    
            * khtml/rendering/render_form.cpp:
            (RenderLineEdit::slotTextChanged):
            * kwq/KWQString.mm:
            (QString::setLatin1):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 19d5baa..edb1b0f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,18 @@
+2003-06-11  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3288035, the wrong value was being filled in for
+	textfields.  Fixed a bug in QString's assignment operator
+	that made empty strings become null strings upon assignment.
+	Also ensured that the form control never sets the value to
+	null but always uses empty instead.
+	
+        Reviewed by john
+
+        * khtml/rendering/render_form.cpp:
+        (RenderLineEdit::slotTextChanged):
+        * kwq/KWQString.mm:
+        (QString::setLatin1):
+
 2003-06-10  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3287870, the <embed hidden=true> feature didn't work.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 19d5baa..edb1b0f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2003-06-11  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3288035, the wrong value was being filled in for
+	textfields.  Fixed a bug in QString's assignment operator
+	that made empty strings become null strings upon assignment.
+	Also ensured that the form control never sets the value to
+	null but always uses empty instead.
+	
+        Reviewed by john
+
+        * khtml/rendering/render_form.cpp:
+        (RenderLineEdit::slotTextChanged):
+        * kwq/KWQString.mm:
+        (QString::setLatin1):
+
 2003-06-10  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3287870, the <embed hidden=true> feature didn't work.
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index e4fc020..18412cd 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -575,7 +575,11 @@ void RenderLineEdit::slotTextChanged(const QString &string)
     // don't use setValue here!
     if (m_updating) // Don't alter m_value if we are in the middle of initing the control, since
         return;     // we may have gotten our initial value from the attribute.
-    QString newText = string;
+
+    // A null string value is used to indicate that the form control has not altered the original
+    // default value.  That means that we should never use the null string value when the user
+    // empties a textfield, but should always force an empty textfield to use the empty string.
+    QString newText = string.isNull() ? "" : string;
     newText.replace(backslashAsCurrencySymbol(), '\\');
     element()->m_value = newText;
 }
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index fd2854f..026ab63 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -1903,14 +1903,8 @@ QString &QString::setLatin1(const char *str, int len)
     
     // Free our handle if it isn't the shared null handle, and if no-one else is using it.
     bool needToFreeHandle = dataHandle != shared_null_handle && dataHandle[0]->refCount == 1;
-        
-    if (len == 0) {
-        deref();
-        if (needToFreeHandle)
-            freeHandle(dataHandle);
-        dataHandle = makeSharedNullHandle();
-        dataHandle[0]->ref();
-    } else if (len+1 > (int)dataHandle[0]->_maxAscii || dataHandle[0]->refCount != 1 || !dataHandle[0]->_isAsciiValid) {
+   
+    if (len+1 > (int)dataHandle[0]->_maxAscii || dataHandle[0]->refCount != 1 || !dataHandle[0]->_isAsciiValid) {
         deref();
         if (needToFreeHandle)
             freeHandle(dataHandle);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list