Bug 1300518 - removed nullcheck for parentFrame in nsCSSFrameConstructor::IsValidSibling. r?xidorn draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Mon, 05 Sep 2016 18:16:21 +0300
changeset 409883 e8681991184808839a9b9573778f3d32a7fa3f97
parent 409737 dbe4b47941c7b3d6298a0ead5e40dd828096c808
child 410204 5455f94b71113daf66b0a6cbe9068c307145b5cc
push id28601
push userbmo:bpostelnicu@mozilla.com
push dateMon, 05 Sep 2016 15:17:27 +0000
reviewersxidorn
bugs1300518
milestone51.0a1
Bug 1300518 - removed nullcheck for parentFrame in nsCSSFrameConstructor::IsValidSibling. r?xidorn MozReview-Commit-ID: DVydlxB65wM
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -6508,20 +6508,17 @@ nsCSSFrameConstructor::AppendFramesToPar
 // inside fieldsets, (5) popups and other kids of the menu are siblings from a
 // content perspective, they are not considered siblings in the frame tree.
 bool
 nsCSSFrameConstructor::IsValidSibling(nsIFrame*              aSibling,
                                       nsIContent*            aContent,
                                       StyleDisplay&          aDisplay)
 {
   nsIFrame* parentFrame = aSibling->GetParent();
-  nsIAtom* parentType = nullptr;
-  if (parentFrame) {
-    parentType = parentFrame->GetType();
-  }
+  nsIAtom* parentType = parentFrame->GetType();
 
   StyleDisplay siblingDisplay = aSibling->GetDisplay();
   if (StyleDisplay::TableColumnGroup == siblingDisplay ||
       StyleDisplay::TableColumn      == siblingDisplay ||
       StyleDisplay::TableCaption     == siblingDisplay ||
       StyleDisplay::TableHeaderGroup == siblingDisplay ||
       StyleDisplay::TableRowGroup    == siblingDisplay ||
       StyleDisplay::TableFooterGroup == siblingDisplay ||