mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-26 17:17:31 +09:00
Simplify the overflow child frame reparenting in
nsInlineFrame::DestroyFrom.
This commit is contained in:
parent
37c5f72be6
commit
a67d5f872c
2 changed files with 2 additions and 7 deletions
|
|
@ -199,8 +199,7 @@ nsInlineFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
// Fixup the parent pointers for any child frames on the OverflowList.
|
// Fixup the parent pointers for any child frames on the OverflowList.
|
||||||
// nsIFrame::DestroyFrom depends on that to find the sticky scroll
|
// nsIFrame::DestroyFrom depends on that to find the sticky scroll
|
||||||
// container (an ancestor).
|
// container (an ancestor).
|
||||||
nsIFrame* lineContainer = nsLayoutUtils::FindNearestBlockAncestor(this);
|
overflowFrames->ApplySetParent(this);
|
||||||
DrainSelfOverflowListInternal(eForDestroy, lineContainer);
|
|
||||||
}
|
}
|
||||||
nsContainerFrame::DestroyFrom(aDestructRoot);
|
nsContainerFrame::DestroyFrom(aDestructRoot);
|
||||||
}
|
}
|
||||||
|
|
@ -508,8 +507,7 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags,
|
||||||
if (aLineContainer && aLineContainer->GetPrevContinuation()) {
|
if (aLineContainer && aLineContainer->GetPrevContinuation()) {
|
||||||
ReparentFloatsForInlineChild(aLineContainer, firstChild, true);
|
ReparentFloatsForInlineChild(aLineContainer, firstChild, true);
|
||||||
}
|
}
|
||||||
const bool doReparentSC =
|
const bool doReparentSC = (aFlags & eInFirstLine);
|
||||||
(aFlags & eInFirstLine) && !(aFlags & eForDestroy);
|
|
||||||
RestyleManagerHandle restyleManager = PresContext()->RestyleManager();
|
RestyleManagerHandle restyleManager = PresContext()->RestyleManager();
|
||||||
for (nsIFrame* f = firstChild; f; f = f->GetNextSibling()) {
|
for (nsIFrame* f = firstChild; f; f = f->GetNextSibling()) {
|
||||||
f->SetParent(this);
|
f->SetParent(this);
|
||||||
|
|
|
||||||
|
|
@ -175,9 +175,6 @@ private:
|
||||||
enum DrainFlags {
|
enum DrainFlags {
|
||||||
eDontReparentFrames = 1, // skip reparenting the overflow list frames
|
eDontReparentFrames = 1, // skip reparenting the overflow list frames
|
||||||
eInFirstLine = 2, // the request is for an inline descendant of a nsFirstLineFrame
|
eInFirstLine = 2, // the request is for an inline descendant of a nsFirstLineFrame
|
||||||
eForDestroy = 4, // the request is from DestroyFrom; in this case we do the
|
|
||||||
// minimal work required since the frame is about to be
|
|
||||||
// destroyed (just fixup parent pointers)
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Move any frames on our overflow list to the end of our principal list.
|
* Move any frames on our overflow list to the end of our principal list.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue