Bug 1098551: Use nsBidiLevel (instead of uint8_t) to capture result of functions that return nsBidiLevel. r=smontagu
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 13 Nov 2014 14:53:17 -0800
changeset 215655 ee366f6b2d3ec274b34190cb2f37a6bdc5736433
parent 215654 2e8496d85ba2410228a73b685e39970aff9cbbbe
child 215656 ed264e327a937902f07abe524b61850d072c1843
push id51812
push userdholbert@mozilla.com
push dateThu, 13 Nov 2014 22:53:33 +0000
treeherdermozilla-inbound@ee366f6b2d3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1098551
milestone36.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 1098551: Use nsBidiLevel (instead of uint8_t) to capture result of functions that return nsBidiLevel. r=smontagu
layout/base/nsBidiPresUtils.cpp
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -353,17 +353,17 @@ struct BidiLineData {
 
     bool isReordered = false;
     bool hasRTLFrames = false;
 
     for (nsIFrame* frame = aFirstFrameOnLine;
          frame && aNumFramesOnLine--;
          frame = frame->GetNextSibling()) {
       AppendFrame(frame);
-      uint8_t level = nsBidiPresUtils::GetFrameEmbeddingLevel(frame);
+      nsBidiLevel level = nsBidiPresUtils::GetFrameEmbeddingLevel(frame);
       mLevels.AppendElement(level);
       mIndexMap.AppendElement(0);
       if (level & 1) {
         hasRTLFrames = true;
       }
     }
 
     // Reorder the line
@@ -653,17 +653,17 @@ nsBidiPresUtils::ResolveParagraph(nsBloc
   }
   aBpd->mBuffer.ReplaceChar(kSeparators, kSpace);
 
   int32_t runCount;
 
   nsresult rv = aBpd->SetPara();
   NS_ENSURE_SUCCESS(rv, rv);
 
-  uint8_t embeddingLevel = aBpd->GetParaLevel();
+  nsBidiLevel embeddingLevel = aBpd->GetParaLevel();
 
   rv = aBpd->CountRuns(&runCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
   int32_t     runLength      = 0;   // the length of the current run of text
   int32_t     lineOffset     = 0;   // the start of the current run
   int32_t     logicalLimit   = 0;   // the end of the current run + 1
   int32_t     numRun         = -1;