From dbd9b6d728b1bc1407fbb9df85b809a1a79eec20 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Wed, 29 Mar 2017 01:18:22 +0200 Subject: [PATCH] Backed out changeset b6a97b374a6d (bug 1344839) --- widget/windows/nsWindow.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 78f89af2eb34..b31f70f361e4 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -3031,9 +3031,8 @@ nsWindow::SetCursor(imgIContainer* aCursor, * * SECTION: nsIWidget::Get/SetTransparencyMode * - * Manage the transparency mode of the window containing this - * widget. Only works for popup and dialog windows, and not - * top-level windows. + * Manage the transparency mode of the top-level window + * containing this widget. * **************************************************************/ @@ -3045,19 +3044,7 @@ nsTransparencyMode nsWindow::GetTransparencyMode() void nsWindow::SetTransparencyMode(nsTransparencyMode aMode) { - nsWindow* window = GetTopLevelWindow(true); - MOZ_ASSERT(window); - - if (!window || window->DestroyCalled()) { - return; - } - - if (nsWindowType::eWindowType_toplevel == window->mWindowType) { - NS_WARNING("Cannot set transparency mode on top-level windows."); - return; - } - - window->SetWindowTranslucencyInner(aMode); + GetTopLevelWindow(true)->SetWindowTranslucencyInner(aMode); } void nsWindow::UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion)