Bug 1680258 - Don't try to draw rects with 0 width or height r=emalysz

This prevents an assertion from tripping below.

Differential Revision: https://phabricator.services.mozilla.com/D98476
This commit is contained in:
Doug Thayer 2020-12-08 22:35:26 +00:00
Родитель ad7c418754
Коммит c5df59793d
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -520,6 +520,10 @@ void RasterizeColorRect(const ColorRect& colorRect) {
}
for (const DrawRect& rect : drawRects) {
if (rect.height <= 0 || rect.width <= 0) {
continue;
}
// For rounded rectangles, the first thing we do is draw the top and
// bottom of the rectangle, with the more complicated logic below. After
// that we can just draw the vertically centered part of the rect like