Bug 1194493 - Ensure the 'mVertical' flag is set appropriately on the nsFontMetrics we use to draw text for an nsTextBoxFrame. r=smontagu
authorJonathan Kew <jkew@mozilla.com>
Sun, 16 Aug 2015 15:09:08 +0100
changeset 257968 22b685186a10600851a8a6f1d05608eb13e68baf
parent 257967 52145910f5b602dc0bb807e9d417db34b5e4b30e
child 257969 85555a82cb1e2261c5803a67f9dc4c0409bf2cd3
push id29238
push userryanvm@gmail.com
push dateMon, 17 Aug 2015 13:06:57 +0000
treeherdermozilla-central@a6eeb28458fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1194493
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1194493 - Ensure the 'mVertical' flag is set appropriately on the nsFontMetrics we use to draw text for an nsTextBoxFrame. r=smontagu
layout/xul/nsTextBoxFrame.cpp
--- a/layout/xul/nsTextBoxFrame.cpp
+++ b/layout/xul/nsTextBoxFrame.cpp
@@ -452,16 +452,18 @@ nsTextBoxFrame::DrawText(nsRenderingCont
           decorations |= NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH;
         }
       }
     } while (0 != decorMask &&
              (f = nsLayoutUtils::GetParentOrPlaceholderFor(f)));
 
     nsRefPtr<nsFontMetrics> fontMet;
     nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fontMet));
+    fontMet->SetVertical(wm.IsVertical());
+    fontMet->SetTextOrientation(StyleVisibility()->mTextOrientation);
 
     nscoord offset;
     nscoord size;
     nscoord ascent = fontMet->MaxAscent();
 
     nsPoint baselinePt;
     if (wm.IsVertical()) {
       baselinePt.x =