if (regex != null) {
int poolIndex = regexPoolMap.get(regex)[0];
Expression re = poolIndex < 0
? makeRegexp(commonSubstringMap, regex)
: (Expression) QuasiBuilder.substV(
"c[@i]", "i", new IntegerLiteral(unk, poolIndex));
dataObj.appendChild(new ValueProperty(regexObjKey, re));
}
String dom2property = propertyNameToDom2Property(prop.name);
ArrayConstructor altNames = null;
for (String altDom2Property : prop.dom2properties) {
if (altDom2Property.equals(dom2property)) { continue; }
if (altNames == null) {
altNames = new ArrayConstructor(
unk, Collections.<Expression>emptyList());
}
altNames.appendChild(StringLiteral.valueOf(unk, altDom2Property));
}
if (altNames != null) {
dataObj.appendChild(new ValueProperty(alternatesObjKey, altNames));
}
cssSchemaProps.add(new ValueProperty(
unk, StringLiteral.valueOf(unk, prop.name.getCanonicalForm()),
dataObj));
int propBits = 0;
for (CssPropBit b : data.properties) {
propBits |= b.jsValue;
}
if (LinkStyleWhitelist.HISTORY_INSENSITIVE_STYLE_WHITELIST
.contains(prop.name)) {
propBits |= CssPropBit.HISTORY_INSENSITIVE.jsValue;
} else if (LinkStyleWhitelist.PROPERTIES_ALLOWED_IN_LINK_CLASSES
.contains(prop.name)) {
propBits |= CssPropBit.ALLOWED_IN_LINK.jsValue;
}
dataObj.appendChild(
new ValueProperty(propbitsObjKey, new IntegerLiteral(unk, propBits)));
List<Expression> litGroups = Lists.newArrayList();
for (int groupIndex : litPartition.unions[propIndex]) {
litGroups.add((Expression) QuasiBuilder.substV(
"L[@i]", "i", new IntegerLiteral(unk, groupIndex)));
}
if (!litGroups.isEmpty()) {
dataObj.appendChild(new ValueProperty(
litgroupObjKey, new ArrayConstructor(unk, litGroups)));
}