[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/khtml
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2009-03-14 4:35:28
Message-ID: 1237005328.816615.14867.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 939170 by ggarand:

from recent www-style discussion outcome,
input type=hidden should not match :disabled/:enabled
pseudo classes.

(also fix some decadent spelling)


 M  +2 -2      css/cssstyleselector.cpp  
 M  +1 -1      html/html_formimpl.cpp  
 M  +8 -6      html/html_formimpl.h  
 M  +3 -3      html/html_miscimpl.cpp  


--- trunk/KDE/kdelibs/khtml/css/cssstyleselector.cpp #939169:939170
@@ -1709,7 +1709,7 @@
                 addDependency(OtherStateDependency, e);
                 HTMLGenericFormElementImpl *form;
                 form = static_cast<HTMLGenericFormElementImpl*>(e);
-                return !form->disabled();
+                return !form->disabled() && !form->isHiddenInput();
             }
             break;
         }
@@ -1718,7 +1718,7 @@
                 addDependency(OtherStateDependency, e);
                 HTMLGenericFormElementImpl *form;
                 form = static_cast<HTMLGenericFormElementImpl*>(e);
-                return form->disabled();
+                return form->disabled() && !form->isHiddenInput();
             }
             break;
         }
--- trunk/KDE/kdelibs/khtml/html/html_formimpl.cpp #939169:939170
@@ -127,7 +127,7 @@
     int len = 0;
     QListIterator<HTMLGenericFormElementImpl*> it(formElements);
     while (it.hasNext())
-	if (it.next()->isEnumeratable())
+	if (it.next()->isEnumerable())
 	    ++len;
 
     return len;
--- trunk/KDE/kdelibs/khtml/html/html_formimpl.h #939169:939170
@@ -155,7 +155,7 @@
     void setDisabled(bool _disabled);
 
     virtual bool isFocusable() const;
-    virtual bool isEnumeratable() const { return false; }
+    virtual bool isEnumerable() const { return false; }
     
     virtual bool isDefault() const { return false; }
 
@@ -166,6 +166,7 @@
     void setName(const DOMString& name);
 
     virtual bool isGenericFormElement() const { return true; }
+    virtual bool isHiddenInput() const { return false; }
 
     /*
      * override in derived classes to get the encoded name=value pair
@@ -203,7 +204,7 @@
     };
 
     virtual Id id() const;
-    virtual bool isEnumeratable() const { return true; }
+    virtual bool isEnumerable() const { return true; }
 
     DOMString type() const;
     typeEnum buttonType() const { return KDE_CAST_BF_ENUM(typeEnum, m_type); }
@@ -267,8 +268,9 @@
 
     virtual Id id() const;
 
-    virtual bool isEnumeratable() const { return inputType() != IMAGE; }
+    virtual bool isEnumerable() const { return inputType() != IMAGE; }
     virtual bool isDefault() const { return m_defaultChecked; }
+    virtual bool isHiddenInput() const { return inputType() == HIDDEN; }
 
     bool autoComplete() const { return m_autocomplete; }
 
@@ -397,7 +399,7 @@
     long selectedIndex() const;
     void setSelectedIndex( long index );
 
-    virtual bool isEnumeratable() const { return true; }
+    virtual bool isEnumerable() const { return true; }
 
     long length() const;
 
@@ -473,7 +475,7 @@
     void setSelectedIndex( long index );
 
     // ### this is just a rough guess
-    virtual bool isEnumeratable() const { return false; }
+    virtual bool isEnumerable() const { return false; }
 
     virtual void parseAttribute(AttributeImpl *attr);
     virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
@@ -556,7 +558,7 @@
 
     WrapMethod wrap() const { return m_wrap; }
 
-    virtual bool isEnumeratable() const { return true; }
+    virtual bool isEnumerable() const { return true; }
 
     DOMString type() const;
 
--- trunk/KDE/kdelibs/khtml/html/html_miscimpl.cpp #939169:939170
@@ -336,7 +336,7 @@
     QList<HTMLGenericFormElementImpl*>& l = static_cast<HTMLFormElementImpl*>( \
m_refNode )->formElements;  for (unsigned i = strt; i < (unsigned)l.count(); i++)
     {
-        if (l.at( i )->isEnumeratable())
+        if (l.at( i )->isEnumerable())
         {
             if (dist == 0)
             {
@@ -358,7 +358,7 @@
     unsigned length = 0;
     QList<HTMLGenericFormElementImpl*> l = static_cast<HTMLFormElementImpl*>( \
m_refNode )->formElements;  for ( unsigned i = 0; i < (unsigned)l.count(); i++ )
-        if ( l.at( i )->isEnumeratable() )
+        if ( l.at( i )->isEnumerable() )
             ++length;
     return length;
 }
@@ -379,7 +379,7 @@
     for ( ; currentNamePos < (unsigned)l.count(); ++currentNamePos )
     {
         HTMLGenericFormElementImpl* el = l.at(currentNamePos);
-        if (el->isEnumeratable() &&
+        if (el->isEnumerable() &&
              ((el->getAttribute(ATTR_ID)   == name) ||
               (el->getAttribute(ATTR_NAME) == name)))
         {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic