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
authorMats Palmgren <mats@mozilla.com>
Mon, 28 Nov 2016 23:00:20 +0100
changeset 324460 8ab6fa7197165bf619d844a4a622bded8beb9579
parent 324459 67cb3a7529115dad9be5a8a3d4e49176b8775c3b
child 324461 6e5b80d58f438a44488d88ead7259dd69db5aeec
push id31006
push usercbook@mozilla.com
push dateTue, 29 Nov 2016 10:40:01 +0000
treeherdermozilla-central@f8107cf96144 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1279354
milestone53.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 1279354 part 1 - Always call SetPrimaryFrame for NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT frames (unless there is one already), including when mCreatingExtraFrames is true. r=dholbert
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -4079,17 +4079,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