summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-10-20 23:29:45 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-10-20 23:29:45 +0000
commit92c42e8bde7b421f92a1164874c45f3a520fb7f5 (patch)
tree81db9c81928ace1f5835dc60cb7da6591d9d99e8
parent21eec067d83ec16d1d275483ad74972246212163 (diff)
downloadlibcss-92c42e8bde7b421f92a1164874c45f3a520fb7f5.tar.gz
libcss-92c42e8bde7b421f92a1164874c45f3a520fb7f5.tar.bz2
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
-rw-r--r--src/stylesheet.h3
1 files changed, 1 insertions, 2 deletions
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;