Bug 1341648 - stylo: Include content rules from HTMLTableCellElement::WalkContentStyleRules ; r?bz draft
authorManish Goregaokar <manishearth@gmail.com>
Sun, 26 Mar 2017 13:53:34 -0700
changeset 553953 8c1bb7c5660ac52056603ceed79c365fe893f3e9
parent 553822 8df9fabf2587b7020889755acb9e75b664fe13cf
child 622253 1c99979551af00be0f6adf25faf004e4b13e1330
push id51841
push userbmo:manishearth@gmail.com
push dateFri, 31 Mar 2017 03:25:50 +0000
reviewersbz
bugs1341648
milestone55.0a1
Bug 1341648 - stylo: Include content rules from HTMLTableCellElement::WalkContentStyleRules ; r?bz This also removes the TABLE_ATTRS_DIRTY optimization. Constructing nsMappedAttributes isn't really expensive and we do it all the time anyway. MozReview-Commit-ID: 2krt1nFUzgl
dom/html/HTMLTableCellElement.cpp
dom/html/HTMLTableCellElement.h
dom/html/HTMLTableElement.cpp
dom/html/HTMLTableElement.h
dom/html/reftests/reftest-stylo.list
layout/base/ServoRestyleManager.cpp
layout/reftests/box-shadow/reftest-stylo.list
layout/reftests/bugs/reftest-stylo.list
layout/reftests/columns/reftest-stylo.list
layout/reftests/css-break/reftest-stylo.list
layout/reftests/pagination/reftest-stylo.list
layout/reftests/printing/reftest-stylo.list
layout/reftests/table-anonymous-boxes/reftest-stylo.list
layout/reftests/table-overflow/reftest-stylo.list
layout/reftests/table-width/reftest-stylo.list
layout/reftests/w3c-css/submitted/css21/pagination/reftest-stylo.list
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
layout/style/test/stylo-failures.md
--- a/dom/html/HTMLTableCellElement.cpp
+++ b/dom/html/HTMLTableCellElement.cpp
@@ -102,26 +102,34 @@ HTMLTableCellElement::GetCellIndex(int32
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
 {
   nsresult rv = nsGenericHTMLElement::WalkContentStyleRules(aRuleWalker);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  if (HTMLTableElement* table = GetTable()) {
-    nsMappedAttributes* tableInheritedAttributes =
-      table->GetAttributesMappedForCell();
+  if (nsMappedAttributes* tableInheritedAttributes = GetMappedAttributesInheritedFromTable()) {
     if (tableInheritedAttributes) {
       aRuleWalker->Forward(tableInheritedAttributes);
     }
   }
   return NS_OK;
 }
 
+nsMappedAttributes*
+HTMLTableCellElement::GetMappedAttributesInheritedFromTable() const
+{
+  if (HTMLTableElement* table = GetTable()) {
+    return table->GetAttributesMappedForCell();
+  }
+
+  return nullptr;
+}
+
 NS_IMETHODIMP
 HTMLTableCellElement::SetAbbr(const nsAString& aAbbr)
 {
   ErrorResult rv;
   SetAbbr(aAbbr, rv);
   return rv.StealNSResult();
 }
 
--- a/dom/html/HTMLTableCellElement.h
+++ b/dom/html/HTMLTableCellElement.h
@@ -143,16 +143,18 @@ public:
 
   virtual bool ParseAttribute(int32_t aNamespaceID,
                               nsIAtom* aAttribute,
                               const nsAString& aValue,
                               nsAttrValue& aResult) override;
   virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
   NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) override;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
+  // Get mapped attributes of ancestor table, if any
+  nsMappedAttributes* GetMappedAttributesInheritedFromTable() const;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
 
 protected:
   virtual ~HTMLTableCellElement();
 
   virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
 
--- a/dom/html/HTMLTableElement.cpp
+++ b/dom/html/HTMLTableElement.cpp
@@ -317,17 +317,17 @@ TableRowsCollection::ParentDestroyed()
 
   return NS_OK;
 }
 
 /* --------------------------- HTMLTableElement ---------------------------- */
 
 HTMLTableElement::HTMLTableElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo),
-    mTableInheritedAttributes(TABLE_ATTRS_DIRTY)
+    mTableInheritedAttributes(nullptr)
 {
   SetHasWeirdParserInsertionMode();
 }
 
 HTMLTableElement::~HTMLTableElement()
 {
   if (mRows) {
     mRows->ParentDestroyed();
@@ -858,30 +858,25 @@ MapInheritedTableAttributesIntoRule(cons
       aData->SetPixelValueIfUnset(eCSSProperty_padding_left, pad);
     }
   }
 }
 
 nsMappedAttributes*
 HTMLTableElement::GetAttributesMappedForCell()
 {
-  if (mTableInheritedAttributes) {
-    if (mTableInheritedAttributes == TABLE_ATTRS_DIRTY)
-      BuildInheritedAttributes();
-    if (mTableInheritedAttributes != TABLE_ATTRS_DIRTY)
-      return mTableInheritedAttributes;
-  }
-  return nullptr;
+  return mTableInheritedAttributes;
 }
 
 void
 HTMLTableElement::BuildInheritedAttributes()
 {
-  NS_ASSERTION(mTableInheritedAttributes == TABLE_ATTRS_DIRTY,
+  NS_ASSERTION(!mTableInheritedAttributes,
                "potential leak, plus waste of work");
+  MOZ_ASSERT(NS_IsMainThread());
   nsIDocument *document = GetComposedDoc();
   nsHTMLStyleSheet* sheet = document ?
                               document->GetAttributeStyleSheet() : nullptr;
   RefPtr<nsMappedAttributes> newAttrs;
   if (sheet) {
     const nsAttrValue* value = mAttrsAndChildren.GetAttr(nsGkAtoms::cellpadding);
     if (value) {
       RefPtr<nsMappedAttributes> modifiableMapped = new
@@ -906,31 +901,31 @@ HTMLTableElement::BuildInheritedAttribut
     mTableInheritedAttributes = newAttrs;
     NS_IF_ADDREF(mTableInheritedAttributes);
   }
 }
 
 void
 HTMLTableElement::ReleaseInheritedAttributes()
 {
-  if (mTableInheritedAttributes &&
-      mTableInheritedAttributes != TABLE_ATTRS_DIRTY)
-    NS_RELEASE(mTableInheritedAttributes);
-  mTableInheritedAttributes = TABLE_ATTRS_DIRTY;
+  NS_IF_RELEASE(mTableInheritedAttributes);
 }
 
 nsresult
 HTMLTableElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                              nsIContent* aBindingParent,
                              bool aCompileEventHandlers)
 {
   ReleaseInheritedAttributes();
-  return nsGenericHTMLElement::BindToTree(aDocument, aParent,
-                                          aBindingParent,
-                                          aCompileEventHandlers);
+  nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,
+                                                aBindingParent,
+                                                aCompileEventHandlers);
+  NS_ENSURE_SUCCESS(rv, rv);
+  BuildInheritedAttributes();
+  return NS_OK;
 }
 
 void
 HTMLTableElement::UnbindFromTree(bool aDeep, bool aNullParent)
 {
   ReleaseInheritedAttributes();
   nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
 }
--- a/dom/html/HTMLTableElement.h
+++ b/dom/html/HTMLTableElement.h
@@ -9,18 +9,16 @@
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLElement.h"
 #include "mozilla/dom/HTMLTableCaptionElement.h"
 #include "mozilla/dom/HTMLTableSectionElement.h"
 
 namespace mozilla {
 namespace dom {
 
-#define TABLE_ATTRS_DIRTY ((nsMappedAttributes*)0x1)
-
 class TableRowsCollection;
 
 class HTMLTableElement final : public nsGenericHTMLElement
 {
 public:
   explicit HTMLTableElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLTableElement, table)
@@ -227,18 +225,16 @@ protected:
         return cur;
       }
     }
     return nullptr;
   }
 
   RefPtr<nsContentList> mTBodies;
   RefPtr<TableRowsCollection> mRows;
-  // Sentinel value of TABLE_ATTRS_DIRTY indicates that this is dirty and needs
-  // to be recalculated.
   nsMappedAttributes *mTableInheritedAttributes;
   void BuildInheritedAttributes();
   void ReleaseInheritedAttributes();
 
 private:
   static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
                                     GenericSpecifiedValues* aGenericData);
 };
--- a/dom/html/reftests/reftest-stylo.list
+++ b/dom/html/reftests/reftest-stylo.list
@@ -19,17 +19,17 @@ fails == 82711-1-ref.html 82711-1-ref.ht
 == 557840.html 557840.html
 == 560059-video-dimensions.html 560059-video-dimensions.html
 fails == 573322-quirks.html 573322-quirks.html
 fails == 573322-no-quirks.html 573322-no-quirks.html
 fails == 596455-1a.html 596455-1a.html
 fails == 596455-1b.html 596455-1b.html
 fails == 596455-2a.html 596455-2a.html
 fails == 596455-2b.html 596455-2b.html
-fails == 610935.html 610935.html
+== 610935.html 610935.html
 == 649134-1.html 649134-1.html
 == 649134-2.html 649134-2.html
 == 741776-1.vtt 741776-1.vtt
 
 == bug448564-1_malformed.html bug448564-1_malformed.html
 == bug448564-1_malformed.html bug448564-1_malformed.html
 
 == bug448564-4a.html bug448564-4a.html
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -527,16 +527,21 @@ ServoRestyleManager::AttributeChanged(El
 {
 #ifdef DEBUG
   ServoElementSnapshot* snapshot = Servo_Element_GetSnapshot(aElement);
   MOZ_ASSERT_IF(snapshot, snapshot->HasAttrs());
 #endif
   if (aAttribute == nsGkAtoms::style) {
     PostRestyleEvent(aElement, eRestyle_StyleAttribute, nsChangeHint(0));
   }
+  // <td> is affected by the cellpadding on its ancestor table,
+  // so we should restyle the whole subtree
+  if (aAttribute == nsGkAtoms::cellpadding && aElement->IsHTMLElement(nsGkAtoms::table)) {
+    PostRestyleEvent(aElement, eRestyle_Subtree, nsChangeHint(0));
+  }
 }
 
 nsresult
 ServoRestyleManager::ReparentStyleContext(nsIFrame* aFrame)
 {
   NS_WARNING("stylo: ServoRestyleManager::ReparentStyleContext not implemented");
   return NS_OK;
 }
--- a/layout/reftests/box-shadow/reftest-stylo.list
+++ b/layout/reftests/box-shadow/reftest-stylo.list
@@ -1,19 +1,19 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 == boxshadow-basic.html boxshadow-basic.html
 == boxshadow-blur.html boxshadow-blur.html
 == boxshadow-blur.html boxshadow-blur.html
 fails random == boxshadow-blur-2.html boxshadow-blur-2.html
 fails random == boxshadow-blur-2.html boxshadow-blur-2.html
 == boxshadow-multiple.html boxshadow-multiple.html
 == boxshadow-spread.html boxshadow-spread.html
-fails == tableboxshadow-basic.html tableboxshadow-basic.html
-fails == tableboxshadow-trshadow.html tableboxshadow-trshadow.html
-fails == tableboxshadow-tdshadow.html tableboxshadow-tdshadow.html
+== tableboxshadow-basic.html tableboxshadow-basic.html
+== tableboxshadow-trshadow.html tableboxshadow-trshadow.html
+== tableboxshadow-tdshadow.html tableboxshadow-tdshadow.html
 == boxshadow-rounding.html boxshadow-rounding.html
 == boxshadow-button.html boxshadow-button.html
 fails == boxshadow-fileupload.html boxshadow-fileupload.html
 == boxshadow-inner-basic.html boxshadow-inner-basic.html
 random-if(layersGPUAccelerated) == boxshadow-mixed.html boxshadow-mixed.html
 == boxshadow-rounded-spread.html boxshadow-rounded-spread.html
 fuzzy-if(skiaContent,1,50) HTTP(..) == boxshadow-dynamic.xul boxshadow-dynamic.xul
 == boxshadow-onecorner.html boxshadow-onecorner.html
--- a/layout/reftests/bugs/reftest-stylo.list
+++ b/layout/reftests/bugs/reftest-stylo.list
@@ -1,12 +1,12 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 # Please keep this list sorted by bug number (but feel free to use a
 # logical order for the tests for each bug).
-fails == 105-1.html 105-1.html
+== 105-1.html 105-1.html
 fails == 647-1.html 647-1.html
 == 9458-basic-1.html 9458-basic-1.html
 == 9458-valign-1.html 9458-valign-1.html
 == 9458-valign-2.html 9458-valign-2.html
 == 9458-height-1.html 9458-height-1.html
 == 9458-height-2.html 9458-height-2.html
 == 9458-width-1a.html 9458-width-1a.html
 == 9458-width-1b.html 9458-width-1b.html
@@ -77,17 +77,17 @@ fails == 40596-1j.html 40596-1j.html
 == 50630-4.html 50630-4.html
 == 50630-4.html 50630-4.html
 == 50630-5.html 50630-5.html
 == 67752-1.html 67752-1.html
 == 67752-2.html 67752-2.html
 == 68061-1.xml 68061-1.xml
 == 68061-2.xml 68061-2.xml
 == 76331-1.html 76331-1.html
-fails == 81947-1.html 81947-1.html
+== 81947-1.html 81947-1.html
 fails == 82711-1.html 82711-1.html
 fails == 82711-2.html 82711-2.html
 fails == 82711-3.html 82711-3.html
 fails == 82711-1-ref.html 82711-1-ref.html # Bug 1341697, Bug 1341637
 fails == 82711-1-ref.html 82711-1-ref.html # Bug 1341697, Bug 1341637
 fails == 82711-2-ref.html 82711-2-ref.html
 fails == 84400-1.html 84400-1.html
 == 84400-2.html 84400-2.html
@@ -108,17 +108,17 @@ skip-if(stylo) == 99850-1d.html 99850-1d
 == 120834-2c.html 120834-2c.html
 == 120834-2d.html 120834-2d.html
 == 120834-2e.html 120834-2e.html
 == 120834-2f.html 120834-2f.html
 == 120834-2g.html 120834-2g.html
 == 120834-2h.html 120834-2h.html
 == 120834-2i.html 120834-2i.html
 == 120834-2j.html 120834-2j.html
-fails == 124903-1.html 124903-1.html
+== 124903-1.html 124903-1.html
 == 128896.html 128896.html
 == 130767-1.html 130767-1.html
 == 134706-1-left-scrollframe.html 134706-1-left-scrollframe.html
 == 134706-1-left-table.html 134706-1-left-table.html
 == 134706-1-right-scrollframe.html 134706-1-right-scrollframe.html
 == 134706-1-right-table.html 134706-1-right-table.html
 == 134706-2-left-scrollframe.html 134706-2-left-scrollframe.html
 == 134706-2-left-table.html 134706-2-left-table.html
@@ -142,17 +142,17 @@ fails == 142233-1.html 142233-1.html
 == 144004-3.html 144004-3.html
 fails == 163504-1a.html 163504-1a.html
 fails == 163504-1b.html 163504-1b.html
 fails == 163504-2a.html 163504-2a.html
 fails == 163504-2b.html 163504-2b.html
 == 167496-1.html 167496-1.html
 == 169749-1.html 169749-1.html
 == 172073-1.html 172073-1.html
-fails == 175190-1.html 175190-1.html
+== 175190-1.html 175190-1.html
 == 179596-1a.html 179596-1a.html
 == 179596-1b.html 179596-1b.html
 == 179596-2.html 179596-2.html
 == 179596-2.html 179596-2.html
 == 179596-2.html 179596-2.html
 fails == 180085-1.html 180085-1.html
 fails == 180085-2.html 180085-2.html
 == 185388-1.html 185388-1.html
@@ -203,17 +203,17 @@ fails == 201293-1d.html 201293-1d.html
 == 211931-1.html 211931-1.html
 == 212563-1.html 212563-1.html
 == 212563-2.html 212563-2.html
 == 213834-1.html 213834-1.html
 == 214077-1a.html 214077-1a.html
 == 214077-1b.html 214077-1b.html
 == 218473-1.html 218473-1.html
 fuzzy-if(skiaContent,1,4) == 220165-1.svg 220165-1.svg
-fails == 223809-1.html 223809-1.html
+== 223809-1.html 223809-1.html
 == 228856-1.html 228856-1.html
 == 228856-2.html 228856-2.html
 == 229591-1.html 229591-1.html
 fails == 231823-1.html 231823-1.html
 == 232990-1a.xhtml 232990-1a.xhtml
 == 232990-1b.xhtml 232990-1b.xhtml
 fails == 233094-1.html 233094-1.html
 fails == 233094-2a.html 233094-2a.html
@@ -237,17 +237,17 @@ fails == 233094-2c.html 233094-2c.html
 == 234686-16.html 234686-16.html
 == 234686-17.html 234686-17.html
 == 234686-18.html 234686-18.html
 == 234686-19.html 234686-19.html
 fails == 234964-1.html 234964-1.html
 == 234964-2.html 234964-2.html
 == 235593-1.html 235593-1.html
 fails == 236539-1.html 236539-1.html
-fails == 240029-1.html 240029-1.html
+== 240029-1.html 240029-1.html
 fails == 240470-1.html 240470-1.html
 fails == 240933-1.html 240933-1.html
 fails == 240933-2.html 240933-2.html
 == 243266-1.html 243266-1.html
 == 243302-1.html 243302-1.html
 fails == 243519-1.html 243519-1.html
 == 243519-2.html 243519-2.html
 == 243519-3.html 243519-3.html
@@ -274,28 +274,28 @@ fails == 243519-7.html 243519-7.html
 == 244135-2.html 244135-2.html
 == 244932-1.html 244932-1.html
 == 246669-1.html 246669-1.html
 == 249141.xul 249141.xul
 == 249982-1.html 249982-1.html
 == 252920-1.html 252920-1.html
 == 253701-1.html 253701-1.html
 == 255820-1.html 255820-1.html
-fails == 260406-1.html 260406-1.html
+== 260406-1.html 260406-1.html
 == 261826-1.xul 261826-1.xul
 == 262151-1.html 262151-1.html
 fails == 262998-1.html 262998-1.html
 == 267353-1.html 267353-1.html
 == 269908-1.html 269908-1.html
 == 269908-2.html 269908-2.html
 == 269908-3.html 269908-3.html
 == 269908-4.html 269908-4.html
 == 269908-5.html 269908-5.html
-fails == 271747-1a.html 271747-1a.html
-fails == 271747-1b.html 271747-1b.html
+== 271747-1a.html 271747-1a.html
+== 271747-1b.html 271747-1b.html
 == 272646-1.xul 272646-1.xul
 == 272646-2a.xul 272646-2a.xul
 == 272646-2b.xul 272646-2b.xul
 == 272646-2c.xul 272646-2c.xul
 fails == 273681-1.html 273681-1.html
 == 278266-1a.html 278266-1a.html
 == 278266-1b.html 278266-1b.html
 fails == 280708-1a.html 280708-1a.html
@@ -309,17 +309,17 @@ fails == 289384-1.xhtml 289384-1.xhtml
 == 289480.html#top 289480-ref.html
 == 289480-ref.html 289480-ref.html
 fails == 290129-1.html 290129-1.html
 fails == 291078-1.html 291078-1.html
 == 291078-2.html 291078-2.html
 == 291262-1.html 291262-1.html
 == 294306-1.html 294306-1.html
 == 294306-1.html 294306-1.html
-fails == 296361-1.html 296361-1.html
+== 296361-1.html 296361-1.html
 == 296904-1.html 296904-1.html
 fails == 299136-1.html 299136-1.html
 == 299837-1.html 299837-1.html
 == 299837-2.xul 299837-2.xul
 random-if(d2d) == 299837-3.xul 299837-3.xul
 fails == 300691-1a.html 300691-1a.html
 fails == 300691-1b.html 300691-1b.html
 fails == 300691-1c.html 300691-1c.html
@@ -542,42 +542,42 @@ asserts-if(stylo,1) == 360746-1.html 360
 == 362594-2a.html 362594-2a.html
 == 362594-2a.html 362594-2a.html
 == 362594-2b.html 362594-2b.html
 == 362594-2b.html 362594-2b.html
 == 362594-2c.html 362594-2c.html
 == 362901-1.html 362901-1.html
 == 363247-1.html 363247-1.html
 == 363329-1.html 363329-1.html
-fails == 363329-2.html 363329-2.html
+== 363329-2.html 363329-2.html
 == 363370-1.html 363370-1.html
 == 363402-1.html 363402-1.html
 == 363637-1.html 363637-1.html
 fails == 363706-1.html 363706-1.html # Bug 1324348
 fails == 363706-1.html 363706-1.html # Bug 1324348
 fails == 363728-1.html 363728-1.html
 == 363728-2.html 363728-2.html
 fails == 363858-1.html 363858-1.html
 fails == 363858-2.html 363858-2.html
 fails == 363858-3.html 363858-3.html
 fails == 363858-4.html 363858-4.html
 fails == 363858-5a.html 363858-5a.html
 fails == 363858-5b.html 363858-5b.html
 fails == 363858-6a.html 363858-6a.html
 fails == 363858-6b.html 363858-6b.html
-fails == 363874.html 363874.html
+== 363874.html 363874.html
 == 363874-max-width.html 363874-max-width.html
 == 364066-1.html 364066-1.html
 == 364079-1.html 364079-1.html
 == 364318-1.xhtml 364318-1.xhtml
 == 364861-1.html 364861-1.html
 fails == 364862-1.html 364862-1.html
 == 364968-1.xul 364968-1.xul
-fails == 364989-1.html 364989-1.html
-fails == 365173-1.html 365173-1.html
+== 364989-1.html 364989-1.html
+== 365173-1.html 365173-1.html
 == 366207-1.xul 366207-1.xul
 == 366616-1.xul 366616-1.xul
 fails skip-if(stylo) == 367220-1.html 367220-1.html # crash bug 1342106
 == 367247-s-visible.html 367247-s-visible.html
 == 367247-s-hidden.html 367247-s-hidden.html
 == 367247-s-auto.html 367247-s-auto.html
 == 367247-l-visible.html 367247-l-visible.html
 == 367247-l-hidden.html 367247-l-hidden.html
@@ -607,22 +607,22 @@ random == 368020-1.html 368020-1.html
 pref(layout.css.box-decoration-break.enabled,true) == 368020-5.html 368020-5.html
 == 368155-1.xhtml 368155-1.xhtml
 asserts(4-8) == 368155-negative-margins-1.html 368155-negative-margins-1.html
 # we can't test this because there's antialiasing involved, and our comparison
 # is too exact
 == 368247-1.html 368247-1.html
 == 368247-2.html 368247-2.html
 == 368504-1.html 368504-1.html
-fails == 368504-2.html 368504-2.html
+== 368504-2.html 368504-2.html
 == 368504-3a.html 368504-3a.html
 == 368504-3b.html 368504-3b.html
 == 368504-4.html 368504-4.html
 == 368504-5.html 368504-5.html
-fails == 368504-6.html 368504-6.html
+== 368504-6.html 368504-6.html
 == 368622-1.html 368622-1.html
 == 368651-1.html 368651-1.html
 == 369361-1.html 369361-1.html
 == 369361-2.html 369361-2.html
 == 369882.xul 369882.xul
 == 369975-1.html 369975-1.html
 == 370353-1.html 370353-1.html
 fails == 370422-1.html 370422-1.html
@@ -695,54 +695,54 @@ fails == 378937-1.html 378937-1.html
 == 379349-1a.xhtml 379349-1a.xhtml
 # fuzzy because of different border rendering approach in bug 1185636
 == 379349-1b.xhtml 379349-1b.xhtml
 == 379349-1c.xhtml 379349-1c.xhtml
 == 379349-2a.xhtml 379349-2a.xhtml
 == 379349-2b.xhtml 379349-2b.xhtml
 fails == 379349-3a.xhtml 379349-3a.xhtml
 fails == 379349-3b.xhtml 379349-3b.xhtml
-fails == 379361-1.html 379361-1.html
-fails == 379361-2.html 379361-2.html
-fails == 379361-3.html 379361-3.html
+== 379361-1.html 379361-1.html
+== 379361-2.html 379361-2.html
+== 379361-3.html 379361-3.html
 == 379461-1.xhtml 379461-1.xhtml
 == 379461-2.xhtml 379461-2.xhtml
 fails == 379461-3-container-xhtml.html 379461-3-container-xhtml.html # Bug 1341095
 fails == 379461-3-container-xhtml.html 379461-3-container-xhtml.html # Bug 1341095
 == 380004-1.html 380004-1.html
 == 380227-1.html 380227-1.html
 == 380825-1.html 380825-1.html
 == 380842-1.html 380842-1.html
 == 381130-1.html 381130-1.html
-fails == 381507-1.html 381507-1.html
+== 381507-1.html 381507-1.html
 == 381746-1.html 381746-1.html
 fails == 382600-1.html 382600-1.html
 == 382916-1.html 382916-1.html
 == 383035-1.html 383035-1.html
 == 383035-2.html 383035-2.html
 == 383488-1.html 383488-1.html
 == 383551-1.html 383551-1.html
 == 383883-1.html 383883-1.html
 == 383883-2.html 383883-2.html
 == 383883-3.html 383883-3.html
 == 383883-4.html 383883-4.html
 == 383884-1.html 383884-1.html
 == 383885-1.html 383885-1.html
-fails == 384322-1.html 384322-1.html
+== 384322-1.html 384322-1.html
 == 384576-1.html 384576-1.html
 == 384762-1.html 384762-1.html
 == 384876-1.html 384876-1.html
 == 385533-1.html 385533-1.html
 HTTP(..) == 385569-1a.html 385569-1a.html
 HTTP(..) == 385569-1b.html 385569-1b.html
 == 385607-1.html 385607-1.html
-fails == 385823-1.html 385823-1.html
-fails == 385823-2a.html 385823-2a.html
-fails == 385823-2b.html 385823-2b.html
-fails == 385823-2c.html 385823-2c.html
+== 385823-1.html 385823-1.html
+== 385823-2a.html 385823-2a.html
+== 385823-2b.html 385823-2b.html
+== 385823-2c.html 385823-2c.html
 fails == 385870-1.html 385870-1.html
 fails == 385870-2.html 385870-2.html
 == 386014-1a.html 386014-1a.html
 == 386014-1b.html 386014-1b.html
 == 386014-1c.html 386014-1c.html
 == 386065-1.html 386065-1.html
 == 386065-2.html 386065-2.html
 fails pref(layout.float-fragments-inside-column.enabled,false) == 386147-1.html 386147-1.html # Bug 1341095
@@ -815,17 +815,17 @@ fails == 395107-2.html 395107-2.html
 fails == 395107-3.html 395107-3.html
 fails == 395107-4.html 395107-4.html
 fails == 395107-5.html 395107-5.html
 fails == 395130-1.html 395130-1.html
 fails == 395130-2.html 395130-2.html
 == 395331-1.xml 395331-1.xml
 == 395390-1.html 395390-1.html
 == 396286-1.html 396286-1.html
-fails == 397428-1.html 397428-1.html
+== 397428-1.html 397428-1.html
 == 397844-1.xhtml 397844-1.xhtml
 == 398092-1.html 398092-1.html
 fails == 398101-1.html 398101-1.html
 == 398144-1.html 398144-1.html
 == 398682-1.html 398682-1.html
 == 398797-1a.html 398797-1a.html
 == 398797-1b.html 398797-1b.html
 == 398797-1c.html 398797-1c.html
@@ -851,19 +851,19 @@ fails-if(winWidget) fails-if(cocoaWidget
 == 400813-1.html 400813-1.html
 fails == 400826-1.html 400826-1.html
 == 401946-1.xul 401946-1.xul
 == 402338-1.html 402338-1.html
 == 402567-1.html 402567-1.html
 fails == 402567-2.html 402567-2.html
 fails == 402567-3.html 402567-3.html
 fails == 402567-4.html 402567-4.html
-fails == 402629-1.html 402629-1.html
-fails == 402629-2.html 402629-2.html
-fails == 402629-3.html 402629-3.html
+== 402629-1.html 402629-1.html
+== 402629-2.html 402629-2.html
+== 402629-3.html 402629-3.html
 fails == 402807-1.html 402807-1.html
 == 402940-1.html 402940-1.html
 == 402940-1b.html 402940-1b.html
 fails == 402940-2.html 402940-2.html
 fails == 402940-3.html 402940-3.html
 == 402950-1.html 402950-1.html
 == 403129-1.html 403129-1.html
 == 403129-2.html 403129-2.html
@@ -878,17 +878,17 @@ fails == 403249-2b.html 403249-2b.html
 == 403328-1.html 403328-1.html
 == 403426-1.html 403426-1.html
 == 403455-1.html 403455-1.html
 == 403505-1.xml 403505-1.xml
 fails == 403519-1.html 403519-1.html
 == 403519-2.html 403519-2.html
 == 403656-1.html 403656-1.html
 == 403656-2.html 403656-2.html
-fails == 403656-3.html 403656-3.html
+== 403656-3.html 403656-3.html
 == 403656-4.html 403656-4.html
 == 403656-5.html 403656-5.html
 == 403657-1.html 403657-1.html
 == 403733-1.html 403733-1.html
 fails == 403962-1.xhtml 403962-1.xhtml # Bug 1290276
 == 404030-1.html 404030-1.html
 == 404030-1-notref.html 404030-1-notref.html
 == 404030-1-notref2.html 404030-1-notref2.html
@@ -916,30 +916,30 @@ fails == 405952-1.html 405952-1.html # B
 == 406484-1.html 406484-1.html
 == 406568-1.html 406568-1.html
 fails == 407016-1-a.html 407016-1-a.html
 fails == 407016-1-b.html 407016-1-b.html
 fails == 407078-1.html 407078-1.html
 fails == 407095-1.html 407095-1.html
 == 407111-1.html 407111-1.html
 == 407227-1.html 407227-1.html
-fails == 407243-1.html 407243-1.html
+== 407243-1.html 407243-1.html
 == 407419-1.html 407419-1.html
 == 407937-1.html 407937-1.html
 == 408493-1.html 408493-1.html
 == 408493-2.html 408493-2.html
 == 408656-1a.html 408656-1a.html
 == 408656-1b.html 408656-1b.html
 == 408656-1c.html 408656-1c.html
 fails == 408782-1a.html 408782-1a.html
 fails == 408782-1b.html 408782-1b.html
 == 408782-2a.html 408782-2a.html
 fails == 408782-2b.html 408782-2b.html
-fails == 409084-1a.html 409084-1a.html
-fails == 409084-1b.html 409084-1b.html
+== 409084-1a.html 409084-1a.html
+== 409084-1b.html 409084-1b.html
 == 409089-1.html 409089-1.html
 == 409089-2.html 409089-2.html
 == 409089-3.html 409089-3.html
 fuzzy-if(winWidget,123,1600) == 409659-1a.html 409659-1a.html
 == 409659-1b.html 409659-1b.html
 fails == 409659-1c.html 409659-1c.html
 fuzzy-if(winWidget,123,1900) == 409659-1d.html 409659-1d.html
 == 410621-1.html 410621-1.html
@@ -960,24 +960,24 @@ fails == 412352-2.html 412352-2.html
 == 412679-1.html 412679-1.html
 == 412679-2.html 412679-2.html
 == 413027-1.html 413027-1.html
 == 413027-2.html 413027-2.html
 == 413027-3.html 413027-3.html
 == 413286-1a.html 413286-1a.html
 == 413286-1b.html 413286-1b.html
 == 413286-1c.html 413286-1c.html
-fails == 413286-2a.html 413286-2a.html
-fails == 413286-2b.html 413286-2b.html
-fails == 413286-2c.html 413286-2c.html
-fails == 413286-3.html 413286-3.html
-fails == 413286-4a.html 413286-4a.html
-fails == 413286-4b.html 413286-4b.html
-fails == 413286-5.html 413286-5.html
-fails == 413286-6.html 413286-6.html
+== 413286-2a.html 413286-2a.html
+== 413286-2b.html 413286-2b.html
+== 413286-2c.html 413286-2c.html
+== 413286-3.html 413286-3.html
+== 413286-4a.html 413286-4a.html
+== 413286-4b.html 413286-4b.html
+== 413286-5.html 413286-5.html
+== 413286-6.html 413286-6.html
 == 413292-1.html 413292-1.html
 == 413361-1.html 413361-1.html
 == 413840-background-unchanged.html 413840-background-unchanged.html
 == 413840-ltr-offsets.html 413840-ltr-offsets.html
 == 413840-rtl-offsets.html 413840-rtl-offsets.html
 fails == 413840-pushed-line-bullet.html 413840-pushed-line-bullet.html
 == 413840-bullet-first-line.html 413840-bullet-first-line.html
 == 413982.html 413982.html
@@ -1021,17 +1021,17 @@ fails-if(Android) fails-if(usesRepeatRes
 == 421955-1.html 421955-1.html
 fails == 422249-1.html 422249-1.html
 == 422394-1.html 422394-1.html
 fails == 422678-1.html 422678-1.html
 == 423130-1.html 423130-1.html
 == 423385-1.html 423385-1.html
 fails == 423599-1.html 423599-1.html
 == 423676-1.html 423676-1.html
-fails == 423823-1.html 423823-1.html
+== 423823-1.html 423823-1.html
 == 424074-1.xul 424074-1.xul
 fails-if(Android) == 424074-1.xul 424074-1.xul
 random-if(gtkWidget) == 424074-1-ref2.xul 424074-1-ref2.xul
 == 424236-1.html 424236-1.html
 == 424236-2.html 424236-2.html
 == 424236-3.html 424236-3.html
 == 424236-4.html 424236-4.html
 == 424236-5.html 424236-5.html
@@ -1055,19 +1055,19 @@ asserts(3-6) == 427017-1.xhtml 427017-1.
 == 427129-table.html 427129-table.html
 == 427129-image.html 427129-image.html
 == 427129-table-caption.html 427129-table-caption.html
 == 427370-1.html 427370-1.html
 == 427730-1.html 427730-1.html
 == 428278.html 428278.html
 == 428423-1a.html 428423-1a.html
 == 428423-1b.html 428423-1b.html
-fails == 428521-1a.html 428521-1a.html
-fails == 428521-1b.html 428521-1b.html
-fails == 428521-1c.html 428521-1c.html
+== 428521-1a.html 428521-1a.html
+== 428521-1b.html 428521-1b.html
+== 428521-1c.html 428521-1c.html
 == 428810-1a-ltr.html 428810-1a-ltr.html
 == 428810-1b-ltr.html 428810-1b-ltr.html
 == 428810-1c-ltr.html 428810-1c-ltr.html
 == 428810-1d-ltr.html 428810-1d-ltr.html
 == 428810-1-ltr-ref.html 428810-1-ltr-ref.html
 == 428810-2a-ltr.html 428810-2a-ltr.html
 == 428810-2b-ltr.html 428810-2b-ltr.html
 == 428810-2e-ltr.html 428810-2e-ltr.html
@@ -1154,18 +1154,18 @@ fuzzy-if(skiaContent,1,3280) == 438987-2
 fails == 440112.html 440112.html
 fails == 440149-1.html 440149-1.html
 == 441259-1.html 441259-1.html
 == 441259-2.html 441259-2.html
 fails == 442542-1.html 442542-1.html
 fails == 444015-1.html 444015-1.html
 == 444375-1.html 444375-1.html
 fails == 444928-1.html 444928-1.html
-fails == 444928-2.html 444928-2.html
-fails == 444928-3.html 444928-3.html
+== 444928-2.html 444928-2.html
+== 444928-3.html 444928-3.html
 fails random == 445004-1.html 445004-1.html
 == 445142-1a.html 445142-1a.html
 == 445142-1b.html 445142-1b.html
 == 445142-1c.html 445142-1c.html
 == 445142-2a.html 445142-2a.html
 == 445142-2b.html 445142-2b.html
 fails-if(usesRepeatResampling) == 446100-1a.html 446100-1a.html
 fails-if(Android) fails-if(usesRepeatResampling) == 446100-1b.html 446100-1b.html
@@ -1179,17 +1179,17 @@ fails == 447749-1.html 447749-1.html
 fuzzy(127,2) == 448193.html 448193.html
 fails == 449149-1a.html 449149-1a.html
 fails == 449149-1b.html 449149-1b.html
 # Retry the above with XBL scopes
 fails pref(dom.use_xbl_scopes_for_remote_xul,true) == 449149-1a.html 449149-1a.html
 fails pref(dom.use_xbl_scopes_for_remote_xul,true) == 449149-1b.html 449149-1b.html
 == 449149-2.html 449149-2.html
 == 449171-1.html 449171-1.html
-fails == 449362-1.html 449362-1.html
+== 449362-1.html 449362-1.html
 == 449519-1.html 449519-1.html
 == 450670-1.html 450670-1.html
 == 451168-1.html 451168-1.html
 == 451876-1.html 451876-1.html
 == 451876-2.html 451876-2.html
 == 452915-1.html 452915-1.html
 == 452964-1.html 452964-1.html
 == 454361.html 454361.html
@@ -1451,17 +1451,17 @@ fails == 523096-1.html 523096-1.html
 == 528038-1c.html 528038-1c.html
 == 528038-1d.html 528038-1d.html
 == 528038-1e.html 528038-1e.html
 == 528038-1f.html 528038-1f.html
 == 528038-2.html 528038-2.html
 == 528096-1.html 528096-1.html
 fails == 530686-1.html 530686-1.html
 == 531098-1.html 531098-1.html
-fails == 531200-1.html 531200-1.html
+== 531200-1.html 531200-1.html
 == 531371-1.html 531371-1.html
 == 534526-1a.html 534526-1a.html
 fails == 534526-1b.html 534526-1b.html
 == 534804-1.html 534804-1.html
 == 534808-1.html 534808-1.html
 == 534808-2.html 534808-2.html
 == 534919-1.html 534919-1.html
 fails random == 536061.html 536061.html
@@ -1539,18 +1539,18 @@ fuzzy-if(Android,4,180) == 563584-8d.htm
 == 563584-9a.html 563584-9a.html
 == 563584-9b.html 563584-9b.html
 == 563584-9c.html 563584-9c.html
 == 563584-9d.html 563584-9d.html
 fuzzy-if(Android,2,48) == 563584-10a.html 563584-10a.html
 fuzzy-if(Android,2,48) == 563584-10b.html 563584-10b.html
 == 563584-11.html 563584-11.html
 == 563884-1.html 563884-1.html
-fails == 564002-1.html 564002-1.html
-fails == 564054-1.html 564054-1.html
+== 564002-1.html 564002-1.html
+== 564054-1.html 564054-1.html
 == 564991-1.html 564991-1.html
 == 565819-1.html 565819-1.html
 == 565819-2.html 565819-2.html
 fails needs-focus == 568441.html 568441.html
 == 569006-1.html 569006-1.html
 == 571281-1a.html 571281-1a.html
 == 571281-1b.html 571281-1b.html
 == 571281-1c.html 571281-1c.html
@@ -1583,17 +1583,17 @@ fails == 580863-1.html 580863-1.html
 == 582037-1b.html 582037-1b.html
 fuzzy-if(Android,3,256) == 582037-2a.html 582037-2a.html
 fuzzy-if(Android,3,256) == 582037-2b.html 582037-2b.html
 asserts(1-2) == 582146-1.html 582146-1.html
 fails == 582476-1.svg 582476-1.svg
 == 584400-dash-length.svg 584400-dash-length.svg
 == 584699-1.html 584699-1.html
 fails == 585598-2.xhtml 585598-2.xhtml
-fails == 586400-1.html 586400-1.html
+== 586400-1.html 586400-1.html
 fails == 586683-1.html 586683-1.html
 fails == 589615-1a.xhtml 589615-1a.xhtml
 fails == 589615-1b.html 589615-1b.html
 == 589672-1.html 589672-1.html
 == 589682-1.html 589682-1.html
 == 593243-1.html 593243-1.html
 fails == 593243-2.html 593243-2.html
 == 593544-1.html 593544-1.html
--- a/layout/reftests/columns/reftest-stylo.list
+++ b/layout/reftests/columns/reftest-stylo.list
@@ -1,14 +1,14 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 == basic-1.html basic-1.html
 == pref-width-1a.html pref-width-1a.html
 == pref-width-1b.html pref-width-1b.html
 == pref-width-1c.html pref-width-1c.html
-fails == min-width-1a.html min-width-1a.html
+== min-width-1a.html min-width-1a.html
 == min-width-1b.html min-width-1b.html
 == min-width-1c.html min-width-1c.html
 == min-width-2.html min-width-2.html
 == column-balancing-overflow-000.html column-balancing-overflow-000.html
 == column-balancing-overflow-001.html column-balancing-overflow-001.html
 == column-balancing-overflow-002.html column-balancing-overflow-002.html
 == column-balancing-overflow-003.html column-balancing-overflow-003.html
 == column-balancing-overflow-004.html column-balancing-overflow-004.html
--- a/layout/reftests/css-break/reftest-stylo.list
+++ b/layout/reftests/css-break/reftest-stylo.list
@@ -1,13 +1,13 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 default-preferences pref(layout.css.box-decoration-break.enabled,true)
 
-fails == box-decoration-break-1.html box-decoration-break-1.html
-fails == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1.html
-fails == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1.html
+== box-decoration-break-1.html box-decoration-break-1.html
+== box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1.html
+== box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1.html
 fails == box-decoration-break-border-image.html box-decoration-break-border-image.html
 == box-decoration-break-block-border-padding.html box-decoration-break-block-border-padding.html
 == box-decoration-break-block-margin.html box-decoration-break-block-margin.html
 fails == box-decoration-break-first-letter.html box-decoration-break-first-letter.html
 == box-decoration-break-with-bidi.html box-decoration-break-with-bidi.html
 == box-decoration-break-bug-1235152.html box-decoration-break-bug-1235152.html
 == box-decoration-break-bug-1249913.html box-decoration-break-bug-1249913.html
--- a/layout/reftests/pagination/reftest-stylo.list
+++ b/layout/reftests/pagination/reftest-stylo.list
@@ -53,23 +53,23 @@ pref(layout.float-fragments-inside-colum
 == table-page-break-after-always-1.html table-page-break-after-always-1.html
 == table-page-break-after-left-1.html table-page-break-after-left-1.html
 == table-page-break-after-right-1.html table-page-break-after-right-1.html
 == rowgroup-page-break-after-always-1.html rowgroup-page-break-after-always-1.html
 == row-page-break-after-always-1.html row-page-break-after-always-1.html
 == row-page-break-after-always-2.html row-page-break-after-always-2.html
 == rowgroup-thead-page-break-after-always-1.html rowgroup-thead-page-break-after-always-1.html
 == rowgroup-tfoot-page-break-after-always-1.html rowgroup-tfoot-page-break-after-always-1.html
-fails == table-tfoot-thead-1.html table-tfoot-thead-1.html
-fails == table-caption-splitrowgroup-1.html table-caption-splitrowgroup-1.html
-fails == table-caption-splitaftercaption-1.html table-caption-splitaftercaption-1.html
-fails == table-caption-splitaftercaption-2.html table-caption-splitaftercaption-2.html
-fails == table-caption-splitaftercaption-3.html table-caption-splitaftercaption-3.html
-fails == table-caption-splitaftercaption-4.html table-caption-splitaftercaption-4.html
-fails == table-caption-splitaftercaption-5.html table-caption-splitaftercaption-5.html
-fails == table-caption-splitaftercaption-6.html table-caption-splitaftercaption-6.html
-fails == table-caption-splitaftercaption-7.html table-caption-splitaftercaption-7.html
-fails == table-caption-splitaftercaption-8.html table-caption-splitaftercaption-8.html # Bug 1341648
-fails == table-caption-splitaftercaption-9.html table-caption-splitaftercaption-9.html # Bug 1341648
-fails == table-caption-splitaftercaption-10.html table-caption-splitaftercaption-10.html # Bug 1341648
-fails == table-caption-splitaftercaption-11.html table-caption-splitaftercaption-11.html # Bug 1341648
+== table-tfoot-thead-1.html table-tfoot-thead-1.html
+== table-caption-splitrowgroup-1.html table-caption-splitrowgroup-1.html
+== table-caption-splitaftercaption-1.html table-caption-splitaftercaption-1.html
+== table-caption-splitaftercaption-2.html table-caption-splitaftercaption-2.html
+== table-caption-splitaftercaption-3.html table-caption-splitaftercaption-3.html
+== table-caption-splitaftercaption-4.html table-caption-splitaftercaption-4.html
+== table-caption-splitaftercaption-5.html table-caption-splitaftercaption-5.html
+== table-caption-splitaftercaption-6.html table-caption-splitaftercaption-6.html
+== table-caption-splitaftercaption-7.html table-caption-splitaftercaption-7.html
+== table-caption-splitaftercaption-8.html table-caption-splitaftercaption-8.html # Bug 1341648
+== table-caption-splitaftercaption-9.html table-caption-splitaftercaption-9.html # Bug 1341648
+== table-caption-splitaftercaption-10.html table-caption-splitaftercaption-10.html # Bug 1341648
+== table-caption-splitaftercaption-11.html table-caption-splitaftercaption-11.html # Bug 1341648
 == column-balancing-break-inside-avoid-2.html column-balancing-break-inside-avoid-2.html
 fails == combobox-page-break-inside.html combobox-page-break-inside.html
--- a/layout/reftests/printing/reftest-stylo.list
+++ b/layout/reftests/printing/reftest-stylo.list
@@ -1,16 +1,16 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 # Sanity check
 == blank.html blank.html
 
 # Bugs
 == 272830-1.html 272830-1.html
 == 318022-1.html 318022-1.html
-fails == 403669-1.html 403669-1.html
+== 403669-1.html 403669-1.html
 == 381497-n.html 381497-n.html
 == test-async-print.html test-async-print.html
 == 129941-1a.html 129941-1a.html
 fails == 129941-1b.html 129941-1b.html
 == 609227-1.html 609227-1.html
 == 609227-2a.html 609227-2a.html
 == 609227-2b.html 609227-2b.html
 == 577450-1.html 577450-1.html
--- a/layout/reftests/table-anonymous-boxes/reftest-stylo.list
+++ b/layout/reftests/table-anonymous-boxes/reftest-stylo.list
@@ -27,33 +27,33 @@
 == 372641-1b.xhtml 372641-1b.xhtml
 == 372641-1c.xhtml 372641-1c.xhtml
 == 372649-1.html 372649-1.html
 == 373379-1.html 373379-1.html
 == 394402-1a.html 394402-1a.html
 == 394402-1b.html 394402-1b.html
 == 398095-1.html 398095-1.html
 == 407115-1.html 407115-1.html
-fails == 443616-1a.xhtml 443616-1a.xhtml
-fails == 443616-1b.html 443616-1b.html
+== 443616-1a.xhtml 443616-1a.xhtml
+== 443616-1b.html 443616-1b.html
 == 448111-1.html 448111-1.html
 fails == 490174-1.html 490174-1.html
 == 695538-1.html 695538-1.html
 == infer-first-row.html infer-first-row.html
 == infer-first-row-and-table.html infer-first-row-and-table.html
 == infer-second-row.html infer-second-row.html
 == infer-second-row-and-table.html infer-second-row-and-table.html
 == infer-table-around-headers-footers-1.html infer-table-around-headers-footers-1.html
 == infer-table-around-headers-footers-2.html infer-table-around-headers-footers-2.html
 == infer-table-around-headers-footers-3.html infer-table-around-headers-footers-3.html
 == infer-rows-inside-rowgroups.html infer-rows-inside-rowgroups.html
 == infer-table-row-cell.html infer-table-row-cell.html
 == infer-table.html infer-table.html
-fails == 3-tables-ref.html 3-tables-ref.html # Bug 1341775
-fails == 3-tables-ref.html 3-tables-ref.html # Bug 1341775
+== 3-tables-ref.html 3-tables-ref.html
+== 3-tables-ref.html 3-tables-ref.html
 == blocks-divide-tables-1.html blocks-divide-tables-1.html
 == blocks-divide-tables-2.html blocks-divide-tables-2.html
 == infer-cells-1.html infer-cells-1.html
 == infer-cells-2.html infer-cells-2.html
 == infer-cells-3.html infer-cells-3.html
 == infer-cells-4.html infer-cells-4.html
 == cols-test-1.html cols-test-1.html
 == cols-test-2.html cols-test-2.html
--- a/layout/reftests/table-overflow/reftest-stylo.list
+++ b/layout/reftests/table-overflow/reftest-stylo.list
@@ -1,7 +1,7 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
 fails == bug785684-x.html bug785684-x.html
 fails == bug785684-y.html bug785684-y.html
-fails == table-row-pagination.html table-row-pagination.html
-fails == 963441.html 963441.html
+== table-row-pagination.html table-row-pagination.html
+== 963441.html 963441.html
 fails == table-caption-scroll.html table-caption-scroll.html
 == table-cell-block-overflow.html table-cell-block-overflow.html
--- a/layout/reftests/table-width/reftest-stylo.list
+++ b/layout/reftests/table-width/reftest-stylo.list
@@ -1,13 +1,13 @@
 # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
-fails == spacing-invariance-quirks-min.html spacing-invariance-quirks-min.html
-fails == spacing-invariance-quirks-pref.html spacing-invariance-quirks-pref.html
-fails == spacing-invariance-standards-min.html spacing-invariance-standards-min.html
-fails == spacing-invariance-standards-pref.html spacing-invariance-standards-pref.html
+== spacing-invariance-quirks-min.html spacing-invariance-quirks-min.html
+== spacing-invariance-quirks-pref.html spacing-invariance-quirks-pref.html
+== spacing-invariance-standards-min.html spacing-invariance-standards-min.html
+== spacing-invariance-standards-pref.html spacing-invariance-standards-pref.html
 == min-width.html min-width.html
 == pref-width.html pref-width.html
 == min-width-ref.html min-width-ref.html
 == percent-large.html percent-large.html
 == percent-large-min.html percent-large-min.html
 == percent-large-nested.html percent-large-nested.html
 == percent-small.html percent-small.html
 == percent-small-min.html percent-small-min.html
@@ -33,19 +33,19 @@ fails == spacing-invariance-standards-pr
 == conflicting-percent-widths-1.html conflicting-percent-widths-1.html
 == conflicting-percent-widths-2.html conflicting-percent-widths-2.html
 == conflicting-percent-widths-3.html conflicting-percent-widths-3.html
 == percent-truncation-1.html percent-truncation-1.html
 == percent-truncation-2.html percent-truncation-2.html
 == percent-truncation-3.html percent-truncation-3.html
 fails == balancing-1.html balancing-1.html
 == balancing-2.html balancing-2.html
-fails == cellpadding.html cellpadding.html # Bug 1341648, bug 1341651
-fails == cellspacing.html cellspacing.html
-fails == percent-basis.html percent-basis.html
+== cellpadding.html cellpadding.html # Bug 1341648, bug 1341651
+== cellspacing.html cellspacing.html
+== percent-basis.html percent-basis.html
 == default-box-sizing-separate-standards.html default-box-sizing-separate-standards.html
 == default-box-sizing-separate-quirks.html default-box-sizing-separate-quirks.html
 == default-box-sizing-collapse-standards.html default-box-sizing-collapse-standards.html
 == default-box-sizing-collapse-quirks.html default-box-sizing-collapse-quirks.html
 == colspan-percent-distribution-1.html colspan-percent-distribution-1.html
 == colspan-percent-distribution-2.html colspan-percent-distribution-2.html
 == spanning-cell-sort-1-small.html spanning-cell-sort-1-small.html
 == spanning-cell-sort-1-large.html spanning-cell-sort-1-large.html
@@ -56,12 +56,12 @@ fails == percent-basis.html percent-basi
 == spanning-cell-sort-2-small-fixed.html spanning-cell-sort-2-small-fixed.html
 == spanning-cell-sort-2-large-fixed.html spanning-cell-sort-2-large-fixed.html
 == colgroup-vs-column-1.html colgroup-vs-column-1.html
 == colgroup-vs-column-2.html colgroup-vs-column-2.html
 == colgroup-vs-column-3.html colgroup-vs-column-3.html
 == colgroup-vs-column-4.html colgroup-vs-column-4.html
 == dynamic-fixed-layout-1.html dynamic-fixed-layout-1.html
 == cell-pref-width-border-box.html cell-pref-width-border-box.html
-fails == colspan-distribute-to-empty-1a.html colspan-distribute-to-empty-1a.html
-fails == colspan-distribute-to-empty-1b.html colspan-distribute-to-empty-1b.html
-fails == colspan-distribute-to-empty-2.html colspan-distribute-to-empty-2.html
-fails == distribute-percent-nonoriginating.html distribute-percent-nonoriginating.html
+== colspan-distribute-to-empty-1a.html colspan-distribute-to-empty-1a.html
+== colspan-distribute-to-empty-1b.html colspan-distribute-to-empty-1b.html
+== colspan-distribute-to-empty-2.html colspan-distribute-to-empty-2.html
+== distribute-percent-nonoriginating.html distribute-percent-nonoriginating.html
--- a/layout/reftests/w3c-css/submitted/css21/pagination/reftest-stylo.list
+++ b/layout/reftests/w3c-css/submitted/css21/pagination/reftest-stylo.list
@@ -4,29 +4,29 @@
 == moz-css21-block-page-break-inside-avoid-3.html moz-css21-block-page-break-inside-avoid-3.html
 == moz-css21-block-page-break-inside-avoid-4.html moz-css21-block-page-break-inside-avoid-4.html
 == moz-css21-block-page-break-inside-avoid-5.html moz-css21-block-page-break-inside-avoid-5.html
 == moz-css21-block-page-break-inside-avoid-6.html moz-css21-block-page-break-inside-avoid-6.html
 == moz-css21-block-page-break-inside-avoid-7.html moz-css21-block-page-break-inside-avoid-7.html
 == moz-css21-block-page-break-inside-avoid-8.html moz-css21-block-page-break-inside-avoid-8.html
 == moz-css21-block-page-break-inside-avoid-9.html moz-css21-block-page-break-inside-avoid-9.html
 == moz-css21-block-page-break-inside-avoid-10.html moz-css21-block-page-break-inside-avoid-10.html
-fails == moz-css21-block-page-break-inside-avoid-11.html moz-css21-block-page-break-inside-avoid-11.html
+== moz-css21-block-page-break-inside-avoid-11.html moz-css21-block-page-break-inside-avoid-11.html
 == moz-css21-block-page-break-inside-avoid-12.html moz-css21-block-page-break-inside-avoid-12.html
 == moz-css21-block-page-break-inside-avoid-13.html moz-css21-block-page-break-inside-avoid-13.html
 == moz-css21-block-page-break-inside-avoid-14.html moz-css21-block-page-break-inside-avoid-14.html
 fails == moz-css21-block-page-break-inside-avoid-15.html moz-css21-block-page-break-inside-avoid-15.html
 == moz-css21-table-page-break-inside-avoid-1.html moz-css21-table-page-break-inside-avoid-1.html
 == moz-css21-table-page-break-inside-avoid-2.html moz-css21-table-page-break-inside-avoid-2.html
 == moz-css21-table-page-break-inside-avoid-3.html moz-css21-table-page-break-inside-avoid-3.html
 == moz-css21-table-page-break-inside-avoid-4.html moz-css21-table-page-break-inside-avoid-4.html
 fails == moz-css21-table-page-break-inside-avoid-5.html moz-css21-table-page-break-inside-avoid-5.html
-fails == moz-css21-table-page-break-inside-avoid-6.html moz-css21-table-page-break-inside-avoid-6.html
-fails == moz-css21-table-page-break-inside-avoid-7.html moz-css21-table-page-break-inside-avoid-7.html
-fails == moz-css21-table-page-break-inside-avoid-8.html moz-css21-table-page-break-inside-avoid-8.html
+== moz-css21-table-page-break-inside-avoid-6.html moz-css21-table-page-break-inside-avoid-6.html
+== moz-css21-table-page-break-inside-avoid-7.html moz-css21-table-page-break-inside-avoid-7.html
+== moz-css21-table-page-break-inside-avoid-8.html moz-css21-table-page-break-inside-avoid-8.html
 == moz-css21-float-page-break-inside-avoid-1.html moz-css21-float-page-break-inside-avoid-1.html
 == moz-css21-float-page-break-inside-avoid-2.html moz-css21-float-page-break-inside-avoid-2.html
 == moz-css21-float-page-break-inside-avoid-3.html moz-css21-float-page-break-inside-avoid-3.html
 == moz-css21-float-page-break-inside-avoid-4.html moz-css21-float-page-break-inside-avoid-4.html
 == moz-css21-float-page-break-inside-avoid-5.html moz-css21-float-page-break-inside-avoid-5.html
 == moz-css21-float-page-break-inside-avoid-6.html moz-css21-float-page-break-inside-avoid-6.html
 == moz-css21-float-page-break-inside-avoid-7.html moz-css21-float-page-break-inside-avoid-7.html
 == moz-css21-float-page-break-inside-avoid-8.html moz-css21-float-page-break-inside-avoid-8.html
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -41,16 +41,17 @@
 #include "mozilla/Keyframe.h"
 #include "mozilla/ServoElementSnapshot.h"
 #include "mozilla/ServoRestyleManager.h"
 #include "mozilla/StyleAnimationValue.h"
 #include "mozilla/SystemGroup.h"
 #include "mozilla/DeclarationBlockInlines.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ElementInlines.h"
+#include "mozilla/dom/HTMLTableCellElement.h"
 #include "mozilla/LookAndFeel.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 #define SERVO_ARC_TYPE(name_, type_) \
   already_AddRefed<type_>            \
   type_##Strong::Consume() {         \
@@ -377,16 +378,33 @@ Gecko_GetHTMLPresentationAttrDeclaration
     }
     return nullptr;
   }
 
   const RefPtr<RawServoDeclarationBlock>& servo = attrs->GetServoStyle();
   return reinterpret_cast<const RawServoDeclarationBlockStrong*>(&servo);
 }
 
+RawServoDeclarationBlockStrongBorrowedOrNull
+Gecko_GetExtraContentStyleDeclarations(RawGeckoElementBorrowed aElement)
+{
+  static_assert(sizeof(RefPtr<RawServoDeclarationBlock>) ==
+                sizeof(RawServoDeclarationBlockStrong),
+                "RefPtr should just be a pointer");
+  if (!aElement->IsAnyOfHTMLElements(nsGkAtoms::td, nsGkAtoms::th)) {
+    return nullptr;
+  }
+  const HTMLTableCellElement* cell = static_cast<const HTMLTableCellElement*>(aElement);
+  if (nsMappedAttributes* attrs = cell->GetMappedAttributesInheritedFromTable()) {
+    const RefPtr<RawServoDeclarationBlock>& servo = attrs->GetServoStyle();
+    return reinterpret_cast<const RawServoDeclarationBlockStrong*>(&servo);
+  }
+  return nullptr;
+}
+
 bool
 Gecko_GetAnimationRule(RawGeckoElementBorrowed aElement,
                        nsIAtom* aPseudoTag,
                        EffectCompositor::CascadeLevel aCascadeLevel,
                        RawServoAnimationValueMapBorrowed aAnimationValues)
 {
   MOZ_ASSERT(aElement, "Invalid GeckoElement");
   MOZ_ASSERT(!aPseudoTag ||
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -190,16 +190,18 @@ SERVO_DECLARE_ELEMENT_ATTR_MATCHING_FUNC
 
 #undef SERVO_DECLARE_ELEMENT_ATTR_MATCHING_FUNCTIONS
 
 // Style attributes.
 RawServoDeclarationBlockStrongBorrowedOrNull
 Gecko_GetStyleAttrDeclarationBlock(RawGeckoElementBorrowed element);
 RawServoDeclarationBlockStrongBorrowedOrNull
 Gecko_GetHTMLPresentationAttrDeclarationBlock(RawGeckoElementBorrowed element);
+RawServoDeclarationBlockStrongBorrowedOrNull
+Gecko_GetExtraContentStyleDeclarations(RawGeckoElementBorrowed element);
 
 // Animations
 bool
 Gecko_GetAnimationRule(RawGeckoElementBorrowed aElement,
                        nsIAtom* aPseudoTag,
                        mozilla::EffectCompositor::CascadeLevel aCascadeLevel,
                        RawServoAnimationValueMapBorrowed aAnimationValues);
 bool Gecko_StyleAnimationsEquals(RawGeckoStyleAnimationListBorrowed,
--- a/layout/style/test/stylo-failures.md
+++ b/layout/style/test/stylo-failures.md
@@ -71,17 +71,16 @@ to mochitest command.
   * @keyframes
     * test_keyframes_rules.html [1]
     * test_rules_out_of_sheets.html [1]
   * @support
     * test_supports_rules.html [1]
 * test_box_size_keywords.html: moz-prefixed intrinsic size keyword value [64]
 * test_bug357614.html: case-insensitivity for old attrs in attr selector servo/servo#15006 [2]
 * mapped attribute not supported
-  * test_bug363146.html [2]
   * test_html_attribute_computed_values.html: also list-style-type [8]
 * test_bug387615.html: servo/servo#15006 [1]
 * test_bug397427.html: @import issue bug 1331291 and CSSOM support of @import [1]
 * console support:
   * test_bug413958.html `monitorConsole` [3]
   * test_parser_diagnostics_unprintables.html [550]
 * test_bug511909.html: @-moz-document and @media support [4]
 * Transition support: