Issue #2765 - Follow-up: Avoid declaring RefPtr in the return statement

This commit is contained in:
Francis Dominic Fajardo
2025-06-28 16:14:55 +08:00
committed by roytam1
parent 6e358f1039
commit e4630ce481
+2 -1
View File
@@ -9348,7 +9348,8 @@ nsLayoutUtils::GetNonAnonymousStyleContext(nsIFrame* aFrame)
}
MOZ_ASSERT(node, "Native anonymous element with no originating node?");
if (nsIFrame* primaryFrame = node->GetPrimaryFrame()) {
return RefPtr<nsStyleContext>(primaryFrame->StyleContext()).forget();
RefPtr<nsStyleContext> context = primaryFrame->StyleContext();
return context.forget();
}
// If the element doesn't have primary frame, get the computed style
// from the element directly.