diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 25a5e58108..df793c67f8 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -3463,8 +3463,10 @@ nsCSSFrameConstructor::ConstructTextFrame(const FrameConstructionData* aData, // Add the newly constructed frame to the flow aFrameItems.AddChild(newFrame); - if (!aState.mCreatingExtraFrames) + if (!aState.mCreatingExtraFrames || + (aContent->IsInNativeAnonymousSubtree() && !aContent->GetPrimaryFrame())) { aContent->SetPrimaryFrame(newFrame); + } } /* static */