Bug 1488953 - Use a script runner for scrollport events. r=mats

This is consistent with the scroll area events too, and allows us to
remove the WillPaintObserver stuff.

Differential Revision: https://phabricator.services.mozilla.com/D5271
This commit is contained in:
Emilio Cobos Álvarez
2019-06-13 02:30:25 +00:00
parent d20fb11b92
commit b2275b1613
4 changed files with 1 additions and 76 deletions

View File

@@ -4462,12 +4462,6 @@ nsresult PresShell::RenderDocument(const nsRect& aRect,
NS_ENSURE_TRUE(!(aFlags & RenderDocumentFlags::IsUntrusted),
NS_ERROR_NOT_IMPLEMENTED);
nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
if (rootPresContext) {
rootPresContext->FlushWillPaintObservers();
if (mIsDestroying) return NS_OK;
}
nsAutoScriptBlocker blockScripts;
// Set up the rectangle as the path in aThebesContext
@@ -8837,17 +8831,6 @@ void PresShell::WillPaint() {
return;
}
nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
if (!rootPresContext) {
// In some edge cases, such as when we don't have a root frame yet,
// we can't find the root prescontext. There's nothing to do in that
// case.
return;
}
rootPresContext->FlushWillPaintObservers();
if (mIsDestroying) return;
// Process reflows, if we have them, to reduce flicker due to invalidates and
// reflow being interspersed. Note that we _do_ allow this to be
// interruptible; if we can't do all the reflows it's better to flicker a bit