Bug 974125 - Use RepaintFrame change hint for will-change. r=dbaron

This commit is contained in:
Chris Lord 2014-10-30 15:12:11 +00:00
Родитель b275f1ebdc
Коммит 6614238071
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -2815,15 +2815,17 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
}
}
// Note that the HasTransformStyle() != aOther.HasTransformStyle()
// 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.
uint8_t willChangeBitsChanged =
mWillChangeBitField ^ aOther.mWillChangeBitField;
if (willChangeBitsChanged & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) {
if (willChangeBitsChanged) {
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
}
if (willChangeBitsChanged & ~uint8_t(NS_STYLE_WILL_CHANGE_STACKING_CONTEXT)) {
// FIXME (Bug 974125): Don't reconstruct the frame
NS_UpdateHint(hint, nsChangeHint_ReconstructFrame);
}
// Note: Our current behavior for handling changes to the
// transition-duration, transition-delay, and transition-timing-function