comparison src/styleengine.hh @ 1711:b27cf7eb15b6

fix last commit dw::core::style::Style must always hold the computed values of CSS properties, as those are inherited. The computed value of border-width is 0 if border-style is 'none', so avoid the combination of border-width != 0 and border-style 'none'. Refactor StyleEngine a bit.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Fri, 01 Oct 2010 23:28:13 +0200
parents 9225a90ad7dd
children 92b899247f72
comparison
equal deleted inserted replaced
1710:18f974a1380c 1711:b27cf7eb15b6
33 Doctree *doctree; 33 Doctree *doctree;
34 int importDepth; 34 int importDepth;
35 35
36 dw::core::style::Style *style0 (CssPropertyList *nonCssHints = NULL); 36 dw::core::style::Style *style0 (CssPropertyList *nonCssHints = NULL);
37 dw::core::style::Style *wordStyle0 (CssPropertyList *nonCssHints = NULL); 37 dw::core::style::Style *wordStyle0 (CssPropertyList *nonCssHints = NULL);
38 void preprocessAttrs (dw::core::style::StyleAttrs *attrs);
39 void postprocessAttrs (dw::core::style::StyleAttrs *attrs);
38 void apply (dw::core::style::StyleAttrs *attrs, CssPropertyList *props); 40 void apply (dw::core::style::StyleAttrs *attrs, CssPropertyList *props);
39 bool computeValue (int *dest, CssLength value, 41 bool computeValue (int *dest, CssLength value,
40 dw::core::style::Font *font); 42 dw::core::style::Font *font);
41 bool computeValue (int *dest, CssLength value, 43 bool computeValue (int *dest, CssLength value,
42 dw::core::style::Font *font, int percentageBase); 44 dw::core::style::Font *font, int percentageBase);