while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object val = fProperties.get(key);
if (val instanceof CSSQueryDeclarationData) {
ICSSStyleDeclItem declItem = ((CSSQueryDeclarationData) val).getDeclItem();
if (declItem.getLength() <= 0) {
ICSSStyleDeclItem itemToRemove = decl.getDeclItemNode(key.toString());
if (itemToRemove != null) {
decl.removeDeclItemNode(itemToRemove);
}
}
else {
decl.setDeclItemNode(declItem);
}
}
else {
String value = (val instanceof ICSSValue) ? ((ICSSValue) val).getCSSValueText() : val.toString();
if (value == null || value.length() <= 0) {
ICSSStyleDeclItem itemToRemove = decl.getDeclItemNode(key.toString());
if (itemToRemove != null) {
decl.removeDeclItemNode(itemToRemove);
}
}
else {