return null;
}
// Calculate the values as described in 5.3.2.
Numeric padding = getCorresponding(paddingCorresponding, propertyList).getNumeric();
Numeric border = getCorresponding(borderWidthCorresponding, propertyList).getNumeric();
int marginProp = pList.selectFromWritingMode(lrtb, rltb, tbrl, tblr);
//Determine whether the nearest anscestor indent was specified through
//start-indent|end-indent or through a margin property.
boolean marginNearest = false;
PropertyList pl = propertyList.getParentPropertyList();
while (pl != null) {
if (pl.getExplicit(baseMaker.propId) != null) {
break;
} else if (pl.getExplicitOrShorthand(marginProp) != null) {
marginNearest = true;
break;
}
pl = pl.getParentPropertyList();
}
// Calculate the absolute margin.
if (propertyList.getExplicitOrShorthand(marginProp) == null) {
Property indent = propertyList.getExplicit(baseMaker.propId);
if (indent == null) {
//Neither start-indent nor margin is specified, use inherited
if (isInherited(propertyList) || !marginNearest) {
return null;
} else {
return FixedLength.ZERO_FIXED_LENGTH;
}
} else {
return indent;
}
} else {
//Margin is used
Numeric margin = propertyList.get(marginProp).getNumeric();
Numeric v = FixedLength.ZERO_FIXED_LENGTH;
if (isInherited(propertyList)) {
// The inherited_value_of([start|end]-indent)
v = NumericOp.addition(v, propertyList.getInherited(baseMaker.propId).getNumeric());
}
// The corresponding absolute margin-[right|left}.