comparison src/styleengine.hh @ 659:920e6090d6d6

use output parameter in StyleEngine::computeValue() This way an assignment is avoided in case of an invalid or unsupported value for the given property. E.g. it is not allowed to specify a percentage for border-width.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Tue, 09 Dec 2008 20:09:35 +0100
parents ea961706be66
children 109eaf60aea2
comparison
equal deleted inserted replaced
658:ea961706be66 659:920e6090d6d6
21 CssContext *cssContext; 21 CssContext *cssContext;
22 22
23 dw::core::style::Style *style0 (CssPropertyList *nonCssHints = NULL); 23 dw::core::style::Style *style0 (CssPropertyList *nonCssHints = NULL);
24 dw::core::style::Style *wordStyle0 (CssPropertyList *nonCssHints = NULL); 24 dw::core::style::Style *wordStyle0 (CssPropertyList *nonCssHints = NULL);
25 void apply (dw::core::style::StyleAttrs *attrs, CssPropertyList *props); 25 void apply (dw::core::style::StyleAttrs *attrs, CssPropertyList *props);
26 int computeValue (CssLength value, dw::core::style::Font *font); 26 void computeValue (int *dest, CssLength value, dw::core::style::Font *font);
27 dw::core::style::Length computeLength (CssLength value, dw::core::style::Font *font); 27 void computeValue (int *dest, CssLength value, dw::core::style::Font *font,
28 int percentageBase);
29 void computeLength (dw::core::style::Length *dest, CssLength value, dw::core::style::Font *font);
28 30
29 public: 31 public:
30 StyleEngine (dw::core::Layout *layout); 32 StyleEngine (dw::core::Layout *layout);
31 ~StyleEngine (); 33 ~StyleEngine ();
32 34