mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1179859 - Fix _cairo_box_intersects_line_segment early rejection tests. r=jrmuizel
This commit is contained in:
parent
e004f2a723
commit
b50c5b4695
@ -213,8 +213,7 @@ _cairo_box_intersects_line_segment (cairo_box_t *box, cairo_line_t *line)
|
||||
xlen = - xlen;
|
||||
}
|
||||
|
||||
if ((t1 < 0 || t1 > xlen) &&
|
||||
(t2 < 0 || t2 > xlen))
|
||||
if (t1 > xlen || t2 < 0)
|
||||
return FALSE;
|
||||
} else {
|
||||
/* Fully vertical line -- check that X is in bounds */
|
||||
@ -232,8 +231,7 @@ _cairo_box_intersects_line_segment (cairo_box_t *box, cairo_line_t *line)
|
||||
ylen = - ylen;
|
||||
}
|
||||
|
||||
if ((t3 < 0 || t3 > ylen) &&
|
||||
(t4 < 0 || t4 > ylen))
|
||||
if (t3 > ylen || t4 < 0)
|
||||
return FALSE;
|
||||
} else {
|
||||
/* Fully horizontal line -- check Y */
|
||||
|
Loading…
Reference in New Issue
Block a user