From 16d21bb3d7120635ecbe52136d7216cd5c2f5ee5 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Fri, 3 Jun 2016 17:30:00 +0200 Subject: [PATCH] Bug 1278007 - [css-grid] Reset all baseline bits when we decide a grid item doesn't participate in [first|last]-baseline alignment. r=dholbert --- layout/generic/crashtests/1278007.html | 26 +++++++++++++++++++++++ layout/generic/crashtests/crashtests.list | 1 + layout/generic/nsGridContainerFrame.cpp | 4 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 layout/generic/crashtests/1278007.html diff --git a/layout/generic/crashtests/1278007.html b/layout/generic/crashtests/1278007.html new file mode 100644 index 000000000000..8ab783ee51ff --- /dev/null +++ b/layout/generic/crashtests/1278007.html @@ -0,0 +1,26 @@ + + + + + + + + +
+
+ +
+
+ + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index ae64f04e51cd..d3a5baa2a52c 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -626,3 +626,4 @@ asserts-if(Android,2-4) asserts-if(!Android,4) load 1225005.html # bug 682647 an load 1233191.html asserts(2) load 1272983-1.html # bug 586628 asserts(2) load 1272983-2.html # bug 586628 +load 1278007.html diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index 173235eec1c6..efa2349f0f05 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -3771,7 +3771,7 @@ nsGridContainerFrame::Tracks::InitializeItemBaselines( firstBaselineItems.AppendElement(ItemBaselineData( { baselineTrack, baseline, alignSize, &gridItem })); } else { - state &= ~ItemState::eFirstBaseline; + state &= ~ItemState::eAllBaselineBits; } } else { if (nsLayoutUtils::GetLastLineBaseline(wm, child, &baseline)) { @@ -3784,7 +3784,7 @@ nsGridContainerFrame::Tracks::InitializeItemBaselines( lastBaselineItems.AppendElement(ItemBaselineData( { baselineTrack, descent, alignSize, &gridItem })); } else { - state &= ~ItemState::eLastBaseline; + state &= ~ItemState::eAllBaselineBits; } } }