Bug 629709 - White line of highlight pixels appears above navigation toolbar if the window is maximized; r=roc a=gavin

This commit is contained in:
Jim Mathies 2011-02-04 14:52:03 -05:00
parent 1eab6dee1e
commit 1694281f0e

View File

@ -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: