mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 598202: Avoid drawing borders which are fully transparent. r=vlad a=vlad
This commit is contained in:
parent
3b2a61ca30
commit
bba6216a0e
@ -1014,15 +1014,19 @@ nsCSSBorderRenderer::DrawBorders()
|
||||
PRBool brBordersSame = AreBorderSideFinalStylesSame(SIDE_BIT_BOTTOM | SIDE_BIT_RIGHT);
|
||||
PRBool allBordersSame = AreBorderSideFinalStylesSame(SIDE_BITS_ALL);
|
||||
if (allBordersSame &&
|
||||
mCompositeColors[0] == NULL &&
|
||||
(mBorderStyles[0] == NS_STYLE_BORDER_STYLE_NONE ||
|
||||
mBorderStyles[0] == NS_STYLE_BORDER_STYLE_HIDDEN ||
|
||||
mBorderColors[0] == NS_RGBA(0,0,0,0)))
|
||||
((mCompositeColors[0] == NULL &&
|
||||
(mBorderStyles[0] == NS_STYLE_BORDER_STYLE_NONE ||
|
||||
mBorderStyles[0] == NS_STYLE_BORDER_STYLE_HIDDEN ||
|
||||
mBorderColors[0] == NS_RGBA(0,0,0,0))) ||
|
||||
(mCompositeColors[0] &&
|
||||
(mCompositeColors[0]->mColor == NS_RGBA(0,0,0,0) &&
|
||||
!mCompositeColors[0]->mNext))))
|
||||
{
|
||||
// All borders are the same style, and the style is either none or hidden, or the color
|
||||
// is transparent.
|
||||
// This doesn't check if the composite colors happen to be all transparent, but that should
|
||||
// happen very rarely in practice.
|
||||
// This also checks if the first composite color is transparent, and there are
|
||||
// no others. It doesn't check if there are subsequent transparent ones, because
|
||||
// that would be very silly.
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user