Bug 1374966 - Drop nsChangeHint_UpdateTransformLayer when we also have nsChangeHint_AddOrRemoveTransform; r=heycam

MozReview-Commit-ID: 2eFl7cDXNA

--HG--
extra : rebase_source : 21d44a91b1848f630500495788fb704ef260333e
This commit is contained in:
Brian Birtles 2017-07-27 12:05:47 +09:00
Родитель c3f031892f
Коммит 913d9ceadd
1 изменённых файлов: 19 добавлений и 0 удалений

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

@ -1531,6 +1531,25 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
hint &= ~nsChangeHint_UpdatePostTransformOverflow;
}
if (hint & nsChangeHint_AddOrRemoveTransform) {
// When dropping a running transform animation we will first add an
// nsChangeHint_UpdateTransformLayer hint as part of the animation-only
// restyle. During the subsequent regular restyle, if the animation was
// the only reason the element had any transform applied, we will add
// nsChangeHint_AddOrRemoveTransform as part of the regular restyle.
//
// With the Gecko backend, these two change hints are processed
// after each restyle but when using the Servo backend they accumulate
// and are processed together after we have already removed the
// transform as part of the regular restyle. Since we don't actually
// need the nsChangeHint_UpdateTransformLayer hint if we already have
// a nsChangeHint_AddOrRemoveTransform hint, and since we
// will fail an assertion in ApplyRenderingChangeToTree if we try
// specify nsChangeHint_UpdateTransformLayer but don't have any
// transform style, we just drop the unneeded hint here.
hint &= ~nsChangeHint_UpdateTransformLayer;
}
if (hint & nsChangeHint_UpdateEffects) {
for (nsIFrame* cont = frame; cont;
cont = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(cont)) {