зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1227766 patch 3 - Make will-change cause creation of a containing block for fixed and absolutely positioned elements when needed. r=dholbert
--HG-- extra : commitid : 8VbTSvfxslI
This commit is contained in:
Родитель
b218a5c03d
Коммит
af419fa7ec
|
@ -3001,14 +3001,19 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
|
|||
// test above handles relevant changes in the
|
||||
// NS_STYLE_WILL_CHANGE_TRANSFORM bit, which in turn handles frame
|
||||
// reconstruction for changes in the containing block of
|
||||
// fixed-positioned elements. Other than that, all changes to
|
||||
// 'will-change' can be handled by a repaint.
|
||||
// fixed-positioned elements.
|
||||
uint8_t willChangeBitsChanged =
|
||||
mWillChangeBitField ^ aOther.mWillChangeBitField;
|
||||
if (willChangeBitsChanged) {
|
||||
if (willChangeBitsChanged & (NS_STYLE_WILL_CHANGE_STACKING_CONTEXT |
|
||||
NS_STYLE_WILL_CHANGE_SCROLL |
|
||||
NS_STYLE_WILL_CHANGE_OPACITY)) {
|
||||
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
|
||||
}
|
||||
|
||||
if (willChangeBitsChanged & NS_STYLE_WILL_CHANGE_FIXPOS_CB) {
|
||||
NS_UpdateHint(hint, nsChangeHint_UpdateContainingBlock);
|
||||
}
|
||||
|
||||
// Note: Our current behavior for handling changes to the
|
||||
// transition-duration, transition-delay, and transition-timing-function
|
||||
// properties is to do nothing. In other words, the transition
|
||||
|
|
|
@ -144,6 +144,7 @@ nsStyleDisplay::IsFixedPosContainingBlock(const nsIFrame* aContextFrame) const
|
|||
"unexpected aContextFrame");
|
||||
return (IsContainPaint() || HasTransform(aContextFrame) ||
|
||||
HasPerspectiveStyle() ||
|
||||
(mWillChangeBitField & NS_STYLE_WILL_CHANGE_FIXPOS_CB) ||
|
||||
aContextFrame->StyleSVGReset()->HasFilters()) &&
|
||||
!aContextFrame->IsSVGText();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче