mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 394279 - "nsRect::Contains() should always succeed if the parameter rect is empty" [p=bugspam.Callek@gmail.com (Justin Wood [Callek]) r+sr=roc a1.9=mconnor]
This commit is contained in:
parent
b8c0effac5
commit
80990f6596
@ -60,10 +60,12 @@ PRBool nsRect::Contains(nscoord aX, nscoord aY) const
|
||||
(aX < XMost()) && (aY < YMost()));
|
||||
}
|
||||
|
||||
//Also Returns true if aRect is Empty
|
||||
PRBool nsRect::Contains(const nsRect &aRect) const
|
||||
{
|
||||
return (PRBool) ((aRect.x >= x) && (aRect.y >= y) &&
|
||||
(aRect.XMost() <= XMost()) && (aRect.YMost() <= YMost()));
|
||||
return aRect.IsEmpty() ||
|
||||
((PRBool) ((aRect.x >= x) && (aRect.y >= y) &&
|
||||
(aRect.XMost() <= XMost()) && (aRect.YMost() <= YMost())));
|
||||
}
|
||||
|
||||
// Intersection. Returns TRUE if the receiver overlaps aRect and
|
||||
|
Loading…
Reference in New Issue
Block a user