[patch] cssRules / ID selectors
Paul Temple
paul.temple at gmx.net
Sun Feb 13 02:41:22 GMT 2005
Here's my latest patch.
I also attached a html file so you can easily test
CSSSelector::selectorText() with any selector.
For now I don't explain what I did and why, as I assume
there are some people in this list knowing that piece of code
more than I do (even after these many, many hours of working with
it... many more hours than I thought were necessary to fix this
"small" bug). If there are questions, that are not answered by my
test results or csstest.html, I'll of course answer them... :)
These are the styles that I tested:
.aaa { color:red; }
body { color:red; }
div:focus { color:red; }
span body p div { color:red; }
.bbb:hover { color:red; }
input[type="button"] { color:red; }
#eee { color:red; }
[id="fff"] { color:red; }
span.xxx { color:red; }
#ggg:active { color:red; }
table#vvv { color:red; }
img#uuu:link { color:red; }
p.special:hover { color:red; }
span > p { color:red; }
span + p { color:red; }
span:lang(de) { color:red; }
span[class] { color:red; }
span[class="warning"] { color:red; }
span[class~="warning"] { color:red; }
span[lang|="en"] { color:red; }
These are the test results _without_ my patch (I also added
kdDebug()
to CSSStyleRule::selectorText() ):
testkhtml: .aaa
testkhtml: body
testkhtml: div:focus
testkhtml: span body p div
testkhtml: .bbb/a:hover
testkhtml: input[type="button"]
khtml (css): WARNING: Unhandled case in
CSSStyleRuleImpl::selectorText : match=1
testkhtml: *[id"eee"]
testkhtml: #fff
testkhtml: span.xxx[class~="xxx"]
khtml (css): WARNING: Unhandled case in
CSSStyleRuleImpl::selectorText : match=1
testkhtml: *[id"ggg"]/a:active
khtml (css): WARNING: Unhandled case in
CSSStyleRuleImpl::selectorText : match=1
testkhtml: table[id"vvv"]
khtml (css): WARNING: Unhandled case in
CSSStyleRuleImpl::selectorText : match=1
testkhtml: img[id"uuu"]/a:link
testkhtml: p.special[class~="special"]/a:hover
testkhtml: span > p
testkhtml: span + p
testkhtml: span:lang(
testkhtml: span[class ""]
testkhtml: span[class="warning"]
testkhtml: span.warning[class~="warning"]
testkhtml: span[lang|="en"]
And these are the result with my patch applied:
testkhtml: .aaa
testkhtml: body
testkhtml: div:focus
testkhtml: span body p div
testkhtml: .bbb:hover
testkhtml: input[type="button"]
testkhtml: #eee
testkhtml: *[id="fff"]
testkhtml: span.xxx
testkhtml: #ggg:active
testkhtml: table#vvv
testkhtml: img#uuu:link
testkhtml: p.special:hover
testkhtml: span > p
testkhtml: span + p
testkhtml: span:lang(
testkhtml: span[class ""]
testkhtml: span[class="warning"]
testkhtml: span.warning
testkhtml: span[lang|="en"]
As you can see these selectors still don't work
span:lang(de) { color:red; }
span[class] { color:red; }
span[class~="warning"] { color:red; }
but they don't work or are even worse without my patch (and for
now I don't want to put more time into selectorText() so I leaves
these cases open).
Cheers,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050213/e1110d3b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: css_base.patch
Type: text/x-diff
Size: 1406 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050213/e1110d3b/attachment.patch>
More information about the kfm-devel
mailing list