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
+9 -10
View File
@@ -178,8 +178,7 @@
#include "nsPlaceholderFrame.h"
#include "nsTransitionManager.h"
#include "ChildIterator.h"
#include "mozilla/RestyleManagerHandle.h"
#include "mozilla/RestyleManagerHandleInlines.h"
#include "mozilla/RestyleManager.h"
#include "nsIDOMHTMLElement.h"
#include "nsIDragSession.h"
#include "nsIFrameInlines.h"
@@ -567,7 +566,7 @@ VerifyStyleTree(nsPresContext* aPresContext, nsFrameManager* aFrameManager)
{
if (nsFrame::GetVerifyStyleTreeEnable()) {
nsIFrame* rootFrame = aFrameManager->GetRootFrame();
aPresContext->RestyleManager()->AsGecko()->DebugVerifyStyleTree(rootFrame);
aPresContext->RestyleManager()->DebugVerifyStyleTree(rootFrame);
}
}
#define VERIFY_STYLE_TREE ::VerifyStyleTree(mPresContext, mFrameConstructor)
@@ -2857,7 +2856,7 @@ PresShell::RecreateFramesFor(nsIContent* aContent)
// Mark ourselves as not safe to flush while we're doing frame construction.
++mChangeNestCount;
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
RestyleManager* restyleManager = mPresContext->RestyleManager();
nsresult rv = restyleManager->ProcessRestyledFrames(changeList);
restyleManager->FlushOverflowChangedTracker();
--mChangeNestCount;
@@ -3643,7 +3642,7 @@ void
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
bool aFlushOnHoverChange)
{
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
RestyleManager* restyleManager = mPresContext->RestyleManager();
uint32_t hoverGenerationBefore =
restyleManager->GetHoverGeneration();
nsEventStatus status;
@@ -4448,7 +4447,7 @@ nsIPresShell::RestyleForCSSRuleChanges()
return;
}
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
RestyleManager* restyleManager = mPresContext->RestyleManager();
if (scopeRoots.IsEmpty()) {
// If scopeRoots is empty, we know that mStylesHaveChanged was true at
// the beginning of this function, and that we need to restyle the whole
@@ -6731,7 +6730,7 @@ FlushThrottledStyles(nsIDocument *aDocument, void *aData)
if (shell && shell->IsVisible()) {
nsPresContext* presContext = shell->GetPresContext();
if (presContext) {
presContext->RestyleManager()->AsGecko()->UpdateOnlyAnimationStyles();
presContext->RestyleManager()->UpdateOnlyAnimationStyles();
}
}
@@ -9477,9 +9476,9 @@ PresShell::Observe(nsISupports* aSubject,
{
nsAutoScriptBlocker scriptBlocker;
++mChangeNestCount;
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
restyleManager->AsGecko()->ProcessRestyledFrames(changeList);
restyleManager->AsGecko()->FlushOverflowChangedTracker();
RestyleManager* restyleManager = mPresContext->RestyleManager();
restyleManager->ProcessRestyledFrames(changeList);
restyleManager->FlushOverflowChangedTracker();
--mChangeNestCount;
}
}