Bug 1614233. Properly clip nsDisplayRemote. r=mattwoodrow

The existing code just clipped to a rect. We need to do the same clipping that the non-remote code path does which also handles border radius.

The existing code is the from initial implementation of nsDisplayRemote in https://hg.mozilla.org/mozilla-central/rev/85d06279c8358a8e1c883aa670a20212b1039a90 so I suspect that clipping to the inner view bounds instead of the frame content box is not an important difference.

Differential Revision: https://phabricator.services.mozilla.com/D62180

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Timothy Nikkel 2020-02-13 07:17:43 +00:00
Родитель 45b586ece5
Коммит f9339c12e6
2 изменённых файлов: 2 добавлений и 5 удалений

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

@ -361,10 +361,7 @@ void nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// We're the subdoc for <browser remote="true"> and it has // We're the subdoc for <browser remote="true"> and it has
// painted content. Display its shadow layer tree. // painted content. Display its shadow layer tree.
DisplayListClipState::AutoSaveRestore clipState(aBuilder); DisplayListClipState::AutoSaveRestore clipState(aBuilder);
clipState.ClipContainingBlockDescendantsToContentBox(aBuilder, this);
nsPoint offset = aBuilder->ToReferenceFrame(this);
nsRect bounds = this->EnsureInnerView()->GetBounds() + offset;
clipState.ClipContentDescendants(bounds);
aLists.Content()->AppendNewToTop<nsDisplayRemote>(aBuilder, this); aLists.Content()->AppendNewToTop<nsDisplayRemote>(aBuilder, this);
return; return;

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

@ -84,7 +84,7 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-35,0-194) == transforms-1.
== zero-radius-clip-1.html zero-radius-clip-ref.html == zero-radius-clip-1.html zero-radius-clip-ref.html
fails-if(browserIsFission) == iframe-1.html iframe-1-ref.html random-if(browserIsFission) == iframe-1.html iframe-1-ref.html
# Test for antialiasing gaps between background and border # Test for antialiasing gaps between background and border
fuzzy-if(gtkWidget,0-1,0-9) fuzzy-if(winWidget&&!d2d,0-1,0-9) fuzzy-if(d2d,0-5,0-40) fuzzy-if(Android||skiaContent,0-1,0-9) == curved-border-background-nogap.html curved-border-background-nogap-ref.html fuzzy-if(gtkWidget,0-1,0-9) fuzzy-if(winWidget&&!d2d,0-1,0-9) fuzzy-if(d2d,0-5,0-40) fuzzy-if(Android||skiaContent,0-1,0-9) == curved-border-background-nogap.html curved-border-background-nogap-ref.html