Bug 18985 - [QT][CAIRO] x- and y-attributes of <use>-element not used
Summary: [QT][CAIRO] x- and y-attributes of <use>-element not used
Status: RESOLVED DUPLICATE of bug 30342
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Keywords: Cairo, Qt
: 19026 (view as bug list)
Depends on:
Reported: 2008-05-10 07:17 PDT by Dirk Schulze
Modified: 2009-11-18 01:03 PST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2008-05-10 07:17:28 PDT
If I understood the code right, the <use>-element is transformed to a <g>-element (in a basic case). 
All Attributes are given to the transformed element (like transform,fill,stroke), except for the x- and y-attributes. This only affects the Qt- and Cairo-implementation.
Comment 1 Dirk Schulze 2008-05-10 12:11:31 PDT
a simple problem:
I get a comma instead of a point for floating-point (non-english-speaker), thats why webkit ignores the transformation.


transform(12,000, 30,500) instead of
transform(12.000, 30.500)
Comment 2 Dirk Schulze 2008-05-10 12:13:31 PDT
(In reply to comment #1)
I use gcc (GCC) 4.2.3
Comment 3 Mark Rowe (bdash) 2008-05-10 23:38:05 PDT
Looks like vsnprintf is locale-aware, which is probably not what we want inside WebCore.
Comment 4 Mark Rowe (bdash) 2008-05-13 11:28:08 PDT
*** Bug 19026 has been marked as a duplicate of this bug. ***
Comment 5 Dirk Schulze 2008-05-18 12:43:34 PDT
A solution could be

setlocale(LC_NUMERIC, "C");

add the line before a vsnprintf() operation or system wide (don't know it this is possible) and it should work. (perhaps with #include <local.h>)
I tested it in SVGUseElement.cpp with success.
Comment 6 Alexey Proskuryakov 2008-05-20 00:03:15 PDT
See also: bug 18994.
Comment 7 Simon Hausmann 2008-06-16 05:42:06 PDT
I think the code should not use String::format() but simply toDouble() on a constructed string and construct the entire string to parse manually. String::toDouble() is locale-unaware as far as I can see.
Comment 8 Dirk Schulze 2009-11-18 01:03:28 PST

*** This bug has been marked as a duplicate of bug 30342 ***