Object value = element.getElementType().getValue(runtime, element);
boolean empty = isEmpty(value);
StyleInfoCollection lastCollection = (StyleInfoCollection)
element.getAttribute(AttributeNames.Internal.NAMESPACE, AttributeNames.Internal.FAST_EXPORT_ELEMENT_STASH);
SimpleStyleSheet computedStyle = element.getComputedStyle();
if (lastCollection != null &&
lastCollection.getStyleChangeTracker() == computedStyle.getChangeTrackerHash() &&
lastCollection.nullValue == empty)
{
// no changes
styleInfo.put(element.getObjectID(), lastCollection);
return;
}
StyleInfoCollection collection = new StyleInfoCollection(styleIndex.length, empty);
collection.setStyleChangeTracker(computedStyle.getChangeTrackerHash());
for (StyleKey styleKey : styleIndex)
{
collection.add(styleKey, computedStyle.getStyleProperty(styleKey));
}
styleInfo.put(element.getObjectID(), collection);
}