зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1464065 - Avoid unnecessary work in nsIFrame::IsStackingContext() when frame is visually atomic r=mattwoodrow
MozReview-Commit-ID: 3g5PqD65I2p --HG-- extra : rebase_source : 7427ed54043bfa312c20acd887b31f7a22be13f7
This commit is contained in:
Родитель
9515340567
Коммит
10427be70b
|
@ -11013,22 +11013,29 @@ bool
|
|||
nsIFrame::IsStackingContext(const nsStyleDisplay* aStyleDisplay,
|
||||
const nsStylePosition* aStylePosition,
|
||||
bool aIsPositioned,
|
||||
bool aIsVisuallyAtomic) {
|
||||
return (aIsPositioned && (aStyleDisplay->IsPositionForcingStackingContext() ||
|
||||
bool aIsVisuallyAtomic)
|
||||
{
|
||||
return aIsVisuallyAtomic ||
|
||||
(aIsPositioned && (aStyleDisplay->IsPositionForcingStackingContext() ||
|
||||
aStylePosition->mZIndex.GetUnit() == eStyleUnit_Integer)) ||
|
||||
(aStyleDisplay->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) ||
|
||||
aStyleDisplay->mIsolation != NS_STYLE_ISOLATION_AUTO ||
|
||||
aIsVisuallyAtomic;
|
||||
aStyleDisplay->mIsolation != NS_STYLE_ISOLATION_AUTO;
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsStackingContext()
|
||||
{
|
||||
const nsStyleDisplay* disp = StyleDisplay();
|
||||
bool isPositioned = disp->IsAbsPosContainingBlock(this);
|
||||
bool isVisuallyAtomic = IsVisuallyAtomic(EffectSet::GetEffectSet(this),
|
||||
const bool isVisuallyAtomic = IsVisuallyAtomic(EffectSet::GetEffectSet(this),
|
||||
disp, StyleEffects());
|
||||
return IsStackingContext(disp, StylePosition(), isPositioned, isVisuallyAtomic);
|
||||
if (isVisuallyAtomic) {
|
||||
// If this is changed, the function above should be updated as well.
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool isPositioned = disp->IsAbsPosContainingBlock(this);
|
||||
return IsStackingContext(disp, StylePosition(),
|
||||
isPositioned, isVisuallyAtomic);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче