aboutsummaryrefslogtreecommitdiff
path: root/src/css.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-02-16 00:29:37 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-02-16 00:29:37 +0100
commitfb5cbcc5d4b4528728140783ab9bf4d39484a739 (patch)
tree5cd489d559b29fa9c93f699f052031972f65accc /src/css.cc
parent950e73503f41ab65396271d02e0331b85f302b29 (diff)
css: mark CssStyleSheet::apply() as const
Diffstat (limited to 'src/css.cc')
-rw-r--r--src/css.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/css.cc b/src/css.cc
index 6edf2dbc..f43f9130 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -347,8 +347,8 @@ CssRule::~CssRule () {
props->unref ();
}
-void CssRule::apply (CssPropertyList *props,
- Doctree *docTree, const DoctreeNode *node, MatchCache *matchCache) {
+void CssRule::apply (CssPropertyList *props, Doctree *docTree,
+ const DoctreeNode *node, MatchCache *matchCache) const {
if (selector->match (docTree, node, matchCache))
this->props->apply (props);
}
@@ -429,9 +429,9 @@ void CssStyleSheet::addRule (CssRule *rule) {
* match at the given node in the document tree.
*/
void CssStyleSheet::apply (CssPropertyList *props, Doctree *docTree,
- const DoctreeNode *node, MatchCache *matchCache) {
+ const DoctreeNode *node, MatchCache *matchCache) const {
static const int maxLists = 32;
- RuleList *ruleList[maxLists];
+ const RuleList *ruleList[maxLists];
int numLists = 0, index[maxLists] = {0};
if (node->id) {
@@ -475,7 +475,7 @@ void CssStyleSheet::apply (CssPropertyList *props, Doctree *docTree,
int minSpecIndex = -1;
for (int i = 0; i < numLists; i++) {
- RuleList *rl = ruleList[i];
+ const RuleList *rl = ruleList[i];
if (rl && rl->size () > index[i] &&
(rl->get(index[i])->specificity () < minSpec ||