зеркало из https://github.com/mozilla/pjs.git
Reversed the order that width and height are checked in IsEmpty since it is more common to have a height of 0. b=103266 r=rbs sr=hyatt
This commit is contained in:
Родитель
9e913808e0
Коммит
145628aba2
|
@ -59,10 +59,10 @@ struct NS_GFX nsRect {
|
||||||
nsRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {x = aX; y = aY;
|
nsRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {x = aX; y = aY;
|
||||||
width = aWidth; height = aHeight;}
|
width = aWidth; height = aHeight;}
|
||||||
|
|
||||||
// Emptiness. An empty rect is one that has no area, i.e. its width or height
|
// Emptiness. An empty rect is one that has no area, i.e. its height or width
|
||||||
// is <= 0
|
// is <= 0
|
||||||
PRBool IsEmpty() const {
|
PRBool IsEmpty() const {
|
||||||
return (PRBool) ((width <= 0) || (height <= 0));
|
return (PRBool) ((height <= 0) || (width <= 0));
|
||||||
}
|
}
|
||||||
void Empty() {width = height = 0;}
|
void Empty() {width = height = 0;}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче