From 92c42e8bde7b421f92a1164874c45f3a520fb7f5 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 20 Oct 2008 23:29:45 +0000 Subject: Style information for selector rulesets can be shared between the individual selectors in the ruleset. Therefore, hang it off the css_rule object, rather than having a separate copy for every selector in the ruleset. Selectors know which css_rule they belong to so can easily find the applicable style information. svn path=/trunk/libcss/; revision=5609 --- src/stylesheet.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/stylesheet.h') diff --git a/src/stylesheet.h b/src/stylesheet.h index eaab9c3..6c014e5 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -56,8 +56,6 @@ struct css_selector { css_rule *rule; /**< Owning rule */ - css_style *style; /**< Applicable style */ - css_selector *next; /**< Next selector in list */ css_selector *prev; /**< Previous selector */ }; @@ -79,6 +77,7 @@ struct css_rule { struct { uint32_t selector_count; css_selector **selectors; + css_style *style; } selector; struct { uint32_t media; -- cgit v1.2.3