diff --git a/layout/xul/base/src/grid/nsGrid.cpp b/layout/xul/base/src/grid/nsGrid.cpp index e01b78963220..2bab8c0bbb12 100644 --- a/layout/xul/base/src/grid/nsGrid.cpp +++ b/layout/xul/base/src/grid/nsGrid.cpp @@ -1466,7 +1466,7 @@ nsGrid::GetScrolledBox(nsIBox* aChild) if (scrollFrame) { nsIFrame* scrolledFrame = scrollFrame->GetScrolledFrame(); NS_ASSERTION(scrolledFrame,"Error no scroll frame!!"); - return scrolledFrame->IsBoxFrame() ? scrolledFrame : nsnull; + return scrolledFrame; } return aChild; diff --git a/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp b/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp index 25b6037d5962..f34a37a02bc1 100644 --- a/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp +++ b/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp @@ -206,11 +206,7 @@ nsGridRowGroupLayout::DirtyRows(nsIBox* aBox, nsBoxLayoutState& aState) // walk into other monuments nsCOMPtr layout; - // deepChild might be null if child is a scrollframe around a non-box. - // But in that case there's nothing to do here, really. - if (deepChild) { - deepChild->GetLayoutManager(getter_AddRefs(layout)); - } + deepChild->GetLayoutManager(getter_AddRefs(layout)); if (layout) { nsCOMPtr monument( do_QueryInterface(layout) ); if (monument) @@ -240,12 +236,7 @@ nsGridRowGroupLayout::CountRowsColumns(nsIBox* aBox, PRInt32& aRowCount, PRInt32 nsIBox* deepChild = nsGrid::GetScrolledBox(child); nsCOMPtr layout; - // deepChild might be null if child is a scrollframe around a non-box. - // But in that case I guess we can count this as a single grid row. Or - // something. - if (deepChild) { - deepChild->GetLayoutManager(getter_AddRefs(layout)); - } + deepChild->GetLayoutManager(getter_AddRefs(layout)); if (layout) { nsCOMPtr monument( do_QueryInterface(layout) ); if (monument) { @@ -299,11 +290,7 @@ nsGridRowGroupLayout::BuildRows(nsIBox* aBox, nsGridRow* aRows, PRInt32* aCount) nsIBox* deepChild = nsGrid::GetScrolledBox(child); nsCOMPtr layout; - // deepChild might be null if child is a scrollframe around a non-box. - // But in that case there's nothing special that needs doing there. - if (deepChild) { - deepChild->GetLayoutManager(getter_AddRefs(layout)); - } + deepChild->GetLayoutManager(getter_AddRefs(layout)); if (layout) { nsCOMPtr monument( do_QueryInterface(layout) ); if (monument) { diff --git a/layout/xul/base/src/grid/nsGridRowLayout.cpp b/layout/xul/base/src/grid/nsGridRowLayout.cpp index 2670c6e196dc..b487acf0f509 100644 --- a/layout/xul/base/src/grid/nsGridRowLayout.cpp +++ b/layout/xul/base/src/grid/nsGridRowLayout.cpp @@ -135,12 +135,7 @@ nsGridRowLayout::GetGrid(nsIBox* aBox, nsGrid** aList, PRInt32* aIndex, nsGridRo nsIBox* childBox = nsGrid::GetScrolledBox(child); nsCOMPtr layout; - // childBox might be null if child is a scrollframe around a non-box. But - // in that case I guess we can count this as a single grid row. Or - // something. - if (childBox) { - childBox->GetLayoutManager(getter_AddRefs(layout)); - } + childBox->GetLayoutManager(getter_AddRefs(layout)); // find our requester nsCOMPtr gridRow = do_QueryInterface(layout, &rv);