// possible as processing each style property is *very* processor
// intensive. For example, there is not much use extracing most of
// the mcs-* properties as they are not understood by any device.
cssVersion.iterate(this);
ExtractorConfigurationBuilder configurationBuilder =
factory.createConfigurationBuilder();
// Populate the set of supported shorthands.
MutableShorthandSet supportedShorthands = new MutableShorthandSet();
Iterator i = StyleShorthands.getDefinitions().iterator();
while (i.hasNext()) {
StyleShorthand shorthand = (StyleShorthand) i.next();
if (cssVersion.supportsShorthand(shorthand)) {
supportedShorthands.add(shorthand);
}
}
String internalShorthand = BorderRadiusHelper.supportShorthand(cssVersion);
if(internalShorthand != null) {
supportedShorthands.add(StyleShorthands.getDefinitions().getShorthand("mcs-border-radius"));
}
configurationBuilder.setSupportedShorthands(supportedShorthands);
PropertyDetailsSet detailsSet = detailsSetBuilder.getDetailsSet();
String defaultCSS = device.getPolicyValue(
DevicePolicyConstants.DEFAULT_CSS);
if (defaultCSS == null) {
defaultCSS = "";
}
String sourceLocation = device.getName() + "/" +
DevicePolicyConstants.DEFAULT_CSS;
CompiledStyleSheet compiledStyleSheet = compileDeviceStyleSheet(
defaultCSS, sourceLocation);
configurationBuilder.setDeviceStyleSheet(compiledStyleSheet);
configurationBuilder.setDetailsSet(detailsSet);
return configurationBuilder.buildConfiguration();
}