Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 9d3c9e0

Browse files
committed
Bug 1706154 - Popups with transparent but non-zero borders should have transparency. r=jrmuizel
It was a bug that we marked the surface as opaque on X11 anyways, because the popup has a 1px transparent border. That causes some glitches locally that this fixes. Differential Revision: https://phabricator.services.mozilla.com/D113593
1 parent 18781a1 commit 9d3c9e0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

layout/base/nsLayoutUtils.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6696,8 +6696,21 @@ nsTransparencyMode nsLayoutUtils::GetFrameTransparency(
66966696
if (aCSSRootFrame->StyleEffects()->mOpacity < 1.0f)
66976697
return eTransparencyTransparent;
66986698

6699-
if (HasNonZeroCorner(aCSSRootFrame->StyleBorder()->mBorderRadius))
6700-
return eTransparencyTransparent;
6699+
{
6700+
auto& border = *aCSSRootFrame->StyleBorder();
6701+
if (HasNonZeroCorner(border.mBorderRadius)) {
6702+
return eTransparencyTransparent;
6703+
}
6704+
6705+
if (border.HasBorder()) {
6706+
if (border.mBorderTopColor.MaybeTransparent() ||
6707+
border.mBorderRightColor.MaybeTransparent() ||
6708+
border.mBorderBottomColor.MaybeTransparent() ||
6709+
border.mBorderLeftColor.MaybeTransparent()) {
6710+
return eTransparencyTransparent;
6711+
}
6712+
}
6713+
}
67016714

67026715
StyleAppearance appearance =
67036716
aCSSRootFrame->StyleDisplay()->EffectiveAppearance();

0 commit comments

Comments
 (0)