Bug 1101020 - Add the ability to fall back to not snapping, if snapping results in a zero area rect r=roc

This commit is contained in:
James Kitchener
2015-10-17 10:18:00 -07:00
parent 66e8a3d8ac
commit 81ec642f75
20 changed files with 775 additions and 8 deletions

View File

@@ -363,9 +363,10 @@ void nsDisplayMathMLBar::Paint(nsDisplayListBuilder* aBuilder,
{
// paint the bar with the current text color
DrawTarget* drawTarget = aCtx->GetDrawTarget();
Rect rect = NSRectToSnappedRect(mRect + ToReferenceFrame(),
mFrame->PresContext()->AppUnitsPerDevPixel(),
*drawTarget);
Rect rect =
NSRectToNonEmptySnappedRect(mRect + ToReferenceFrame(),
mFrame->PresContext()->AppUnitsPerDevPixel(),
*drawTarget);
ColorPattern color(ToDeviceColor(
mFrame->GetVisitedDependentColor(eCSSProperty_color)));
drawTarget->FillRect(rect, color);