Details
-
Bug
-
Status: Open
-
Resolution: Unresolved
-
1.8
-
None
-
Operating System: All
Platform: All
Description
Value constants for the css property text-align, used in flowed text elements, are stored in the interface SVG12ValueConstants, and reference String constants from SVG12CSSConstants. The constant START_VALUE references "full" instead "start".
To reproduce:
1) Look up the text-align property for an element:
Value textAlignValue = CSSUtilities.getComputedStyle(element, SVG12CSSEngine.TEXT_ALIGN_INDEX);
2) Get the String value of the property:
String textAlignStringValue = textAlignValue.getStringValue();
3) Test the value of the String - if the property was set in svg / css to "text-align: start" the result will be "full". Other values give the expected result.
Workaround:
Instead of testing the String value eg:
if (SVG12CSSConstants.CSS_START_VALUE.equals(textAlignStringValue)) ...
test the Value object, eg:
if (SVG12ValueConstants.START_VALUE == textAlignValue) ...
Initial assessment:
I have submitted this with a severity of "trivial" because it doesn't affect Squiggle, or any other program that compares the actual Value objects instead of the String value within. It could cause a bit of confusion when debugging though.