summaryrefslogtreecommitdiff
path: root/widget
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-10-10 23:09:26 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-01 14:47:16 +0200
commitddaee7c1be914cc28a28cbe27e5922215b3b2e6f (patch)
treecb8930a9ba1ed0ef574b7c2be9035b1a51201902 /widget
parentc030a50228349fa1b2c0b4fbc2e83752324dd4d7 (diff)
downloaduxp-ddaee7c1be914cc28a28cbe27e5922215b3b2e6f.tar.gz
Issue #1830 - Remove --disable-xul config and conditionals.
Diffstat (limited to 'widget')
-rw-r--r--widget/moz.build2
-rw-r--r--widget/windows/nsWindow.cpp10
-rw-r--r--widget/windows/nsWindow.h6
-rw-r--r--widget/windows/nsWindowGfx.cpp14
4 files changed, 1 insertions, 31 deletions
diff --git a/widget/moz.build b/widget/moz.build
index acb1387341..e40bf6a61a 100644
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -164,7 +164,7 @@ if CONFIG['OS_ARCH'] == 'Linux':
'LSBUtils.cpp'
]
-if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
+if CONFIG['NS_PRINTING']:
EXPORTS += [
'nsDeviceContextSpecProxy.h',
'nsPrintOptionsImpl.h',
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
index 1a18b9ecaf..5675d6b8c2 100644
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -632,10 +632,8 @@ nsWindow::nsWindow()
mCachedHitTestPoint.y = 0;
mCachedHitTestTime = TimeStamp::Now();
mCachedHitTestResult = 0;
-#ifdef MOZ_XUL
mTransparencyMode = eTransparencyOpaque;
memset(&mGlassMargins, 0, sizeof mGlassMargins);
-#endif
DWORD background = ::GetSysColor(COLOR_BTNFACE);
mBrush = ::CreateSolidBrush(NSRGB_2_COLOREF(background));
mSendingSetText = false;
@@ -1609,14 +1607,12 @@ NS_IMETHODIMP nsWindow::Show(bool bState)
}
}
-#ifdef MOZ_XUL
if (!wasVisible && bState) {
Invalidate();
if (syncInvalidate && !mInDtor && !mOnDestroyCalled) {
::UpdateWindow(mWnd);
}
}
-#endif
return NS_OK;
}
@@ -3008,7 +3004,6 @@ NS_IMETHODIMP nsWindow::SetCursor(imgIContainer* aCursor,
*
**************************************************************/
-#ifdef MOZ_XUL
nsTransparencyMode nsWindow::GetTransparencyMode()
{
return GetTopLevelWindow(true)->GetWindowTranslucencyInner();
@@ -3117,7 +3112,6 @@ void nsWindow::UpdateGlass()
DwmSetWindowAttribute(mWnd, DWMWA_NCRENDERING_POLICY, &policy, sizeof policy);
}
}
-#endif
/**************************************************************
*
@@ -7245,8 +7239,6 @@ nsWindow::GetAccessible()
**************************************************************
**************************************************************/
-#ifdef MOZ_XUL
-
void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
{
if (aMode == mTransparencyMode)
@@ -7304,8 +7296,6 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
UpdateGlass();
}
-#endif //MOZ_XUL
-
/**************************************************************
**************************************************************
**
diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h
index 199500e9c5..ec4a1f0192 100644
--- a/widget/windows/nsWindow.h
+++ b/widget/windows/nsWindow.h
@@ -203,11 +203,9 @@ public:
NS_IMETHOD_(InputContext) GetInputContext() override;
NS_IMETHOD_(TextEventDispatcherListener*)
GetNativeTextEventDispatcherListener() override;
-#ifdef MOZ_XUL
virtual void SetTransparencyMode(nsTransparencyMode aMode) override;
virtual nsTransparencyMode GetTransparencyMode() override;
virtual void UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion) override;
-#endif // MOZ_XUL
virtual nsIMEUpdatePreference GetIMEUpdatePreference() override;
NS_IMETHOD SetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
void SetDrawsInTitlebar(bool aState) override;
@@ -466,13 +464,11 @@ protected:
/**
* Window transparency helpers
*/
-#ifdef MOZ_XUL
private:
void SetWindowTranslucencyInner(nsTransparencyMode aMode);
nsTransparencyMode GetWindowTranslucencyInner() const { return mTransparencyMode; }
void UpdateGlass();
protected:
-#endif // MOZ_XUL
static bool IsAsyncResponseEvent(UINT aMsg, LRESULT& aResult);
void IPCWindowProcHandler(UINT& msg, WPARAM& wParam, LPARAM& lParam);
@@ -609,11 +605,9 @@ protected:
ResizeState mResizeState;
// Transparency
-#ifdef MOZ_XUL
nsTransparencyMode mTransparencyMode;
nsIntRegion mPossiblyTransparentRegion;
MARGINS mGlassMargins;
-#endif // MOZ_XUL
// Win7 Gesture processing and management
nsWinGesture mGesture;
diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp
index 9b303a0f2e..5a5551753d 100644
--- a/widget/windows/nsWindowGfx.cpp
+++ b/widget/windows/nsWindowGfx.cpp
@@ -233,7 +233,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
PAINTSTRUCT ps;
-#ifdef MOZ_XUL
if (!aDC && (eTransparencyTransparent == mTransparencyMode))
{
// For layered translucent windows all drawing should go to memory DC and no
@@ -248,7 +247,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
// We're guaranteed to have a widget proxy since we called GetLayerManager().
aDC = mCompositorWidgetDelegate->GetTransparentDC();
}
-#endif
mPainting = true;
@@ -267,11 +265,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
HDC hDC = aDC ? aDC : (::BeginPaint(mWnd, &ps));
mPaintDC = hDC;
-#ifdef MOZ_XUL
bool forceRepaint = aDC || (eTransparencyTransparent == mTransparencyMode);
-#else
- bool forceRepaint = nullptr != aDC;
-#endif
nsIntRegion region = GetRegionToPaint(forceRepaint, ps, hDC);
if (clientLayerManager) {
@@ -317,14 +311,12 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
{
RefPtr<gfxASurface> targetSurface;
-#if defined(MOZ_XUL)
// don't support transparency for non-GDI rendering, for now
if (eTransparencyTransparent == mTransparencyMode) {
// This mutex needs to be held when EnsureTransparentSurface is called.
MutexAutoLock lock(mBasicLayersSurface->GetTransparentSurfaceLock());
targetSurface = mBasicLayersSurface->EnsureTransparentSurface();
}
-#endif
RefPtr<gfxWindowsSurface> targetSurfaceWin;
if (!targetSurface)
@@ -353,7 +345,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
// don't need to double buffer with anything but GDI
BufferMode doubleBuffering = mozilla::layers::BufferMode::BUFFER_NONE;
-#ifdef MOZ_XUL
switch (mTransparencyMode) {
case eTransparencyGlass:
case eTransparencyBorderlessGlass:
@@ -368,9 +359,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
dt->GetSize().width, dt->GetSize().height));
break;
}
-#else
- doubleBuffering = mozilla::layers::BufferMode::BUFFERED;
-#endif
RefPtr<gfxContext> thebesContext = gfxContext::CreateOrNull(dt);
MOZ_ASSERT(thebesContext); // already checked draw target above
@@ -382,14 +370,12 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
this, LayoutDeviceIntRegion::FromUnknownRegion(region));
}
-#ifdef MOZ_XUL
if (eTransparencyTransparent == mTransparencyMode) {
// Data from offscreen drawing surface was copied to memory bitmap of transparent
// bitmap. Now it can be read from memory bitmap to apply alpha channel and after
// that displayed on the screen.
mBasicLayersSurface->RedrawTransparentWindow();
}
-#endif
}
break;
case LayersBackend::LAYERS_CLIENT: