aboutsummaryrefslogtreecommitdiff
path: root/src/css.hh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-10-29 16:44:28 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-10-29 16:44:28 +0100
commitb8df95008c6a2e36aaac09f761e4c64a3520ac45 (patch)
treeb61ac3242a1170dc6ffdfe855d59e1369b22a929 /src/css.hh
parent5fb38f8dd5c9b2203fe6d4323f7b10d7385e582c (diff)
implement various apply() methods
Diffstat (limited to 'src/css.hh')
-rw-r--r--src/css.hh32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/css.hh b/src/css.hh
index b59307ae..36067a3e 100644
--- a/src/css.hh
+++ b/src/css.hh
@@ -152,43 +152,33 @@ class CssRule {
};
~CssRule ();
- void apply (dw::core::style::StyleAttrs *styleAttr);
+ void apply (dw::core::style::StyleAttrs *styleAttrs, Doctree *docTree);
};
class CssStyleSheet : public lout::misc::SimpleVector <CssRule*> {
public:
CssStyleSheet() : lout::misc::SimpleVector <CssRule*> (1) {};
- void apply (dw::core::style::StyleAttrs *styleAttr);
+ void apply (dw::core::style::StyleAttrs *styleAttrs, Doctree *docTree);
};
-typedef enum {
- CSS_PRIMARY_USER_IMPORTANT,
- CSS_PRIMARY_AUTHOR_IMPORTANT,
- CSS_PRIMARY_AUTHOR,
- CSS_PRIMARY_USER,
- CSS_PRIMARY_USER_AGENT
-} CssPrimaryOrder;
-
class CssContext {
public:
typedef enum {
- USER_IMPORTANT,
- AUTHOR_IMPORTANT,
- AUTHOR,
+ USER_AGENT,
USER,
- USER_AGENT
+ AUTHOR,
+ AUTHOR_IMPORTANT,
+ USER_IMPORTANT
} PrimaryOrder;
private:
- CssStyleSheet sheet[USER_AGENT + 1];
+ CssStyleSheet sheet[USER_IMPORTANT + 1];
public:
- void addRule (CssRule *rule, PrimaryOrder order) {
- sheet[order].increase ();
- sheet[order].set (sheet[order].size () - 1, rule);
- };
-
- void apply (dw::core::style::StyleAttrs *styleAttr);
+ void addRule (CssRule *rule, PrimaryOrder order);
+ void apply (dw::core::style::StyleAttrs *styleAttrs,
+ Doctree *docTree,
+ CssPropertyList *tagStyle, CssPropertyList *nonCss);
};
#endif