diff src/styleengine.hh @ 1742:6ff5d5aeb9a5

inline setNonCssHint()
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 14 Oct 2010 09:04:52 +0200
parents 7974b38cc036
children ef983c0fe908
line wrap: on
line diff
--- a/src/styleengine.hh	Wed Oct 13 10:33:38 2010 +0200
+++ b/src/styleengine.hh	Thu Oct 14 09:04:52 2010 +0200
@@ -36,8 +36,14 @@
 
       dw::core::style::Style *style0 (int i);
       dw::core::style::Style *wordStyle0 ();
-      void setNonCssHint(CssPropertyName name, CssValueType type,
-                         CssPropertyValue value);
+      inline void setNonCssHint(CssPropertyName name, CssValueType type,
+                                CssPropertyValue value) {
+         Node *n = stack->getRef (stack->size () - 1);
+
+         if (!n->nonCssProperties)
+            n->nonCssProperties = new CssPropertyList (true);
+         n->nonCssProperties->set(name, type, value); 
+      }
       void preprocessAttrs (dw::core::style::StyleAttrs *attrs);
       void postprocessAttrs (dw::core::style::StyleAttrs *attrs);
       void apply (int i, dw::core::style::StyleAttrs *attrs, CssPropertyList *props);
@@ -65,14 +71,14 @@
       void endElement (int tag);
       void setPseudoLink ();
       void setPseudoVisited ();
-      void setNonCssHint(CssPropertyName name, CssValueType type,
-                         int value) {
+      inline void setNonCssHint(CssPropertyName name, CssValueType type,
+                                int value) {
          CssPropertyValue v;
          v.intVal = value;
          setNonCssHint (name, type, v);
       }
-      void setNonCssHint(CssPropertyName name, CssValueType type,
-                         const char *value) {
+      inline void setNonCssHint(CssPropertyName name, CssValueType type,
+                                const char *value) {
          CssPropertyValue v;
          v.strVal = dStrdup(value);
          setNonCssHint (name, type, v);