mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-01 05:01:15 +00:00
Invalidate the cached flow length when the next-in-flow/continuation changes.
This commit is contained in:
@@ -87,6 +87,9 @@ public:
|
||||
mNextContinuation = 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);
|
||||
}
|
||||
virtual nsIFrame* GetNextInFlowVirtual() const override { return GetNextInFlow(); }
|
||||
nsIFrame* GetNextInFlow() const {
|
||||
@@ -99,8 +102,15 @@ public:
|
||||
NS_ASSERTION (!nsSplittableFrame::IsInNextContinuationChain(aNextInFlow, this),
|
||||
"creating a loop in continuation chain!");
|
||||
mNextContinuation = 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);
|
||||
}
|
||||
}
|
||||
virtual nsIFrame* LastInFlow() const override;
|
||||
virtual nsIFrame* LastContinuation() const override;
|
||||
|
||||
Reference in New Issue
Block a user