}
if (result == null) {
Node parent = e.getParentNode();
CalculatedStyle parentCalculatedStyle;
if (parent instanceof Document) {
parentCalculatedStyle = new EmptyStyle();
} else {
parentCalculatedStyle = getStyle((Element)parent, false);
}
result = parentCalculatedStyle.deriveStyle(getCss().getCascadedStyle(e, restyle));