From 39fcf3e490985c85c3d6b334f0035dc2c2c11018 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Fri, 4 Feb 2011 14:52:03 -0500 Subject: [PATCH] Bug 629709 - White line of highlight pixels appears above navigation toolbar if the window is maximized; r=roc a=gavin --- widget/src/windows/nsWindow.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 5c2ee2b834..71da7f7389 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -2655,18 +2655,12 @@ void nsWindow::UpdateGlass() DWMNCRENDERINGPOLICY policy = DWMNCRP_USEWINDOWSTYLE; switch (mTransparencyMode) { case eTransparencyBorderlessGlass: - // Margins must be 2px (kGlassMarginAdjustment) or larger to cover the 2px - // border Windows adds. A value of -1 in cxLeftWidth indicates a sheet of - // glass which we ignore here. + // Only adjust if there is some opaque rectangle if (margins.cxLeftWidth >= 0) { - if (margins.cxLeftWidth >= 0 && margins.cxLeftWidth < kGlassMarginAdjustment) - margins.cxLeftWidth = kGlassMarginAdjustment; - if (margins.cyTopHeight >= 0 && margins.cyTopHeight < kGlassMarginAdjustment) - margins.cyTopHeight = kGlassMarginAdjustment; - if (margins.cxRightWidth >= 0 && margins.cxRightWidth < kGlassMarginAdjustment) - margins.cxRightWidth = kGlassMarginAdjustment; - if (margins.cyBottomHeight >= 0 && margins.cyBottomHeight < kGlassMarginAdjustment) - margins.cyBottomHeight = kGlassMarginAdjustment; + margins.cxLeftWidth += kGlassMarginAdjustment; + margins.cyTopHeight += kGlassMarginAdjustment; + margins.cxRightWidth += kGlassMarginAdjustment; + margins.cyBottomHeight += kGlassMarginAdjustment; } // Fall through case eTransparencyGlass: -- 2.11.4.GIT