diff --git a/gsk/gskrectprivate.h b/gsk/gskrectprivate.h index 413b202143..daae5516a8 100644 --- a/gsk/gskrectprivate.h +++ b/gsk/gskrectprivate.h @@ -131,9 +131,10 @@ gsk_rect_coverage (const graphene_rect_t *r1, x2max = MAX (r1->origin.x + r1->size.width, r2->origin.x + r2->size.width); y2max = MAX (r1->origin.y + r1->size.height, r2->origin.y + r2->size.height); - if (x2min >= x1max) + if (x2min >= x1max && y2min >= y1max) { float w, h; + w = x2min - x1max; h = y2max - y1min; size2 = w * h; @@ -142,11 +143,7 @@ gsk_rect_coverage (const graphene_rect_t *r1, r = GRAPHENE_RECT_INIT (x1max, y1min, w, h); size = size2; } - } - if (y2min >= y1max) - { - float w, h; w = x2max - x1min; h = y2min - y1max; size2 = w * h; diff --git a/testsuite/gsk/opaque/not-near-0-0-50-50.node b/testsuite/gsk/opaque/not-near-0-0-50-50.node new file mode 100644 index 0000000000..1d0deefc23 --- /dev/null +++ b/testsuite/gsk/opaque/not-near-0-0-50-50.node @@ -0,0 +1,6 @@ +color { + bounds: 0 0 50 50; +} +color { + bounds: 1000 0 10 10; +}