https://issues.apache.org/bugzilla/show_bug.cgi?id=46896
Summary: CSS Value constant for "text-align: start" contains
wrong String constant
Product: Batik
Version: 1.8
Platform: All
OS/Version: All
Status: NEW
Severity: trivial
Priority: P2
Component: CSS
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=23402)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23402)
Patch to SVG12ValueConstants
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.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]