diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index 7e182b49c20..806ad99d0d2 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -2665,17 +2665,8 @@ nsFrameLoader::RequestNotifyAfterRemotePaint() // If remote browsing (e10s), handle this with the TabParent. if (mRemoteBrowser) { unused << mRemoteBrowser->SendRequestNotifyAfterRemotePaint(); - return NS_OK; } - // If not remote browsing, directly use the document's window. - nsCOMPtr window = do_GetInterface(mDocShell); - if (!window) { - NS_WARNING("Unable to get window for synchronous MozAfterRemotePaint event."); - return NS_OK; - } - - window->SetRequestNotifyAfterRemotePaint(); return NS_OK; } diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 501f7d25881..cddbdac7224 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -585,7 +585,7 @@ nsPIDOMWindow::nsPIDOMWindow(nsPIDOMWindow *aOuterWindow) mInnerWindow(nullptr), mOuterWindow(aOuterWindow), // Make sure no actual window ends up with mWindowID == 0 mWindowID(NextWindowID()), mHasNotifiedGlobalCreated(false), - mMarkedCCGeneration(0), mSendAfterRemotePaint(false) + mMarkedCCGeneration(0) {} nsPIDOMWindow::~nsPIDOMWindow() {} @@ -3773,21 +3773,6 @@ nsPIDOMWindow::RefreshMediaElements() service->RefreshAgentsVolume(this); } -void -nsPIDOMWindow::SendAfterRemotePaintIfRequested() -{ - if (!mSendAfterRemotePaint) { - return; - } - - mSendAfterRemotePaint = false; - - nsContentUtils::DispatchChromeEvent(GetExtantDoc(), - GetParentTarget(), - NS_LITERAL_STRING("MozAfterRemotePaint"), - false, false); -} - // nsISpeechSynthesisGetter #ifdef MOZ_WEBSPEECH diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index 731053be087..755dfdd4a7a 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -751,17 +751,6 @@ public: return mMarkedCCGeneration; } - // Sets the condition that we send an NS_AFTER_REMOTE_PAINT message just before the next - // composite. Used in non-e10s implementations. - void SetRequestNotifyAfterRemotePaint() - { - mSendAfterRemotePaint = true; - } - - // Sends an NS_AFTER_REMOTE_PAINT message if requested by - // SetRequestNotifyAfterRemotePaint(). - void SendAfterRemotePaintIfRequested(); - protected: // The nsPIDOMWindow constructor. The aOuterWindow argument should // be null if and only if the created window itself is an outer @@ -854,10 +843,6 @@ protected: bool mHasNotifiedGlobalCreated; uint32_t mMarkedCCGeneration; - - // If true, send an NS_AFTER_REMOTE_PAINT message before compositing in a - // non-e10s implementation. - bool mSendAfterRemotePaint; }; diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 245f9300c8a..4883362ab6f 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -8754,13 +8754,6 @@ PresShell::WillPaintWindow() void PresShell::DidPaintWindow() { - if (mDocument) { - nsCOMPtr window = mDocument->GetWindow(); - if (window) { - window->SendAfterRemotePaintIfRequested(); - } - } - nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext(); if (rootPresContext != mPresContext) { // This could be a popup's presshell. No point in notifying XPConnect