if (element == null)
{
final StyleKey[] propertyKeys = rule.getPropertyKeysAsArray();
for (int i = 0; i < propertyKeys.length; i++)
{
final StyleKey key = propertyKeys[i];
final CSSValue propertyCSSValue = rule.getPropertyCSSValue(key);
if (propertyCSSValue != null)
{
target.setValue(key, propertyCSSValue);
}
}
return;
}
final StyleKey[] propertyKeys = rule.getPropertyKeysAsArray();
final CSSValue[] values = rule.getStyleValues();
for (int i = 0; i < values.length; i++)
{
final StyleKey key = propertyKeys[i];
final CSSValue value = rule.getPropertyCSSValue(key);
if (ContentStyleKeys.CONTENT.equals(key) ||
ContentStyleKeys.STRING_DEFINE.equals(key) ||
ContentStyleKeys.STRING_SET.equals(key))
{
// dont resolve that one ..
values[i] = value;
}
else
{
values[i] = resolveValue(value, element);
}
}
for (int i = 0; i < values.length; i++)
{
final StyleKey key = propertyKeys[i];
final CSSValue value = values[i];
if (value != null)
{
target.setValue(key, value);