mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 1d12ab8bf5fe (bug 950526) for android reftest failures on a CLOSED TREE
This commit is contained in:
parent
80fc76217f
commit
9fe557e5da
@ -3423,51 +3423,6 @@ nsLayoutUtils::ComputeHeightDependentValue(
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
nsLayoutUtils::MarkDescendantsDirty(nsIFrame *aSubtreeRoot)
|
||||
{
|
||||
nsAutoTArray<nsIFrame*, 4> subtrees;
|
||||
subtrees.AppendElement(aSubtreeRoot);
|
||||
|
||||
// dirty descendants, iterating over subtrees that may include
|
||||
// additional subtrees associated with placeholders
|
||||
do {
|
||||
nsIFrame *subtreeRoot = subtrees.ElementAt(subtrees.Length() - 1);
|
||||
subtrees.RemoveElementAt(subtrees.Length() - 1);
|
||||
|
||||
// Mark all descendants dirty (using an nsTArray stack rather than
|
||||
// recursion).
|
||||
// Note that nsHTMLReflowState::InitResizeFlags has some similar
|
||||
// code; see comments there for how and why it differs.
|
||||
nsAutoTArray<nsIFrame*, 32> stack;
|
||||
stack.AppendElement(subtreeRoot);
|
||||
|
||||
do {
|
||||
nsIFrame *f = stack.ElementAt(stack.Length() - 1);
|
||||
stack.RemoveElementAt(stack.Length() - 1);
|
||||
|
||||
f->MarkIntrinsicWidthsDirty();
|
||||
|
||||
if (f->GetType() == nsGkAtoms::placeholderFrame) {
|
||||
nsIFrame *oof = nsPlaceholderFrame::GetRealFrameForPlaceholder(f);
|
||||
if (!nsLayoutUtils::IsProperAncestorFrame(subtreeRoot, oof)) {
|
||||
// We have another distinct subtree we need to mark.
|
||||
subtrees.AppendElement(oof);
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame::ChildListIterator lists(f);
|
||||
for (; !lists.IsDone(); lists.Next()) {
|
||||
nsFrameList::Enumerator childFrames(lists.CurrentList());
|
||||
for (; !childFrames.AtEnd(); childFrames.Next()) {
|
||||
nsIFrame* kid = childFrames.get();
|
||||
stack.AppendElement(kid);
|
||||
}
|
||||
}
|
||||
} while (stack.Length() != 0);
|
||||
} while (subtrees.Length() != 0);
|
||||
}
|
||||
|
||||
#define MULDIV(a,b,c) (nscoord(int64_t(a) * int64_t(b) / int64_t(c)))
|
||||
|
||||
/* static */ nsSize
|
||||
|
@ -1151,8 +1151,6 @@ public:
|
||||
nsRuleNode::ComputeCoordPercentCalc(aCoord, 0) == 0);
|
||||
}
|
||||
|
||||
static void MarkDescendantsDirty(nsIFrame *aSubtreeRoot);
|
||||
|
||||
/*
|
||||
* Calculate the used values for 'width' and 'height' for a replaced element.
|
||||
*
|
||||
|
@ -85,7 +85,6 @@ nsFirstLetterFrame::SetInitialChildList(ChildListID aListID,
|
||||
for (nsFrameList::Enumerator e(aChildList); !e.AtEnd(); e.Next()) {
|
||||
NS_ASSERTION(e.get()->GetParent() == this, "Unexpected parent");
|
||||
restyleManager->ReparentStyleContext(e.get());
|
||||
nsLayoutUtils::MarkDescendantsDirty(e.get());
|
||||
}
|
||||
|
||||
mFrames.SetFrames(aChildList);
|
||||
|
@ -286,7 +286,6 @@ ReparentChildListStyle(nsPresContext* aPresContext,
|
||||
for (nsFrameList::Enumerator e(aFrames); !e.AtEnd(); e.Next()) {
|
||||
NS_ASSERTION(e.get()->GetParent() == aParentFrame, "Bogus parentage");
|
||||
restyleManager->ReparentStyleContext(e.get());
|
||||
nsLayoutUtils::MarkDescendantsDirty(e.get());
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,7 +424,6 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags,
|
||||
f->SetParent(this);
|
||||
if (inFirstLine) {
|
||||
restyleManager->ReparentStyleContext(f);
|
||||
nsLayoutUtils::MarkDescendantsDirty(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -531,7 +529,6 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||
child->SetParent(this);
|
||||
if (inFirstLine) {
|
||||
restyleManager->ReparentStyleContext(child);
|
||||
nsLayoutUtils::MarkDescendantsDirty(child);
|
||||
}
|
||||
// We also need to do the same for |frame|'s next-in-flows that are in
|
||||
// the sibling list. Otherwise, if we reflow |frame| and it's complete
|
||||
@ -566,7 +563,6 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||
nextInFlow->SetParent(this);
|
||||
if (inFirstLine) {
|
||||
restyleManager->ReparentStyleContext(nextInFlow);
|
||||
nsLayoutUtils::MarkDescendantsDirty(nextInFlow);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1009,7 +1005,6 @@ nsFirstLineFrame::PullOneFrame(nsPresContext* aPresContext, InlineReflowState& i
|
||||
// style-context that we just pulled.
|
||||
NS_ASSERTION(frame->GetParent() == this, "Incorrect parent?");
|
||||
aPresContext->RestyleManager()->ReparentStyleContext(frame);
|
||||
nsLayoutUtils::MarkDescendantsDirty(frame);
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
|
@ -4446,6 +4446,7 @@ nsTextFrame::CharacterDataChanged(CharacterDataChangeInfo* aInfo)
|
||||
nsTextFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
nsFrame::DidSetStyleContext(aOldStyleContext);
|
||||
ClearTextRuns();
|
||||
}
|
||||
|
||||
class nsDisplayTextGeometry : public nsDisplayItemGenericGeometry
|
||||
|
@ -3312,7 +3312,7 @@ SVGTextFrame::ScheduleReflowSVGNonDisplayText()
|
||||
MOZ_ASSERT(f, "should have found an ancestor frame to reflow");
|
||||
|
||||
PresContext()->PresShell()->FrameNeedsReflow(
|
||||
f, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
|
||||
f, nsIPresShell::eResize, NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(SVGTextFrame::MutationObserver, nsIMutationObserver)
|
||||
|
Loading…
Reference in New Issue
Block a user