Package: libwebkit-1.0-2 Version: 1.1.10-2 Severity: normal File: libwebkit
The CSS properties returned by the style member of a DOM object is localized. If e.g. you have set a height of '1.2em' for an object, comparing the object's height against '1.2em' will fail on some locales (seen in fr_FR) as the property returns '1,2em' (with a comma), the localized version of '1.2em'. In english locales there's of course no problem, but the behaviour is different depending on the locale. I have seen this in both Epiphany-webkit and Midori. How to reproduce? 1) Write a small JavaScript function, like this for example: // reduce/increase height of an element // -> el is an DOM node function toggle_folding(el) { var folded_height = '1.2em'; if (el.style.height == folded_height) { el.style.height = ''; } else { el.style.height = folded_height; } } 2) Use it somewhere, like that: <html> <head> <title>WebKit JS test</title> <script type="text/javascript"> function toggle_folding(el) { var folded_height = '1.2em'; if (el.style.height == folded_height) { el.style.height = ''; } else { el.style.height = folded_height; } } </script> <style type="text/css"> /* just to ensure the visibility of the folding effect */ .foldable { overflow: hidden } </style> </head> <body> <p class="foldable" onclick="toggle_folding(this);"> Click me!<br/> some<br/>text<br/>that<br/>shall<br/>be<br/>folded. </p> </body> </html> The text should be shown/hidden when clicking on it. 3) See that it works properly with Gecko or with WebKit using with an English locale, but fail with WebKit useing a French locale: the text is hidden but, never shown again. To see why, simply show the value of el.style.height, wich is '1,2em' instead of the expected '1.2em'. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (900, 'unstable'), (900, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libwebkit-1.0-2 depends on: ii libatk1.0-0 1.26.0-1 The ATK accessibility toolkit ii libc6 2.9-18 GNU C Library: Shared libraries ii libcairo2 1.8.8-2 The Cairo 2D vector graphics libra ii libenchant1c2a 1.4.2-3.3 a wrapper library for various spel ii libfontconfig1 2.6.0-4 generic font configuration library ii libfreetype6 2.3.9-5 FreeType 2 font engine, shared lib ii libgail18 2.16.4-1 GNOME Accessibility Implementation ii libglib2.0-0 2.20.4-1 The GLib library of C routines ii libgstreamer-plugins-base0. 0.10.23-3 GStreamer libraries from the "base ii libgstreamer0.10-0 0.10.23-2 Core GStreamer libraries and eleme ii libgtk2.0-0 2.16.4-1 The GTK+ graphical user interface ii libicu40 4.0.1-3 International Components for Unico ii libjpeg62 6b-14 The Independent JPEG Group's JPEG ii libpango1.0-0 1.24.3-1 Layout and rendering of internatio ii libpng12-0 1.2.37-1 PNG library - runtime ii libsoup2.4-1 2.26.2-1 an HTTP library implementation in ii libsqlite3-0 3.6.14.2-1 SQLite 3 shared library ii libstdc++6 4.4.0-10 The GNU Standard C++ Library v3 ii libwebkit-1.0-common 1.1.10-2 Web content engine library for Gtk ii libx11-6 2:1.2.1-1 X11 client-side library ii libxml2 2.7.3.dfsg-1 GNOME XML library ii libxslt1.1 1.1.24-2 XSLT processing library - runtime ii libxt6 1:1.0.5-3 X11 toolkit intrinsics library libwebkit-1.0-2 recommends no packages. libwebkit-1.0-2 suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org