Bug 26984 - style properties depend on locale.
Summary: style properties depend on locale.
Status: RESOLVED DUPLICATE of bug 18994
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-05 14:05 PDT by arno.
Modified: 2009-07-06 04:39 PDT (History)
1 user (show)

See Also:


Attachments
testcase (476 bytes, text/html)
2009-07-05 14:07 PDT, arno.
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2009-07-05 14:05:25 PDT
Hi,
style properties (as read with javascript) depend on locale.
For example, following piece of code:

    p.style.width = '100.5px';
    alert(p.style.width);

show 100,5px with  a french locale and 100.5px with an english locale (decimal separator is not the same).
That makes comparaison and parsing of those results nearly impossible in a cross-locale way.
Moreover, as parseFloat is not locale dependant, 

p.style.opacity = 0.5;
parseFloat(p.style.opacity);

shows 0 with a french locale and 0.5 with an english locale.
That's quite disturbing.

Setting to gtk component as I don't known if it happens with other backends.
Comment 1 arno. 2009-07-05 14:07:00 PDT
Created attachment 32282 [details]
testcase
Comment 2 Jan Alonzo 2009-07-06 04:39:22 PDT
(In reply to comment #0)
> Hi,
> style properties (as read with javascript) depend on locale.
> For example, following piece of code:
> 
>     p.style.width = '100.5px';
>     alert(p.style.width);
> 
> show 100,5px with  a french locale and 100.5px with an english locale (decimal
> separator is not the same).
> That makes comparaison and parsing of those results nearly impossible in a
> cross-locale way.
> Moreover, as parseFloat is not locale dependant, 
> 
> p.style.opacity = 0.5;
> parseFloat(p.style.opacity);
> 
> shows 0 with a french locale and 0.5 with an english locale.
> That's quite disturbing.
> 
> Setting to gtk component as I don't known if it happens with other backends.

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