зеркало из https://github.com/mozilla/gecko-dev.git
Bug 853889 - Check orientation of single trapezoid in _cairo_bentley_ottmann_tessellate_rectangular_traps. r=jmuizelaar
--HG-- extra : rebase_source : 852a5923994f3d75f0ec68fe9d500f3cade5ba18
This commit is contained in:
Родитель
78c4fb4975
Коммит
5e589d88a4
|
@ -674,11 +674,20 @@ _cairo_bentley_ottmann_tessellate_rectangular_traps (cairo_traps_t *traps,
|
|||
cairo_status_t status;
|
||||
int i;
|
||||
|
||||
if (unlikely (traps->num_traps <= 1))
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
assert (traps->is_rectangular);
|
||||
|
||||
if (unlikely (traps->num_traps <= 1)) {
|
||||
if (traps->num_traps == 1) {
|
||||
cairo_trapezoid_t *trap = traps->traps;
|
||||
if (trap->left.p1.x > trap->right.p1.x) {
|
||||
cairo_line_t tmp = trap->left;
|
||||
trap->left = trap->right;
|
||||
trap->right = tmp;
|
||||
}
|
||||
}
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
dump_traps (traps, "bo-rects-traps-in.txt");
|
||||
|
||||
rectangles = stack_rectangles;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head><title>Testcase for bug 853889</title></head>
|
||||
<body>
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="400px" height="400px">
|
||||
<path d="M 0 0 L 0 50 L 400 50 L 400 0 Z"
|
||||
fill="rgb(12,200,12)"></path>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head><title>Testcase for bug 853889</title></head>
|
||||
<body>
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="400px" height="400px">
|
||||
|
||||
<path d="M 0 400 L 0 450 L 600 450 L 600 400 Z"
|
||||
fill="rgb(200,12,12)"></path>
|
||||
<path d="M 0 0 L 0 50 L 600 50 L 600 0 Z"
|
||||
fill="rgb(200,12,12)"></path>
|
||||
|
||||
<path d="M 0 0 L 0 50 L 600 50 L 600 0 Z
|
||||
M 0 400 L 0 450 L 600 450 L 600 400 Z"
|
||||
fill="rgb(12,200,12)"></path>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
|
@ -3,3 +3,4 @@
|
|||
fuzzy-if(winWidget,175,443) == 611498-1.html 611498-ref.html
|
||||
skip-if(B2G) fuzzy-if(Android&&AndroidVersion>=15,8,1000) == 709477-1.html 709477-1-ref.html # bug 773482
|
||||
skip-if(!asyncPanZoom) == 1086723.html 1086723-ref.html
|
||||
== 853889-1.html 853889-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче