* tries to mimic many commercial solutions that chose to violate the
* XSL specification.
* @see CorrespondingPropertyMaker#compute(PropertyList)
*/
public Property computeAlternativeRuleset(PropertyList propertyList) throws PropertyException {
PropertyList pList = getWMPropertyList(propertyList);
if (pList == null) {
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.getWritingMode(lr_tb, rl_tb, tb_rl);
//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);