[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 08:24:01 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 3d83ff1152c48835142460d07ac33640f16b09cf
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 27 05:35:36 2004 +0000

            Reviewed by Maciej.
    
            - fixed <rdar://problem/3537371>: REGRESSION (100-125): optgroup labels are no longer indented as they were before
    
            * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
            Move code that adds spaces after code that strips whitespace. Also simplify
            the code a bit by using DOMString::string().
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5986 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e2514e1..eaae9cf 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,15 @@
 2004-01-26  Darin Adler  <darin at apple.com>
 
+        Reviewed by Maciej.
+
+        - fixed <rdar://problem/3537371>: REGRESSION (100-125): optgroup labels are no longer indented as they were before
+
+        * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
+        Move code that adds spaces after code that strips whitespace. Also simplify
+        the code a bit by using DOMString::string().
+
+2004-01-26  Darin Adler  <darin at apple.com>
+
         Reviewed by Dave.
 
         - fixed <rdar://problem/3539286>: text with a transparent background color pastes as black on black
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index 06dfd00..c03f658 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -1107,10 +1107,7 @@ void RenderSelect::updateFromElement()
 
         for (listIndex = 0; listIndex < int(listItems.size()); listIndex++) {
             if (listItems[listIndex]->id() == ID_OPTGROUP) {
-                DOMString text = listItems[listIndex]->getAttribute(ATTR_LABEL);
-                if (text.isNull())
-                    text = "";
-                QString label = QString(text.implementation()->s, text.implementation()->l);
+                QString label = listItems[listIndex]->getAttribute(ATTR_LABEL).string();
                 label.replace('\\', backslashAsCurrencySymbol());
 
                 // In WinIE, an optgroup can't start or end with whitespace (other than the indent
@@ -1131,17 +1128,15 @@ void RenderSelect::updateFromElement()
                     static_cast<KComboBox*>(m_widget)->insertItem(label, listIndex);
             }
             else if (listItems[listIndex]->id() == ID_OPTION) {
-                DOMString text = static_cast<HTMLOptionElementImpl*>(listItems[listIndex])->text();
-                if (text.isNull())
-                    text = "";
-                if (listItems[listIndex]->parentNode()->id() == ID_OPTGROUP)
-                    text = DOMString("    ")+text;
-                QString itemText = QString(text.implementation()->s, text.implementation()->l);
+                QString itemText = static_cast<HTMLOptionElementImpl*>(listItems[listIndex])->text().string();
                 itemText.replace('\\', backslashAsCurrencySymbol());
 
                 // In WinIE, an option can't start or end with whitespace.  We match this behavior.
                 itemText = itemText.stripWhiteSpace();
                 
+                if (listItems[listIndex]->parentNode()->id() == ID_OPTGROUP)
+                    itemText.prepend("    ");
+
                 if(m_useListBox)
                     static_cast<KListBox*>(m_widget)->insertItem(itemText, listIndex);
                 else

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list