if (attributes != null) {
Map hrPropertiesAndSupportTypes = getPropertyAndSupportTypes(
attributes.getStyles(), hrElementCapability);
CapabilitySupportLevel hrSupportLevel =
hrElementCapability.getElementSupportLevel();
if (hrPropertiesAndSupportTypes != null &&
emulationRequired(hrPropertiesAndSupportTypes,
hrSupportLevel)) {
if (hrSupportLevel == CapabilitySupportLevel.PARTIAL) {
emulator = investigateHREmulator(hrPropertiesAndSupportTypes);
} else if (!supportsCSS) {
// Does the device support the bgcolor attribute?
emulator = new TableAttrHREmulator();
}
if (emulator == null) {
DeviceElementCapability divElementCapability =
deviceCapabilityManager.getDeviceElementCapability("div", true);
CapabilitySupportLevel divSupportLevel =
divElementCapability.getElementSupportLevel();
if (divSupportLevel == CapabilitySupportLevel.FULL) {
emulator = new HorizontalRuleEmulatorWithBorderStylingOnDIV(
HorizontalRuleEmulatorWithBorderStylingOnDIV.
BORDER_BOTTOM_PROPERTY);