Author: dmaliarevich
Date: 2012-01-11 07:21:04 -0500 (Wed, 11 Jan 2012)
New Revision: 37759
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java
Log:
https://issues.jboss.org/browse/JBIDE-9975 - applying css style for <BODY> tag was
fixed.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java 2012-01-11
10:58:21 UTC (rev 37758)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java 2012-01-11
12:21:04 UTC (rev 37759)
@@ -57,24 +57,27 @@
final Node sourceAttribute = sourceNodeAttributes.item(i);
final String sourceAttributeName = sourceAttribute.getNodeName();
String attributeValue = sourceAttribute.getNodeValue();
-
final String targetAttributeName = getTargetAttributeName(sourceAttributeName);
if (targetAttributeName != null) {
if(HTML.ATTR_ID.equalsIgnoreCase(targetAttributeName)) {
div.setAttribute(HTML.ATTR_ID, attributeValue);
} else {
- // all full path for 'url'
- if (VpeStyleUtil.ATTRIBUTE_STYLE.equalsIgnoreCase(targetAttributeName))
- attributeValue = VpeStyleUtil.addFullPathIntoURLValue(attributeValue,
pageContext);
- if (VpeStyleUtil.PARAMETR_BACKGROND.equalsIgnoreCase(targetAttributeName))
- attributeValue = VpeStyleUtil.addFullPathIntoBackgroundValue(attributeValue,
- pageContext.getEditPart().getEditorInput());
+ if (HTML.ATTR_BACKGROUND.equalsIgnoreCase(targetAttributeName)
+ || HTML.ATTR_STYLE.equalsIgnoreCase(targetAttributeName)) {
+ /*
+ *
https://issues.jboss.org/browse/JBIDE-9975
+ * Simply set the background style, its correction will be made in
+ * VpeVisualDomBuilder.correctVisualAttribute(..) method.
+ * Wrong URLs won't be set by XULRunner itself.
+ */
+ div.setAttribute(targetAttributeName, attributeValue);
+ }
//FIX FOR JBIDE-1568, added by Max Areshkau
try {
body.setAttribute(targetAttributeName, attributeValue);
} catch(XPCOMException ex ) {
- //jsut ignore it
+ // Ignored
}
}
}