aboutsummaryrefslogtreecommitdiff
path: root/src/cssparser.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-20 17:50:40 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-20 17:50:40 +0100
commit86d65438a060f01c10cd62da0b3002471b189e9c (patch)
tree487957f601fc44d8626cfacfabea601a0b5ce177 /src/cssparser.cc
parentbbb275b421b4f66e83832b7743e610564fa8e429 (diff)
drop CssRules that have more than one pseudo class set
Currently dillo only supports :link and :visited. Simple selectors with more than one pseudo class will never match. Therefore we drop the whole rule in this case. This fixes link color on http://www.fltk.org
Diffstat (limited to 'src/cssparser.cc')
-rw-r--r--src/cssparser.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 066a282d..ca487b48 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -1004,6 +1004,13 @@ static bool Css_parse_simple_selector(CssParser * parser,
break;
case ':':
pp = &selector->pseudo;
+ if (*pp)
+ // pseudo class has been set already.
+ // As dillo currently only supports :link and :visisted, a
+ // selector with more than one pseudo class will never match.
+ // By returning false, the whole CssRule will be dropped.
+ // \todo adapt this when supporting :hover, :active...
+ return false;
break;
}
}