Bug 1349659. Implement :required and :optional in stylo. r=emilio
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 22 Mar 2017 22:01:12 -0400
changeset 348975 c57a7c9275dc40da0803a824c058e3e44c6d94fa
parent 348974 01c8ef72019f4d4b274e6b4fe26e3e3e91c96f87
child 348976 4c728250f70cd1ec0efe97d2eefb016d3ae62092
push id39360
push userbzbarsky@mozilla.com
push dateThu, 23 Mar 2017 02:04:25 +0000
treeherderautoland@c57a7c9275dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1349659
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1349659. Implement :required and :optional in stylo. r=emilio MozReview-Commit-ID: 50A3H4Qb3Yf
dom/events/EventStates.h
layout/reftests/css-optional/reftest-stylo.list
layout/reftests/css-required/reftest-stylo.list
--- a/dom/events/EventStates.h
+++ b/dom/events/EventStates.h
@@ -7,17 +7,17 @@
 #ifndef mozilla_EventStates_h_
 #define mozilla_EventStates_h_
 
 #include "mozilla/Attributes.h"
 #include "nsDebug.h"
 
 namespace mozilla {
 
-#define NS_EVENT_STATE_HIGHEST_SERVO_BIT 19
+#define NS_EVENT_STATE_HIGHEST_SERVO_BIT 21
 
 /**
  * EventStates is the class used to represent the event states of nsIContent
  * instances. These states are calculated by IntrinsicState() and
  * ContentStatesChanged() has to be called when one of them changes thus
  * informing the layout/style engine of the change.
  * Event states are associated with pseudo-classes.
  */
@@ -233,30 +233,30 @@ private:
 // user (eg an image which hasn't started coming in yet).
 #define NS_EVENT_STATE_LOADING       NS_DEFINE_EVENT_STATE_MACRO(16)
 // Handler for the content has been blocked.
 #define NS_EVENT_STATE_HANDLER_BLOCKED NS_DEFINE_EVENT_STATE_MACRO(17)
 // Handler for the content has been disabled.
 #define NS_EVENT_STATE_HANDLER_DISABLED NS_DEFINE_EVENT_STATE_MACRO(18)
 // Handler for the content has crashed
 #define NS_EVENT_STATE_HANDLER_CRASHED NS_DEFINE_EVENT_STATE_MACRO(19)
+// Content is required.
+#define NS_EVENT_STATE_REQUIRED      NS_DEFINE_EVENT_STATE_MACRO(20)
+// Content is optional (and can be required).
+#define NS_EVENT_STATE_OPTIONAL      NS_DEFINE_EVENT_STATE_MACRO(21)
 
 /*
  * Bits below here do not have Servo-related ordering constraints.
  *
  * Remember to change NS_EVENT_STATE_HIGHEST_SERVO_BIT at the top of the file if
  * this changes!
  */
 
 // Drag is hovering over content.
-#define NS_EVENT_STATE_DRAGOVER      NS_DEFINE_EVENT_STATE_MACRO(20)
-// Content is required.
-#define NS_EVENT_STATE_REQUIRED      NS_DEFINE_EVENT_STATE_MACRO(21)
-// Content is optional (and can be required).
-#define NS_EVENT_STATE_OPTIONAL      NS_DEFINE_EVENT_STATE_MACRO(22)
+#define NS_EVENT_STATE_DRAGOVER      NS_DEFINE_EVENT_STATE_MACRO(22)
 // Link has been visited.
 #define NS_EVENT_STATE_VISITED       NS_DEFINE_EVENT_STATE_MACRO(23)
 // Link hasn't been visited.
 #define NS_EVENT_STATE_UNVISITED     NS_DEFINE_EVENT_STATE_MACRO(24)
 // Content value is in-range (and can be out-of-range).
 #define NS_EVENT_STATE_INRANGE       NS_DEFINE_EVENT_STATE_MACRO(25)
 // Content value is out-of-range.
 #define NS_EVENT_STATE_OUTOFRANGE    NS_DEFINE_EVENT_STATE_MACRO(26)
--- a/layout/reftests/css-optional/reftest-stylo.list
+++ b/layout/reftests/css-optional/reftest-stylo.list
@@ -1,11 +1,11 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 # Checking if these elements support :optional.
-fails == css-optional-textarea.html css-optional-textarea.html
-fails == css-optional-input.html css-optional-input.html
-fails == css-optional-select.html css-optional-select.html
-fails == css-optional-button.html css-optional-button.html
+fails == css-optional-textarea.html css-optional-textarea.html # Bug 1349651
+fails == css-optional-input.html css-optional-input.html # Bug 1349651
+fails == css-optional-select.html css-optional-select.html # Bug 1349651
+== css-optional-button.html css-optional-button.html
 
 # Checking dynamic behavior.
-fails == css-optional-dyn-1.html css-optional-dyn-1.html
-fails == css-optional-dyn-2.html css-optional-dyn-2.html
+fails == css-optional-dyn-1.html css-optional-dyn-1.html # Bug 1349651
+== css-optional-dyn-2.html css-optional-dyn-2.html
 
--- a/layout/reftests/css-required/reftest-stylo.list
+++ b/layout/reftests/css-required/reftest-stylo.list
@@ -1,30 +1,30 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 # Checking if these types/elements support :required
-fails == css-required-textarea.html css-required-textarea.html
+fails == css-required-textarea.html css-required-textarea.html # Bug 1349651
 == css-required-radio.html css-required-radio.html
-fails == css-required-text.html css-required-text.html
+fails == css-required-text.html css-required-text.html # Bug 1349651
 == css-required-checkbox.html css-required-checkbox.html
-fails == css-required-file.html css-required-file.html
-fails == css-required-password.html css-required-password.html
-fails == css-required-tel.html css-required-tel.html
-fails == css-required-search.html css-required-search.html
-fails == css-required-select.html css-required-select.html
+fails == css-required-file.html css-required-file.html # Bug 1349651
+fails == css-required-password.html css-required-password.html # Bug 1349651
+fails == css-required-tel.html css-required-tel.html # Bug 1349651
+fails == css-required-search.html css-required-search.html # Bug 1349651
+fails == css-required-select.html css-required-select.html # Bug 1349651
 
 # Checking dynamic behavior with <input type='text'>
-fails == css-required-dyn-1.html css-required-dyn-1.html
-fails == css-required-dyn-2.html css-required-dyn-2.html
-fails == css-required-dyn-3.html css-required-dyn-3.html
-fails == css-required-dyn-4.html css-required-dyn-4.html
-fails == css-required-dyn-5.html css-required-dyn-5.html
-fails == css-required-dyn-6.html css-required-dyn-6.html
+fails == css-required-dyn-1.html css-required-dyn-1.html # Bug 1349651
+== css-required-dyn-2.html css-required-dyn-2.html
+fails == css-required-dyn-3.html css-required-dyn-3.html # Bug 1349651
+== css-required-dyn-4.html css-required-dyn-4.html
+fails == css-required-dyn-5.html css-required-dyn-5.html # Bug 1349651
+== css-required-dyn-6.html css-required-dyn-6.html
 
 # Following input types do not support :required
 == css-required-hidden.html css-required-hidden.html
-fails == css-required-button.html css-required-button.html
-fails == css-required-submit.html css-required-submit.html
-fails == css-required-image.html css-required-image.html
-fails == css-required-reset.html css-required-reset.html
+== css-required-button.html css-required-button.html
+== css-required-submit.html css-required-submit.html
+== css-required-image.html css-required-image.html
+== css-required-reset.html css-required-reset.html
 
 # Following elements can be optional but can't be required
-fails == css-required-button-element.html css-required-button-element.html
+== css-required-button-element.html css-required-button-element.html