mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 17:38:36 +00: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
69c9018678
commit
cb2d941707
@ -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…
x
Reference in New Issue
Block a user