Skip to content

Commit

Permalink
[nemo][embedlite] Align EmbedLiteViewBaseChild's RecvSetIsActive to n…
Browse files Browse the repository at this point in the history
…sPresShell::SetIsActive. Fixes JB#44342
  • Loading branch information
rainemak committed Jan 21, 2019
1 parent 4c42d14 commit e80e35a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseChild.cpp
Expand Up @@ -39,6 +39,9 @@
#include "APZCCallbackHelper.h"
#include "mozilla/dom/Element.h"

#include "nsIFrame.h" // for nsIFrame
#include "FrameLayerBuilder.h" // for FrameLayerbuilder

using namespace mozilla::layers;
using namespace mozilla::widget;

Expand Down Expand Up @@ -556,15 +559,23 @@ EmbedLiteViewBaseChild::RecvSetIsActive(const bool& aIsActive)
widget->SetActive(aIsActive);
}


// Update state via WebBrowser -> DocShell -> PresShell
mWebBrowser->SetIsActive(aIsActive);
// Do same stuff that there is in nsPresShell.cpp:10670

mWidget->Show(aIsActive);

nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(mWebBrowser);
baseWindow->SetVisibility(aIsActive);

// Same that there is in nsPresShell.cpp:10670
nsCOMPtr<nsIPresShell> ps = mHelper->GetPresContext()->GetPresShell();
if (ps && aIsActive) {
if (nsIFrame* root = ps->GetRootFrame()) {
FrameLayerBuilder::InvalidateAllLayersForFrame(
nsLayoutUtils::GetDisplayRootFrame(root));
root->SchedulePaint();
}
}
return true;
}

Expand Down

0 comments on commit e80e35a

Please sign in to comment.