summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-07-15 04:11:48 +0000
committerMoonchild <moonchild@palemoon.org>2021-07-15 04:11:48 +0000
commitc198ef11b9d2697501b3ea4cbcab98e4dad48a9d (patch)
tree248d2f8df51e96c0d518ae5c782ad801ec53702f
parentcaf98496b7a98a01bbd681a9186b6a1be9b86287 (diff)
downloaduxp-c198ef11b9d2697501b3ea4cbcab98e4dad48a9d.tar.gz
[layout] Ensure we set the primary frame for native anon content where needed.
-rw-r--r--layout/base/nsCSSFrameConstructor.cpp4
1 files changed, 3 insertions, 1 deletions
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 */