1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Issue #2488 - Part 4: Remove the RestyleManagerHandle smart pointer class

This commit is contained in:
FranklinDM
2024-03-29 16:08:08 +08:00
committed by roytam1
parent 4bf43b8fb4
commit 6803c1f710
24 changed files with 55 additions and 414 deletions
+7 -8
View File
@@ -79,8 +79,7 @@
#include "nsAutoLayoutPhase.h"
#include "nsStyleStructInlines.h"
#include "nsPageContentFrame.h"
#include "mozilla/RestyleManagerHandle.h"
#include "mozilla/RestyleManagerHandleInlines.h"
#include "mozilla/RestyleManager.h"
#include "StickyScrollContainer.h"
#include "nsFieldSetFrame.h"
#include "nsInlineFrame.h"
@@ -454,7 +453,7 @@ AnyKidsNeedBlockParent(nsIFrame *aFrameList)
// Reparent a frame into a wrapper frame that is a child of its old parent.
static void
ReparentFrame(RestyleManagerHandle aRestyleManager,
ReparentFrame(RestyleManager* aRestyleManager,
nsContainerFrame* aNewParentFrame,
nsIFrame* aFrame)
{
@@ -467,7 +466,7 @@ ReparentFrames(nsCSSFrameConstructor* aFrameConstructor,
nsContainerFrame* aNewParentFrame,
const nsFrameList& aFrameList)
{
RestyleManagerHandle restyleManager = aFrameConstructor->RestyleManager();
RestyleManager* restyleManager = aFrameConstructor->RestyleManager();
for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
ReparentFrame(restyleManager, aNewParentFrame, e.get());
}
@@ -1883,9 +1882,9 @@ nsCSSFrameConstructor::CreateGeneratedContentItem(nsFrameConstructorState& aStat
return;
}
if (mozilla::RestyleManager* geckoRM = RestyleManager()->GetAsGecko()) {
if (mozilla::RestyleManager* restyleManager = RestyleManager()) {
RestyleManager::ReframingStyleContexts* rsc =
geckoRM->GetReframingStyleContexts();
restyleManager->GetReframingStyleContexts();
if (rsc) {
nsStyleContext* oldStyleContext = rsc->Get(container, aPseudoElement);
if (oldStyleContext) {
@@ -5056,9 +5055,9 @@ nsCSSFrameConstructor::ResolveStyleContext(nsStyleContext* aParentStyleContext,
result = styleSet->ResolveStyleForText(aContent, aParentStyleContext);
}
if (mozilla::RestyleManager* geckoRM = RestyleManager()->GetAsGecko()) {
if (mozilla::RestyleManager* restyleManager = RestyleManager()) {
RestyleManager::ReframingStyleContexts* rsc =
geckoRM->GetReframingStyleContexts();
restyleManager->GetReframingStyleContexts();
if (rsc) {
nsStyleContext* oldStyleContext =
rsc->Get(aContent, CSSPseudoElementType::NotPseudo);