Bug 1279354 - Part 1: Always call SetPrimaryFrame for NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT frames (unless there is one already), including when mCreatingExtraFrames is true. r=dholbert, a=gchang
authorMats Palmgren <mats@mozilla.com>
Mon, 28 Nov 2016 23:00:20 +0100
changeset 352743 7e0b24a260ed816cf3269c4ef3f997a1541860c2
parent 352742 af2cb10a3309fb6fe129bbb8c1436f8fbc501d11
child 352744 c0378c5b192fb93bcde07b77d5ba59197920e37e
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, gchang
bugs1279354
milestone52.0a2
Bug 1279354 - Part 1: Always call SetPrimaryFrame for NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT frames (unless there is one already), including when mCreatingExtraFrames is true. r=dholbert, a=gchang
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -4073,17 +4073,18 @@ nsCSSFrameConstructor::ConstructFrameFro
     primaryFrame->AddStateBits(NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT);
   }
 
   // Even if mCreatingExtraFrames is set, we may need to SetPrimaryFrame for
   // generated content that doesn't have one yet.  Note that we have to examine
   // the frame bit, because by this point mIsGeneratedContent has been cleared
   // on aItem.
   if ((!aState.mCreatingExtraFrames ||
-       ((primaryFrame->GetStateBits() & NS_FRAME_GENERATED_CONTENT) &&
+       (primaryFrame->HasAnyStateBits(NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT |
+                                      NS_FRAME_GENERATED_CONTENT) &&
         !aItem.mContent->GetPrimaryFrame())) &&
        !(bits & FCDATA_SKIP_FRAMESET)) {
     aItem.mContent->SetPrimaryFrame(primaryFrame);
     ActiveLayerTracker::TransferActivityToFrame(aItem.mContent, primaryFrame);
   }
 }
 
 // after the node has been constructed and initialized create any