зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1008154 - Make BaseRect::Intersects return false if at least one of the rects is empty. r=roc
This commit is contained in:
Родитель
c9f5740ab3
Коммит
6cedf152d2
|
@ -92,7 +92,8 @@ struct BaseRect {
|
|||
// Always returns false if aRect is empty or 'this' is empty.
|
||||
bool Intersects(const Sub& aRect) const
|
||||
{
|
||||
return x < aRect.XMost() && aRect.x < XMost() &&
|
||||
return !IsEmpty() && !aRect.IsEmpty() &&
|
||||
x < aRect.XMost() && aRect.x < XMost() &&
|
||||
y < aRect.YMost() && aRect.y < YMost();
|
||||
}
|
||||
// Returns the rectangle containing the intersection of the points
|
||||
|
|
Загрузка…
Ссылка в новой задаче