Bug 1304011 - Part 1. Do not merge nsDisplayMask with css mask. r=mstange

MozReview-Commit-ID: 9Y8ccNieOF4

--HG--
extra : rebase_source : 42fcf40dfd7530a7eee4942ac60c8749820f0c0b
This commit is contained in:
cku 2016-09-18 18:47:02 +08:00
Родитель 467b53928a
Коммит bd65b2b725
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -6838,10 +6838,18 @@ bool nsDisplayMask::TryMerge(nsDisplayItem* aItem)
return false;
if (aItem->ScrollClip() != ScrollClip())
return false;
// Do not merge if mFrame has mask. Continuation frames should apply mask
// independently(just like nsDisplayBackgroundImage).
const nsStyleSVGReset *style = mFrame->StyleSVGReset();
if (style->mMask.HasLayerWithImage())
return false;
nsDisplayMask* other = static_cast<nsDisplayMask*>(aItem);
MergeFromTrackingMergedFrames(other);
mEffectsBounds.UnionRect(mEffectsBounds,
other->mEffectsBounds + other->mFrame->GetOffsetTo(mFrame));
return true;
}