Bug 1559211 - Fallback to conservative visible rect for top-level remote browsers. r=mattwoodrow

Using a precise visible rect for a top-level browser can cause an
artifact when resizing the window.

I believe this is caused by the message to resize the browser, and
the following paint, to be processed before the message with the
new visible rect.

We can be smarter about this, but in the interest of getting a
quick fix, this commit reverts the behavior here only for top-level
browsers.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ryan Hunt 2019-06-14 02:45:09 +00:00
Родитель a39b233aa1
Коммит efbd0db708
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -3333,10 +3333,9 @@ ScreenIntSize BrowserChild::GetInnerSize() {
};
nsRect BrowserChild::GetVisibleRect() {
bool isForceRendering = mIsTopLevel && mRenderLayers;
if (isForceRendering && !mEffectsInfo.IsVisible()) {
// We are forced to render even though we are not visible. In this case, we
// don't have an accurate visible rect, so we must be conservative.
if (mIsTopLevel) {
// We are conservative about visible rects for top-level browsers to avoid
// artifacts when resizing
return nsRect(nsPoint(), CSSPixel::ToAppUnits(mUnscaledInnerSize));
} else {
return mEffectsInfo.mVisibleRect;