Bug 1349457 - stylo: Eagerly style generated content. r=bholley draft
authorCameron McCormack <cam@mcc.id.au>
Thu, 23 Mar 2017 11:44:00 +0800
changeset 503341 7f935ac0ae8bb5079041b1946ee68532ac625a78
parent 503306 7513b3f42058e9bcf9950d4acf4647d4ad2240f0
child 550398 00a6afa62654a047dccd9b53378035b6f1ee67af
push id50547
push userbmo:cam@mcc.id.au
push dateThu, 23 Mar 2017 03:44:50 +0000
reviewersbholley
bugs1349457
milestone55.0a1
Bug 1349457 - stylo: Eagerly style generated content. r=bholley MozReview-Commit-ID: Jv3hNEjUonp
layout/base/nsCSSFrameConstructor.cpp
layout/generic/crashtests/crashtests.list
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -1908,16 +1908,20 @@ nsCSSFrameConstructor::CreateGeneratedCo
     nsCOMPtr<nsIContent> content =
       CreateGeneratedContent(aState, aParentContent, pseudoStyleContext,
                              contentIndex);
     if (content) {
       container->AppendChildTo(content, false);
     }
   }
 
+  if (aParentContent->IsStyledByServo()) {
+    mPresShell->StyleSet()->AsServo()->StyleNewSubtree(container);
+  }
+
   AddFrameConstructionItemsInternal(aState, container, aParentFrame, elemName,
                                     kNameSpaceID_None, true,
                                     pseudoStyleContext,
                                     ITEM_IS_GENERATED_CONTENT, nullptr,
                                     aItems);
 }
 
 /****************************************************
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -77,17 +77,17 @@ load 368568.html
 load 368752.html
 load 368860-1.html
 load 368863-1.html
 load 369038-1.xhtml
 load 369150-1.html
 load 369150-2.html
 load 369227-1.xhtml
 load 369542-1.html
-load 369542-2.html
+asserts-if(stylo,2) load 369542-2.html # bug 1324646
 load 369547-1.html
 load 370174-1.html
 load 370174-2.html
 load 370174-3.html
 load 370174-4.html
 load 370699-1.html
 load 370794-1.html
 load 370866-1.xhtml
@@ -410,17 +410,17 @@ asserts-if(stylo,4) load 553504-1.xhtml 
 load 564368-1.xhtml
 load 564968.xhtml
 load 569193-1.html
 load 570160.html
 load 570289-1.html
 load 571618-1.svg
 asserts(1) asserts-if(stylo,0-1) load 571975-1.html # bug 574889
 load 571995.xhtml
-load 574958.xhtml # bug 1323696
+asserts-if(stylo,2) load 574958.xhtml # bug 1324646
 asserts(0-4) load 578977.html # bug 757305
 load 580504-1.xhtml
 load 585598-1.xhtml
 load 586806-1.html
 load 586806-2.html
 load 586806-3.html
 load 586973-1.html
 load 589002-1.html