Bug 1273250 - Set a layer clip rather than a scroll clip for fixed background layers if the clip moves with the layer. r=mstange

This patch also removes the earlier workaround added in bug 1272525.

MozReview-Commit-ID: HR2wF2BGsKl

--HG--
extra : rebase_source : b561f8721d91c930bced7664f11a331552b97a5e
extra : histedit_source : d57e430f76851ce252416aa77fdaad0897d03756
This commit is contained in:
Botond Ballo 2016-05-16 17:20:23 -04:00
Родитель 8320a4382b
Коммит bdb7838ac2
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -3880,7 +3880,10 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
item->SetClip(mBuilder, clip);
}
bool shouldFixToViewport = !(*animatedGeometryRoot)->GetParent() &&
bool clipMovesWithLayer = (animatedGeometryRoot == animatedGeometryRootForClip);
bool shouldFixToViewport = !clipMovesWithLayer &&
!(*animatedGeometryRoot)->GetParent() &&
item->ShouldFixToViewport(mBuilder);
// For items that are fixed to the viewport, remove their clip at the
@ -4120,7 +4123,7 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
// scrolled clips, and doesn't care about the distinction anyways
// (it only matters for async scrolling), so only set a scrolled clip
// if we have a widget layer manager.
if (shouldFixToViewport && mManager->IsWidgetLayerManager()) {
if (shouldFixToViewport) {
LayerClip scrolledClip;
scrolledClip.SetClipRect(layerClipRect);
if (layerClip.IsRectClippedByRoundedCorner(itemContent)) {