Bug 1424673 - Fix the clip region for text draw target. r=kats

For draw target, the initial clip region should be the draw target's size.

MozReview-Commit-ID: 2z2EobkYFs2

--HG--
extra : rebase_source : 9631cf189330b089992b8458113800ea9a3fd4a0
This commit is contained in:
Ethan Lin 2018-01-08 10:59:01 +08:00
Родитель 52aac2a6d6
Коммит 7ab691c827
1 изменённых файлов: 4 добавлений и 7 удалений

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

@ -63,14 +63,11 @@ public:
LayoutDeviceRect layoutBoundsRect = LayoutDeviceRect::FromAppUnits(
aBounds, appUnitsPerDevPixel);
LayoutDeviceRect layoutClipRect = layoutBoundsRect;
auto clip = aItem->GetClip();
if (clip.HasClip()) {
layoutClipRect = LayoutDeviceRect::FromAppUnits(
clip.GetClipRect(), appUnitsPerDevPixel);
}
mBoundsRect = aSc.ToRelativeLayoutRect(layoutBoundsRect);
// Add 1 pixel of dirty area around clip rect to allow us to paint
// antialiased pixels beyond the measured text extents.
layoutClipRect.Inflate(1);
mClipRect = aSc.ToRelativeLayoutRect(layoutClipRect);
mBackfaceVisible = !aItem->BackfaceIsHidden();