[Bug 659478] Re: Firefox javascript cssText selector list gets reordered
Lorem Daijoh
659478 at bugs.launchpad.net
Tue Oct 12 20:24:39 UTC 2010
If someone could tell me how to format the description... Meanwhile you
can read this:
** Description changed:
Binary package hint: firefox
I was trying to do a little javascript script to modify CSS, when I
bumped into this little problem/bug:
document.styleSheets[i].cssRules[j].cssText
The above attribute seems to give reordered selector list if the
selectors are not delimetered with whitespaces.
+ </br>
Example 1 (selectors delimetered with whitespaces):
In CSS file: .someClass #someID { color:red; }
Above code outputs: .someClass #someID { color:red; }
Example 2 (no whitespaces):
In CSS file: .someClass#someID { color:red; }
Above code outputs: #someID.someClass { color:red; }
In Example 2 the someClass and the someID have changed order. This probably should not happen.
Here is a another example to give some sense of pattern:
Example 3:
In CSS file:
.class1:hover.class2#id1#id2:hover.class3#id3 { color:red; }
Above code outputs: #id1#id2#id3.class1.class2.class3:hover:hover {
color:red; }
As can be seen, the hover pseudo classes are completely borked. So I
guess this is a bug.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: firefox 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
ProcVersionSignature: Ubuntu 2.6.32-24.43-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Tue Oct 12 22:57:15 2010
FirefoxPackages:
firefox 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
firefox-gnome-support 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
firefox-branding 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
abroswer N/A
abrowser-branding N/A
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=en
PATH=(custom, user)
LANG=en_GB.utf8
SHELL=/bin/bash
SourcePackage: firefox
** Description changed:
Binary package hint: firefox
I was trying to do a little javascript script to modify CSS, when I
bumped into this little problem/bug:
document.styleSheets[i].cssRules[j].cssText
The above attribute seems to give reordered selector list if the
selectors are not delimetered with whitespaces.
+ </br>
+ </br>
</br>
Example 1 (selectors delimetered with whitespaces):
In CSS file: .someClass #someID { color:red; }
Above code outputs: .someClass #someID { color:red; }
Example 2 (no whitespaces):
In CSS file: .someClass#someID { color:red; }
Above code outputs: #someID.someClass { color:red; }
In Example 2 the someClass and the someID have changed order. This probably should not happen.
Here is a another example to give some sense of pattern:
Example 3:
In CSS file:
.class1:hover.class2#id1#id2:hover.class3#id3 { color:red; }
Above code outputs: #id1#id2#id3.class1.class2.class3:hover:hover {
color:red; }
As can be seen, the hover pseudo classes are completely borked. So I
guess this is a bug.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: firefox 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
ProcVersionSignature: Ubuntu 2.6.32-24.43-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Tue Oct 12 22:57:15 2010
FirefoxPackages:
firefox 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
firefox-gnome-support 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
firefox-branding 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
abroswer N/A
abrowser-branding N/A
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=en
PATH=(custom, user)
LANG=en_GB.utf8
SHELL=/bin/bash
SourcePackage: firefox
** Description changed:
Binary package hint: firefox
I was trying to do a little javascript script to modify CSS, when I
bumped into this little problem/bug:
document.styleSheets[i].cssRules[j].cssText
The above attribute seems to give reordered selector list if the
selectors are not delimetered with whitespaces.
- </br>
- </br>
- </br>
Example 1 (selectors delimetered with whitespaces):
In CSS file: .someClass #someID { color:red; }
Above code outputs: .someClass #someID { color:red; }
Example 2 (no whitespaces):
In CSS file: .someClass#someID { color:red; }
Above code outputs: #someID.someClass { color:red; }
In Example 2 the someClass and the someID have changed order. This probably should not happen.
Here is a another example to give some sense of pattern:
Example 3:
In CSS file:
.class1:hover.class2#id1#id2:hover.class3#id3 { color:red; }
Above code outputs: #id1#id2#id3.class1.class2.class3:hover:hover {
color:red; }
As can be seen, the hover pseudo classes are completely borked. So I
guess this is a bug.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: firefox 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
ProcVersionSignature: Ubuntu 2.6.32-24.43-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Tue Oct 12 22:57:15 2010
FirefoxPackages:
firefox 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
firefox-gnome-support 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
firefox-branding 3.6.10+build1+nobinonly-0ubuntu0.10.04.1
abroswer N/A
abrowser-branding N/A
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=en
PATH=(custom, user)
LANG=en_GB.utf8
SHELL=/bin/bash
SourcePackage: firefox
** Attachment added: "slightly_more_readable_description"
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/659478/+attachment/1689453/+files/slightly_more_readable_description
--
Firefox javascript cssText selector list gets reordered
https://bugs.launchpad.net/bugs/659478
You received this bug notification because you are a member of Mozilla
Bugs, which is subscribed to firefox in ubuntu.
More information about the Ubuntu-mozillateam-bugs
mailing list