Bug 605125 (1/5) - Add :-moz-ui-valid pseudo-class. r=bz a=jst
authorMounir Lamouri <mounir.lamouri@gmail.com>
Wed, 24 Nov 2010 00:54:29 +0100
changeset 58151 27db143745a77ffbcaeb8acea9dd4f590d7f4fe7
parent 58150 41e7b8cbd271f7ab01a72479c84c678077127f32
child 58152 a5443d86c431c497301c3f110f4aecf8710671c7
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersbz, jst
bugs605125
milestone2.0b8pre
Bug 605125 (1/5) - Add :-moz-ui-valid pseudo-class. r=bz a=jst
content/events/public/nsEventStates.h
layout/style/nsCSSPseudoClassList.h
--- a/content/events/public/nsEventStates.h
+++ b/content/events/public/nsEventStates.h
@@ -256,15 +256,17 @@ private:
 // Content has focus and should show a ring.
 #define NS_EVENT_STATE_FOCUSRING     NS_DEFINE_EVENT_STATE_MACRO(29)
 // Content shows its placeholder
 #define NS_EVENT_STATE_MOZ_PLACEHOLDER NS_DEFINE_EVENT_STATE_MACRO(30)
 // Content is a submit control and the form isn't valid.
 #define NS_EVENT_STATE_MOZ_SUBMITINVALID NS_DEFINE_EVENT_STATE_MACRO(31)
 // UI friendly version of :invalid pseudo-class.
 #define NS_EVENT_STATE_MOZ_UI_INVALID NS_DEFINE_EVENT_STATE_MACRO(32)
+// UI friendly version of :valid pseudo-class.
+#define NS_EVENT_STATE_MOZ_UI_VALID NS_DEFINE_EVENT_STATE_MACRO(33)
 
 /**
  * NOTE: do not go over 63 without updating nsEventStates::InternalType!
  */
 
 #endif // nsEventStates_h__
 
--- a/layout/style/nsCSSPseudoClassList.h
+++ b/layout/style/nsCSSPseudoClassList.h
@@ -179,13 +179,15 @@ CSS_STATE_PSEUDO_CLASS(mozReadOnly, ":-m
 CSS_STATE_PSEUDO_CLASS(mozReadWrite, ":-moz-read-write",
                        NS_EVENT_STATE_MOZ_READWRITE)
 CSS_STATE_PSEUDO_CLASS(mozPlaceholder, ":-moz-placeholder",
                        NS_EVENT_STATE_MOZ_PLACEHOLDER)
 CSS_STATE_PSEUDO_CLASS(mozSubmitInvalid, ":-moz-submit-invalid",
                        NS_EVENT_STATE_MOZ_SUBMITINVALID)
 CSS_STATE_PSEUDO_CLASS(mozUIInvalid, ":-moz-ui-invalid",
                        NS_EVENT_STATE_MOZ_UI_INVALID)
+CSS_STATE_PSEUDO_CLASS(mozUIValid, ":-moz-ui-valid",
+                       NS_EVENT_STATE_MOZ_UI_VALID)
 
 #ifdef DEFINED_CSS_STATE_PSEUDO_CLASS
 #undef DEFINED_CSS_STATE_PSEUDO_CLASS
 #undef CSS_STATE_PSEUDO_CLASS
 #endif