Bug 1306830: Correctly set the top of the font area to be drawn. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Mon, 03 Oct 2016 06:42:26 +0200
changeset 320181 98e0a72e854f79676b860ff48e2abae9550940a0
parent 320180 050803173323d9933f53eec8852e932aa51004a9
child 320182 141c1a49b1b19bac1a23fc24d2843cc218b930a3
push id20751
push userphilringnalda@gmail.com
push dateSun, 30 Oct 2016 18:06:35 +0000
treeherderfx-team@e3279760cd97 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1306830
milestone52.0a1
Bug 1306830: Correctly set the top of the font area to be drawn. r=jrmuizel MozReview-Commit-ID: IIBJPzD3hyb
gfx/cairo/cairo/src/cairo-dwrite-font.cpp
--- a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
+++ b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
@@ -1359,17 +1359,17 @@ cairo_int_status_t
      */
     RECT fontArea;
     fontArea.left = (INT32)(smallestX - scaled_font->font_matrix.xx);
     fontArea.right = (INT32)(largestX + scaled_font->font_matrix.xx * 2);
     fontArea.top = (INT32)(smallestY - scaled_font->font_matrix.yy);
     fontArea.bottom = (INT32)(largestY + scaled_font->font_matrix.yy * 2);
     if (fontArea.left < 0)
 	fontArea.left = 0;
-    if (fontArea.top > 0)
+    if (fontArea.top < 0)
 	fontArea.top = 0;
     if (fontArea.bottom > dst->extents.height) {
 	fontArea.bottom = dst->extents.height;
     }
     if (fontArea.right > dst->extents.width) {
 	fontArea.right = dst->extents.width;
     }
     if (fontArea.right <= fontArea.left ||