[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:40:58 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit e9e3e7fde4399847ab56fc31c2d413013a84c052
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri May 21 06:52:17 2004 +0000

            Reviewed by Maciej.
    
            - fixed <rdar://problem/3575385>: (multiple radio buttons checked when arriving at sites (poll at www.1170kfaq.com, many others))
    
            * khtml/html/html_formimpl.cpp:
            (HTMLInputElementImpl::parseHTMLAttribute): Use setChecked to set the default value if we are still in
            "use default checked" mode. That way, other radio buttons will be unchecked properly and the proper
            changed methods will be dispatched.
            (HTMLInputElementImpl::reset): Ditto.
            * khtml/html/html_formimpl.h: (DOM::HTMLInputElementImpl::checked): Changed to just return m_checked.
            The m_useDefaultChecked flag is now only really looked at when you parse a checked attribute; that's
            because m_checked and m_defaultChecked are kept equal as long as m_useDefaultChecked is true.
    
            * khtml/xml/dom_nodeimpl.h: Removed an unnecessary virtual, to make code a little smaller and faster.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6655 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4fc7163..3dd767f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,22 @@
 2004-05-20  Darin Adler  <darin at apple.com>
 
+        Reviewed by Maciej.
+
+        - fixed <rdar://problem/3575385>: (multiple radio buttons checked when arriving at sites (poll at www.1170kfaq.com, many others))
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLInputElementImpl::parseHTMLAttribute): Use setChecked to set the default value if we are still in
+        "use default checked" mode. That way, other radio buttons will be unchecked properly and the proper
+        changed methods will be dispatched.
+        (HTMLInputElementImpl::reset): Ditto.
+        * khtml/html/html_formimpl.h: (DOM::HTMLInputElementImpl::checked): Changed to just return m_checked.
+        The m_useDefaultChecked flag is now only really looked at when you parse a checked attribute; that's
+        because m_checked and m_defaultChecked are kept equal as long as m_useDefaultChecked is true.
+
+        * khtml/xml/dom_nodeimpl.h: Removed an unnecessary virtual, to make code a little smaller and faster.
+
+2004-05-20  Darin Adler  <darin at apple.com>
+
         Reviewed by Chris.
 
         - fixed <rdar://problem/3662383>: (REGRESSION: drag slide-back sometimes causes link to load)
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index a184c87..7af1844 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -1423,8 +1423,10 @@ void HTMLInputElementImpl::parseHTMLAttribute(HTMLAttributeImpl *attr)
         break;
     case ATTR_CHECKED:
         m_defaultChecked = !attr->isNull();
-        if (m_useDefaultChecked)   // We only need to setChanged if the form is looking
-            setChanged();          // at the default checked state right now.
+        if (m_useDefaultChecked) {
+            setChecked(m_defaultChecked);
+            m_useDefaultChecked = true;
+        }
         break;
     case ATTR_MAXLENGTH:
         m_maxLen = !attr->isNull() ? attr->value().toInt() : -1;
@@ -1802,8 +1804,8 @@ bool HTMLInputElementImpl::encoding(const QTextCodec* codec, khtml::encodingList
 void HTMLInputElementImpl::reset()
 {
     setValue(DOMString());
+    setChecked(m_defaultChecked);
     m_useDefaultChecked = true;
-    m_checked = m_defaultChecked;
 }
 
 void HTMLInputElementImpl::setChecked(bool _checked)
diff --git a/WebCore/khtml/html/html_formimpl.h b/WebCore/khtml/html/html_formimpl.h
index 093d291..44cd9a3 100644
--- a/WebCore/khtml/html/html_formimpl.h
+++ b/WebCore/khtml/html/html_formimpl.h
@@ -297,7 +297,7 @@ public:
 
     bool autoComplete() const { return m_autocomplete; }
 
-    bool checked() const { return m_useDefaultChecked ? m_defaultChecked : m_checked; }
+    bool checked() const { return m_checked; }
     void setChecked(bool);
     long maxLength() const { return m_maxLen; }
     int size() const { return m_size; }
diff --git a/WebCore/khtml/xml/dom_nodeimpl.h b/WebCore/khtml/xml/dom_nodeimpl.h
index f961638..0fdad91 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.h
+++ b/WebCore/khtml/xml/dom_nodeimpl.h
@@ -241,7 +241,7 @@ public:
     void setInDocument(bool b=true) { m_inDocument = b; }
     virtual void setFocus(bool b=true) { m_focused = b; }
     virtual void setActive(bool b=true) { m_active = b; }
-    virtual void setChanged(bool b=true);
+    void setChanged(bool b=true);
 
     unsigned short tabIndex() const { return m_tabIndex; }
     void setTabIndex(unsigned short _tabIndex) { m_tabIndex = _tabIndex; }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list