Bug 794693: Fix font inflation crash by reordering logic in nsHTMLReflowState::InitResizeFlags(). [r=mats]

This commit is contained in:
Scott Johnson 2013-05-23 11:14:12 +08:00
Родитель 7a1d704070
Коммит a6dbf382f4
3 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -0,0 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml"><body style="display: -moz-box;">
<font style="display: table; float: left;">
<span style="display: table;">
text text
</span>
</font>
</body>
</html>

Просмотреть файл

@ -401,6 +401,7 @@ load 770381-1.html
load 772306.html
load 788360.html
load 793848.html
test-pref(font.size.inflation.minTwips,120) load 794693.html
load 795646.html
load 802902.html
skip-if(!gtk2Widget) load 813372-1.html # bug 873083

Просмотреть файл

@ -432,12 +432,14 @@ nsHTMLReflowState::InitResizeFlags(nsPresContext* aPresContext, nsIAtom* aFrameT
nsLayoutUtils::FontSizeInflationEnabled(aPresContext)) {
// Create our font inflation data if we don't have it already, and
// give it our current width information.
bool dirty = nsFontInflationData::UpdateFontInflationDataWidthFor(*this) &&
// Avoid running this at the box-to-block interface
// (where we shouldn't be inflating anyway, and where
// reflow state construction is probably to construct a
// dummy parent reflow state anyway).
!mFlags.mDummyParentReflowState;
// Avoid running this at the box-to-block interface
// (where we shouldn't be inflating anyway, and where
// reflow state construction is probably to construct a
// dummy parent reflow state anyway).
bool dirty = !mFlags.mDummyParentReflowState &&
nsFontInflationData::UpdateFontInflationDataWidthFor(*this);
if (dirty || (!frame->GetParent() && isHResize)) {
// When font size inflation is enabled, a change in either: