author | Martin Stransky <stransky@redhat.com> |
Tue, 20 Nov 2018 15:51:18 +0000 | |
changeset 503680 | bf1a01ae1faa2960e09228ecff32d1d332244232 |
parent 503679 | 4d353fd7da6bf1910ceb2dd4af99392c995cbaa7 |
child 503681 | d6591e3f56bbe90561faeb01470cca02d9085e36 |
push id | 10290 |
push user | ffxbld-merge |
push date | Mon, 03 Dec 2018 16:23:23 +0000 |
treeherder | mozilla-beta@700bed2445e6 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jhorak |
bugs | 1506050 |
milestone | 65.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/widget/gtk/nsNativeThemeGTK.cpp +++ b/widget/gtk/nsNativeThemeGTK.cpp @@ -455,21 +455,18 @@ nsNativeThemeGTK::GetGtkWidgetAndState(S } } if (aAppearance == StyleAppearance::MozWindowTitlebar || aAppearance == StyleAppearance::MozWindowTitlebarMaximized || aAppearance == StyleAppearance::MozWindowButtonClose || aAppearance == StyleAppearance::MozWindowButtonMinimize || aAppearance == StyleAppearance::MozWindowButtonMaximize || - aAppearance == StyleAppearance::MozWindowButtonRestore) { - aState->backdrop = !nsWindow::GetTopLevelWindowActiveState(aFrame); - } - - if (aAppearance == StyleAppearance::ScrollbarbuttonUp || + aAppearance == StyleAppearance::MozWindowButtonRestore || + aAppearance == StyleAppearance::ScrollbarbuttonUp || aAppearance == StyleAppearance::ScrollbarbuttonDown || aAppearance == StyleAppearance::ScrollbarbuttonLeft || aAppearance == StyleAppearance::ScrollbarbuttonRight || aAppearance == StyleAppearance::ScrollbarVertical || aAppearance == StyleAppearance::ScrollbarHorizontal || aAppearance == StyleAppearance::ScrollbartrackHorizontal || aAppearance == StyleAppearance::ScrollbartrackVertical || aAppearance == StyleAppearance::ScrollbarthumbVertical||
--- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -7447,50 +7447,8 @@ nsIWidget::CreateTopLevelWindow() } already_AddRefed<nsIWidget> nsIWidget::CreateChildWindow() { nsCOMPtr<nsIWidget> window = new nsWindow(); return window.forget(); } - -bool -nsWindow::GetTopLevelWindowActiveState(nsIFrame *aFrame) -{ - // Used by window frame and button box rendering. We can end up in here in - // the content process when rendering one of these moz styles freely in a - // page. Fail in this case, there is no applicable window focus state. - if (!XRE_IsParentProcess()) { - return false; - } - // All headless windows are considered active so they are painted. - if (gfxPlatform::IsHeadless()) { - return true; - } - // Get the widget. nsIFrame's GetNearestWidget walks up the view chain - // until it finds a real window. - nsWindow* window = static_cast<nsWindow*>(aFrame->GetNearestWidget()); - if (!window) { - return false; - } - - // Get our toplevel nsWindow. - if (!window->mIsTopLevel) { - GtkWidget *widget = window->GetMozContainerWidget(); - if (!widget) { - return false; - } - - GtkWidget *toplevelWidget = gtk_widget_get_toplevel(widget); - window = get_window_for_gtk_widget(toplevelWidget); - if (!window) { - return false; - } - } - - GtkWidget* widget = window->GetGtkWidget(); - if (widget) { - return !(gtk_widget_get_state_flags(widget) & GTK_STATE_FLAG_BACKDROP); - } - - return false; -}
--- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h @@ -423,17 +423,16 @@ public: } CSDSupportLevel; /** * Get the support of Client Side Decoration by checking * the XDG_CURRENT_DESKTOP environment variable. */ static CSDSupportLevel GetSystemCSDSupportLevel(); static bool TopLevelWindowUseARGBVisual(); - static bool GetTopLevelWindowActiveState(nsIFrame *aFrame); protected: virtual ~nsWindow(); // event handling code void DispatchActivateEvent(void); void DispatchDeactivateEvent(void); void DispatchResized();