Bug 1061027 - Remove bogus (and unnecessary) static_cast. r=roc
authorMats Palmgren <mats@mozilla.com>
Wed, 03 Sep 2014 14:14:00 -0400
changeset 203408 18ec1157a217238b7f1be89b3b0fa5cf49175492
parent 203407 4c3e6c741c4668e96b8a49eef5848832e5620b8f
child 203409 d88bb355ca22ff283308a936f932f38a01e44f5c
push id27425
push userryanvm@gmail.com
push dateWed, 03 Sep 2014 20:38:59 +0000
treeherdermozilla-central@acbdce59da2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1061027
milestone35.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 1061027 - Remove bogus (and unnecessary) static_cast. r=roc
layout/mathml/nsMathMLmtableFrame.cpp
--- a/layout/mathml/nsMathMLmtableFrame.cpp
+++ b/layout/mathml/nsMathMLmtableFrame.cpp
@@ -231,38 +231,37 @@ ApplyBorderToStyle(const nsMathMLmtdFram
 }
 
 static nsMargin
 ComputeBorderOverflow(nsMathMLmtdFrame* aFrame, nsStyleBorder aStyleBorder)
 {
   nsMargin overflow;
   int32_t rowIndex;
   int32_t columnIndex;
-  nsMathMLmtableFrame* mathMLmtableFrame =
-    static_cast<nsMathMLmtableFrame*>(nsTableFrame::GetTableFrame(aFrame));
+  nsTableFrame* table = nsTableFrame::GetTableFrame(aFrame);
   aFrame->GetCellIndexes(rowIndex, columnIndex);
   if (!columnIndex) {
-    overflow.left = mathMLmtableFrame->GetCellSpacingX(-1);
-    overflow.right = mathMLmtableFrame->GetCellSpacingX(0) / 2;
-  } else if (columnIndex == mathMLmtableFrame->GetColCount() - 1) {
-    overflow.left = mathMLmtableFrame->GetCellSpacingX(columnIndex - 1) / 2;
-    overflow.right =  mathMLmtableFrame->GetCellSpacingX(columnIndex + 1);
+    overflow.left = table->GetCellSpacingX(-1);
+    overflow.right = table->GetCellSpacingX(0) / 2;
+  } else if (columnIndex == table->GetColCount() - 1) {
+    overflow.left = table->GetCellSpacingX(columnIndex - 1) / 2;
+    overflow.right =  table->GetCellSpacingX(columnIndex + 1);
   } else {
-    overflow.left = mathMLmtableFrame->GetCellSpacingX(columnIndex - 1) / 2;
-    overflow.right = mathMLmtableFrame->GetCellSpacingX(columnIndex) / 2;
+    overflow.left = table->GetCellSpacingX(columnIndex - 1) / 2;
+    overflow.right = table->GetCellSpacingX(columnIndex) / 2;
   }
   if (!rowIndex) {
-    overflow.top = mathMLmtableFrame->GetCellSpacingY(-1);
-    overflow.bottom = mathMLmtableFrame->GetCellSpacingY(0) / 2;
-  } else if (rowIndex == mathMLmtableFrame->GetRowCount() - 1) {
-    overflow.top = mathMLmtableFrame->GetCellSpacingY(rowIndex - 1) / 2;
-    overflow.bottom = mathMLmtableFrame->GetCellSpacingY(rowIndex + 1);
+    overflow.top = table->GetCellSpacingY(-1);
+    overflow.bottom = table->GetCellSpacingY(0) / 2;
+  } else if (rowIndex == table->GetRowCount() - 1) {
+    overflow.top = table->GetCellSpacingY(rowIndex - 1) / 2;
+    overflow.bottom = table->GetCellSpacingY(rowIndex + 1);
   } else {
-    overflow.top = mathMLmtableFrame->GetCellSpacingY(rowIndex - 1) / 2;
-    overflow.bottom = mathMLmtableFrame->GetCellSpacingY(rowIndex) / 2;
+    overflow.top = table->GetCellSpacingY(rowIndex - 1) / 2;
+    overflow.bottom = table->GetCellSpacingY(rowIndex) / 2;
   }
   return overflow;
 }
 
 /*
  * A variant of the nsDisplayBorder contains special code to render a border
  * around a nsMathMLmtdFrame based on the rowline and columnline properties
  * set on the cell frame.