зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1500609 part 1 - Add a nsFlexContainerFrame method to remove cached data that depend on flex items' intrinsic isize (idempotent patch). r=dholbert
This commit is contained in:
Родитель
c33780d631
Коммит
4b5a264c80
|
@ -1818,6 +1818,12 @@ public:
|
|||
NS_DECLARE_FRAME_PROPERTY_DELETABLE(CachedFlexMeasuringReflow,
|
||||
CachedMeasuringReflowResult);
|
||||
|
||||
void
|
||||
nsFlexContainerFrame::MarkCachedFlexMeasurementsDirty(nsIFrame* aItemFrame)
|
||||
{
|
||||
aItemFrame->DeleteProperty(CachedFlexMeasuringReflow());
|
||||
}
|
||||
|
||||
const CachedMeasuringReflowResult&
|
||||
nsFlexContainerFrame::MeasureAscentAndBSizeForFlexItem(
|
||||
FlexItem& aItem,
|
||||
|
|
|
@ -232,6 +232,11 @@ public:
|
|||
static bool IsUsedFlexBasisContent(const nsStyleCoord* aFlexBasis,
|
||||
const nsStyleCoord* aMainSize);
|
||||
|
||||
/**
|
||||
* Callback for nsFrame::MarkIntrinsicISizesDirty() on a flex item.
|
||||
*/
|
||||
static void MarkCachedFlexMeasurementsDirty(nsIFrame* aItemFrame);
|
||||
|
||||
protected:
|
||||
// Protected constructor & destructor
|
||||
explicit nsFlexContainerFrame(ComputedStyle* aStyle)
|
||||
|
|
|
@ -5220,7 +5220,7 @@ nsFrame::MarkIntrinsicISizesDirty()
|
|||
// (which likely depended on our now-stale intrinsic isize).
|
||||
auto* parentFrame = GetParent();
|
||||
if (parentFrame && parentFrame->IsFlexContainerFrame()) {
|
||||
DeleteProperty(CachedFlexMeasuringReflow());
|
||||
nsFlexContainerFrame::MarkCachedFlexMeasurementsDirty(this);
|
||||
}
|
||||
|
||||
if (GetStateBits() & NS_FRAME_FONT_INFLATION_FLOW_ROOT) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче