Fix for 3875199, search field needs to be able to show a magnifying glass without...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2005 00:56:52 +0000 (00:56 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2005 00:56:52 +0000 (00:56 +0000)
        Reviewed by kocienda

        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
        (DOM::HTMLInputElementImpl::parseHTMLAttribute):
        * kwq/KWQLineEdit.mm:
        (QLineEdit::setMaxResults):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8465 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/html_formimpl.cpp
WebCore/kwq/KWQLineEdit.mm

index 765c8ec42cc9f9990edb62662bcc50ba4cadd7c2..cd3dbdb7ba2cfa83f4f04ccdb6828e4c0113600e 100644 (file)
@@ -1,3 +1,15 @@
+2005-01-27  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3875199, search field needs to be able to  show a magnifying  glass without a dropdown menu.
+       
+        Reviewed by kocienda
+
+        * khtml/html/html_formimpl.cpp:
+        (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
+        (DOM::HTMLInputElementImpl::parseHTMLAttribute):
+        * kwq/KWQLineEdit.mm:
+        (QLineEdit::setMaxResults):
+
 2005-01-27  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Maciej
index 27559f4f0528c2bf52888bcb38894cf7934c9b0b..719cf5ae4a4e149ebb15a414c1376afe5d7710ee 100644 (file)
@@ -1236,7 +1236,7 @@ HTMLInputElementImpl::HTMLInputElementImpl(DocumentPtr *doc, HTMLFormElementImpl
     yPos = 0;
 
 #if APPLE_CHANGES
-    m_maxResults = 0;
+    m_maxResults = -1;
 #endif
 
     if ( m_form )
@@ -1589,7 +1589,7 @@ void HTMLInputElementImpl::parseHTMLAttribute(HTMLAttributeImpl *attr)
                              getDocument()->createHTMLEventListener(attr->value().string()));
         break;
     case ATTR_RESULTS:
-        m_maxResults = !attr->isNull() ? attr->value().toInt() : 0;
+        m_maxResults = !attr->isNull() ? attr->value().toInt() : -1;
         /* Fall through */
     case ATTR_AUTOSAVE:
     case ATTR_INCREMENTAL:
index 51b1919f5e3dccc9e24059018eba358ce63360c3..db08ab97ebf51d806314f5e36369cf0e60729605 100644 (file)
@@ -327,7 +327,7 @@ void QLineEdit::setMaxResults(int maxResults)
     
     NSSearchField *searchField = (NSSearchField *)getView();
     id searchCell = [searchField cell];
-    if (!maxResults) {
+    if (maxResults == -1) {
         [searchCell setSearchButtonCell:nil];
         [searchCell setSearchMenuTemplate:nil];
     }
@@ -336,7 +336,7 @@ void QLineEdit::setMaxResults(int maxResults)
         NSButtonCell* buttonCell = [searchCell searchButtonCell];
         if (!buttonCell)
             [searchCell resetSearchButtonCell];
-        if (!cellMenu)
+        if (!cellMenu && maxResults > 0)
             [searchCell setSearchMenuTemplate:[[WebCoreViewFactory sharedFactory] cellMenuForSearchField]];
     }