diff options
author | Sebastian Geerken <devnull@localhost> | 2014-09-15 13:45:37 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-09-15 13:45:37 +0200 |
commit | a4d92f6ec2a1bf92c1f0bc408a7060a774bd027d (patch) | |
tree | d573fadd93d460bb3c40fcc88931ac88b637b65a /dw | |
parent | 0941ffb6ccfe4f44ff5add68dbb57626c8b18666 (diff) |
Extended CSS parser and dw::core::Style by 'z-index'.
Diffstat (limited to 'dw')
-rw-r--r-- | dw/style.cc | 4 | ||||
-rw-r--r-- | dw/style.hh | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/dw/style.cc b/dw/style.cc index d548d209..1c2978b4 100644 --- a/dw/style.cc +++ b/dw/style.cc @@ -92,6 +92,7 @@ void StyleAttrs::initValues () display = DISPLAY_INLINE; whiteSpace = WHITE_SPACE_NORMAL; cursor = CURSOR_DEFAULT; + zIndex = Z_INDEX_AUTO; } /** @@ -200,6 +201,7 @@ bool StyleAttrs::equals (object::Object *other) { listStylePosition == otherAttrs->listStylePosition && listStyleType == otherAttrs->listStyleType && cursor == otherAttrs->cursor && + zIndex == otherAttrs->zIndex && x_link == otherAttrs->x_link && x_lang[0] == otherAttrs->x_lang[0] && x_lang[1] == otherAttrs->x_lang[1] && @@ -256,6 +258,7 @@ int StyleAttrs::hashValue () { listStylePosition + listStyleType + cursor + + zIndex + x_link + x_lang[0] + x_lang[1] + x_img + @@ -376,6 +379,7 @@ void Style::copyAttrs (StyleAttrs *attrs) listStylePosition = attrs->listStylePosition; listStyleType = attrs->listStyleType; cursor = attrs->cursor; + zIndex = attrs->zIndex; x_link = attrs->x_link; x_lang[0] = attrs->x_lang[0]; x_lang[1] = attrs->x_lang[1]; diff --git a/dw/style.hh b/dw/style.hh index bda567ce..9c6bedf1 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -7,6 +7,8 @@ # error Do not include this file directly, use "core.hh" instead. #endif +#include <limits.h> + #include "../lout/signal.hh" #include "../lout/debug.hh" @@ -367,6 +369,17 @@ enum ClearType { CLEAR_NONE }; +enum { + /** + * \brief 'z-index' is stored as int; use this for the value 'auto'. + * + * Only some random value, which has to be checked explicitly; do + * not compare this (less or greater) to integer values of + * 'z-index'. + */ + Z_INDEX_AUTO = INT_MAX +}; + /** * \brief Type for representing all lengths within dw::core::style. * @@ -544,6 +557,7 @@ public: ListStylePosition listStylePosition; ListStyleType listStyleType; Cursor cursor; + int zIndex; int x_link; int x_img; |