Bug 509569. Avoid assertion by not storing structs with unused inherit logical box props in them, even though it would be ok to do so. r=dbaron

This commit is contained in:
Boris Zbarsky 2010-04-01 22:09:05 -04:00
Родитель c92ceba9fd
Коммит f203c2ec0f
3 изменённых файлов: 9 добавлений и 0 удалений

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

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html style="-moz-border-start: inherit; border: none"><body></body></html>

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

@ -48,6 +48,7 @@ load 495269-2.html
load 498036-1.html
load 509155-1.html
load 509156-1.html
load 509569-1.html
load 524252-1.html
load font-face-truncated-src.html
load 536789-1.html

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

@ -2326,6 +2326,12 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyleContext* aContext,
if (RTLlogical)
aValueRect.*(nsCSSRect::sides[aSide]) = aRTLLogicalValue;
}
} else if (aLTRLogicalValue.GetUnit() == eCSSUnit_Inherit ||
aRTLLogicalValue.GetUnit() == eCSSUnit_Inherit) {
// It actually is valid to store this in the ruletree, since
// LTRlogical and RTLlogical are both false, but doing that will
// trigger asserts. Silence those.
aCanStoreInRuleTree = PR_FALSE;
}
}