KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
79645
:
"/a" attached to dotted CSS class names
P
roduct
:
konqueror
Co
m
ponent
:
khtml ecma
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
3.2.1
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2004-04-14 18:54
Last Changed:
2004-10-29 20:16:25
Version: 3.2.1 (using KDE KDE 3.2.2) Installed from: SuSE RPMs Compiler: gcc 3.3.1 SuSE OS: Linux <style type="text/css"> .foo { color: black; } </style> <span class="foo">bar</span> Works fine, now the JS code that reveals the bug, alert will output "/a.foo" - with same strange leading "/a". function revealbug() { if (document.styleSheets) { var css = document.styleSheets[1]; if (css.cssRules) //Gecko-DOM var selectors = css.cssRules; else if (css.rules) //msie-DOM var selectors = css.rules; } if (!selectors || selectors == undefined) return; var oSelectors = new Object(); var len = selectors.length; for (var i = 0, j; i < len; i++) { oSelectors[i] = selectors[i]; oSelectors[selectors[i].selectorText] = oSelectors[i]; oSelectors.length = i + 1; // optional } for (var i=0; i<selectors.length; i++) { alert(selectors[i].selectorText); }
Comment
#1
Rob Buis 2004-09-20 19:24:06
Created an attachment (id=7598)
[details]
testcase from above
Comment
#2
Pascal Létourneau 2004-10-29 20:16:25
CVS commit by pletourn: Fix selectorText() when no namespace is specified BUG:79645 M +4 -4 css_base.cpp 1.14.4.1 --- kdelibs/khtml/css/css_base.cpp #1.14:1.14.4.1 @@ -261,15 +261,15 @@ DOMString CSSSelector::selectorText() co DOMString str; const CSSSelector* cs = this; - if ( cs->tag == 0xffff && cs->attr == ATTR_ID && cs->match == CSSSelector::Exact ) + if ( cs->tag == 0xffffffff && cs->attr == ATTR_ID && cs->match == CSSSelector::Exact ) { str = "#"; str += cs->value; } - else if ( cs->tag == 0xffff && cs->attr == ATTR_CLASS && cs->match == CSSSelector::List ) + else if ( cs->tag == 0xffffffff && cs->attr == ATTR_CLASS && cs->match == CSSSelector::List ) { str = "."; str += cs->value; } - else if ( cs->tag == 0xffff && cs->match == CSSSelector::Pseudo ) + else if ( cs->tag == 0xffffffff && cs->match == CSSSelector::Pseudo ) { str = ":"; @@ -278,5 +278,5 @@ DOMString CSSSelector::selectorText() co else { - if ( cs->tag == 0xffff ) + if ( cs->tag == 0xffffffff ) str = "*"; else
P
latform
:
SuSE RPMs
O
S
:
Linux
K
eywords
:
People
Reporter
:
Timo Nentwig
Assigned To
:
Konqueror Developers
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
testcase from above
(886 bytes, text/html)
2004-09-20 19:24
,
Rob Buis
Details
View All
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In