Bug 1272525 - Set a layer clip rather than a scroll clip for fixed background layers if not using a widget layer manager. r=mstange

MozReview-Commit-ID: 2fJyQXSLzsU

--HG--
extra : source : 8a282bae4fa3451efb3187d695ce0d523262acfd
extra : amend_source : 2e3d55a4cee03f6c3c58fe85e98f87a034f2bd39
extra : histedit_source : f6d5b5bfa98795824c0968065011b9ff4a4a6f5d
This commit is contained in:
Botond Ballo 2016-05-16 14:15:48 -04:00
Родитель 6d6a335801
Коммит 364c95341e
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -4116,9 +4116,12 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
ownLayer->SetClipRect(Nothing());
ownLayer->SetScrolledClip(Nothing());
if (layerClip.HasClip()) {
if (shouldFixToViewport) {
// For layers fixed to the viewport, the clip becomes part of the
// layer's scrolled clip.
// For layers fixed to the viewport, the clip becomes part of the
// layer's scrolled clip. However, BasicLayerManager doesn't support
// 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()) {
LayerClip scrolledClip;
scrolledClip.SetClipRect(layerClipRect);
if (layerClip.IsRectClippedByRoundedCorner(itemContent)) {