зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1343552 part 1 - Invalidate the cached flow length when the next-in-flow/continuation changes. r=jfkthame
MozReview-Commit-ID: Bz5YA60NY8I
This commit is contained in:
Родитель
8ae83b07f4
Коммит
ce00d19feb
|
@ -97,6 +97,9 @@ public:
|
|||
mNextContinuation = static_cast<nsTextFrame*>(aNextContinuation);
|
||||
if (aNextContinuation)
|
||||
aNextContinuation->RemoveStateBits(NS_FRAME_IS_FLUID_CONTINUATION);
|
||||
// Setting a non-fluid continuation might affect our flow length (they're
|
||||
// quite rare so we assume it always does) so we delete our cached value:
|
||||
GetContent()->DeleteProperty(nsGkAtoms::flowlength);
|
||||
}
|
||||
nsIFrame* GetNextInFlowVirtual() const override { return GetNextInFlow(); }
|
||||
nsTextFrame* GetNextInFlow() const
|
||||
|
@ -115,8 +118,15 @@ public:
|
|||
!nsSplittableFrame::IsInNextContinuationChain(aNextInFlow, this),
|
||||
"creating a loop in continuation chain!");
|
||||
mNextContinuation = static_cast<nsTextFrame*>(aNextInFlow);
|
||||
if (aNextInFlow)
|
||||
if (mNextContinuation &&
|
||||
!mNextContinuation->HasAnyStateBits(NS_FRAME_IS_FLUID_CONTINUATION)) {
|
||||
// Changing from non-fluid to fluid continuation might affect our flow
|
||||
// length, so we delete our cached value:
|
||||
GetContent()->DeleteProperty(nsGkAtoms::flowlength);
|
||||
}
|
||||
if (aNextInFlow) {
|
||||
aNextInFlow->AddStateBits(NS_FRAME_IS_FLUID_CONTINUATION);
|
||||
}
|
||||
}
|
||||
nsTextFrame* LastInFlow() const final;
|
||||
nsTextFrame* LastContinuation() const final;
|
||||
|
|
Загрузка…
Ссылка в новой задаче