Bug 1350780 Part 1: Change nsComputedDOMStyle::DoGetGridTemplate{Columns|Rows} to take grid templates from mInnerFrame. r=mats
authorBrad Werth <bwerth@mozilla.com>
Tue, 14 Nov 2017 13:15:37 -0800
changeset 436563 c5dc9b4abb084fb9e5d2878a3411640cc3eafedd
parent 436562 4468b446c3c58737af7f28f9d5ba6bb78c00740a
child 436564 cd4e8b6932498eb87729bf7dffa2c754e1129dd1
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersmats
bugs1350780
milestone59.0a1
Bug 1350780 Part 1: Change nsComputedDOMStyle::DoGetGridTemplate{Columns|Rows} to take grid templates from mInnerFrame. r=mats MozReview-Commit-ID: KYGfehqaOij
layout/style/nsComputedDOMStyle.cpp
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -3247,41 +3247,40 @@ nsComputedDOMStyle::DoGetGridAutoRows()
 }
 
 already_AddRefed<CSSValue>
 nsComputedDOMStyle::DoGetGridTemplateColumns()
 {
   const ComputedGridTrackInfo* info = nullptr;
 
   nsGridContainerFrame* gridFrame =
-    nsGridContainerFrame::GetGridFrameWithComputedInfo(
-      mContent->GetPrimaryFrame());
+    nsGridContainerFrame::GetGridFrameWithComputedInfo(mInnerFrame);
 
   if (gridFrame) {
     info = gridFrame->GetComputedTemplateColumns();
   }
 
   return GetGridTemplateColumnsRows(
     StylePosition()->GridTemplateColumns(), info);
 }
 
 already_AddRefed<CSSValue>
 nsComputedDOMStyle::DoGetGridTemplateRows()
 {
   const ComputedGridTrackInfo* info = nullptr;
 
   nsGridContainerFrame* gridFrame =
-    nsGridContainerFrame::GetGridFrameWithComputedInfo(
-      mContent->GetPrimaryFrame());
+    nsGridContainerFrame::GetGridFrameWithComputedInfo(mInnerFrame);
 
   if (gridFrame) {
     info = gridFrame->GetComputedTemplateRows();
   }
 
-  return GetGridTemplateColumnsRows(StylePosition()->GridTemplateRows(), info);
+  return GetGridTemplateColumnsRows(
+    StylePosition()->GridTemplateRows(), info);
 }
 
 already_AddRefed<CSSValue>
 nsComputedDOMStyle::GetGridLine(const nsStyleGridLine& aGridLine)
 {
   if (aGridLine.IsAuto()) {
     RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
     val->SetIdent(eCSSKeyword_auto);