mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
Issue #2135 - Bug 1433669/Part 2: Flush the document instead of the shell in ContentEventHandler
* Unlike the original patch, I went with just getting a reference to the document rather than replacing mPresShell with mDocument.
This commit is contained in:
@@ -116,10 +116,9 @@ ContentEventHandler::InitBasic()
|
||||
|
||||
// If text frame which has overflowing selection underline is dirty,
|
||||
// we need to flush the pending reflow here.
|
||||
mPresShell->FlushPendingNotifications(Flush_Layout);
|
||||
|
||||
// Flushing notifications can cause mPresShell to be destroyed (bug 577963).
|
||||
NS_ENSURE_TRUE(!mPresShell->IsDestroying(), NS_ERROR_FAILURE);
|
||||
if (nsIDocument* doc = mPresShell->GetDocument()) {
|
||||
doc->FlushPendingNotifications(Flush_Layout);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user