# HG changeset patch # User Lee Salzman # Date 1528346550 14400 # Thu Jun 07 00:42:30 2018 -0400 # Node ID 7c0acc722a1203fc800e655299d8f130fa5f2de0 # Parent 9171b8c221ec8310e8fd0476359fdfb09b5329fe ensure nsDisplayBackgroundColor::Paint begins a new path before adding rectangle diff --git a/layout/painting/crashtests/1465305-1.html b/layout/painting/crashtests/1465305-1.html new file mode 100644 --- /dev/null +++ b/layout/painting/crashtests/1465305-1.html @@ -0,0 +1,8 @@ + +> + diff --git a/layout/painting/crashtests/crashtests.list b/layout/painting/crashtests/crashtests.list --- a/layout/painting/crashtests/crashtests.list +++ b/layout/painting/crashtests/crashtests.list @@ -6,8 +6,10 @@ load 1405881-1.html load 1418177-1.html load 1418722-1.html load 1419917.html load 1425271-1.html load 1428906-1.html skip-if(webrender) load 1430589-1.html # bug 1421825 for webrender load 1454105-1.html load 1455944-1.html +load 1465305-1.html + diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -4845,16 +4845,17 @@ nsDisplayBackgroundColor::Paint(nsDispla StyleGeometryBox clip = mBackgroundStyle->StyleBackground()->mImage.mLayers[0].mClip; if (clip == StyleGeometryBox::Text) { if (!GenerateAndPushTextMask(mFrame, aCtx, mBackgroundRect, aBuilder)) { return; } ctx->SetColor(mColor); + ctx->NewPath(); ctx->Rectangle(bounds, true); ctx->Fill(); ctx->PopGroupAndBlend(); return; } ctx->SetColor(mColor); ctx->NewPath();