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
commit 6803c1f710
24 changed files with 55 additions and 414 deletions

View file

@ -14,8 +14,7 @@
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsCSSAnonBoxes.h"
#include "mozilla/RestyleManagerHandle.h"
#include "mozilla/RestyleManagerHandleInlines.h"
#include "mozilla/RestyleManager.h"
#include "nsDisplayList.h"
#include "mozilla/Likely.h"
#include "SVGTextFrame.h"
@ -346,7 +345,7 @@ ReparentChildListStyle(nsPresContext* aPresContext,
const nsFrameList::Slice& aFrames,
nsIFrame* aParentFrame)
{
RestyleManagerHandle restyleManager = aPresContext->RestyleManager();
RestyleManager* restyleManager = aPresContext->RestyleManager();
for (nsFrameList::Enumerator e(aFrames); !e.AtEnd(); e.Next()) {
NS_ASSERTION(e.get()->GetParent() == aParentFrame, "Bogus parentage");
@ -493,7 +492,7 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags)
if (!(aFlags & eDontReparentFrames)) {
nsIFrame* firstChild = overflowFrames->FirstChild();
const bool doReparentSC = (aFlags & eInFirstLine);
RestyleManagerHandle restyleManager = PresContext()->RestyleManager();
RestyleManager* restyleManager = PresContext()->RestyleManager();
for (nsIFrame* f = firstChild; f; f = f->GetNextSibling()) {
f->SetParent(this);
if (doReparentSC) {
@ -560,7 +559,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
nsLineLayout* lineLayout = aReflowInput.mLineLayout;
bool inFirstLine = aReflowInput.mLineLayout->GetInFirstLine();
RestyleManagerHandle restyleManager = aPresContext->RestyleManager();
RestyleManager* restyleManager = aPresContext->RestyleManager();
WritingMode frameWM = aReflowInput.GetWritingMode();
WritingMode lineWM = aReflowInput.mLineLayout->mRootSpan->mWritingMode;
LogicalMargin framePadding = aReflowInput.ComputedLogicalBorderPadding();