dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

css.hh
Go to the documentation of this file.
1 #ifndef __CSS_HH__
2 #define __CSS_HH__
3 
4 #include "dw/core.hh"
5 #include "doctree.hh"
6 
7 /* Origin and weight. Used only internally.*/
8 typedef enum {
16 
17 typedef enum {
21 } CssOrigin;
22 
23 typedef enum {
24  CSS_TYPE_INTEGER, /* This type is only used internally, for x-*
25  properties. */
26  CSS_TYPE_ENUM, /* Value is i, if represented by
27  enum_symbols[i]. */
28  CSS_TYPE_MULTI_ENUM, /* For all enum_symbols[i], 1 << i are
29  combined. */
30  CSS_TYPE_LENGTH_PERCENTAGE, /* <length> or <percentage>. Represented by
31  CssLength. */
32  CSS_TYPE_LENGTH, /* <length>, represented as CssLength.
33  Note: In some cases, CSS_TYPE_LENGTH is used
34  instead of CSS_TYPE_LENGTH_PERCENTAGE,
35  only because Dw cannot handle percentages
36  in this particular case (e.g.
37  'margin-*-width'). */
38  CSS_TYPE_SIGNED_LENGTH, /* As CSS_TYPE_LENGTH but may be negative. */
39  CSS_TYPE_LENGTH_PERCENTAGE_NUMBER, /* <length> or <percentage>, or <number> */
40  CSS_TYPE_AUTO, /* Represented as CssLength of type
41  CSS_LENGTH_TYPE_AUTO */
42  CSS_TYPE_COLOR, /* Represented as integer. */
43  CSS_TYPE_FONT_WEIGHT, /* this very special and only used by
44  'font-weight' */
45  CSS_TYPE_STRING, /* <string> */
46  CSS_TYPE_SYMBOL, /* Symbols, which are directly copied (as
47  opposed to CSS_TYPE_ENUM and
48  CSS_TYPE_MULTI_ENUM). Used for
49  'font-family'. */
50  CSS_TYPE_URI, /* <uri> */
52  CSS_TYPE_UNUSED /* Not yet used. Will itself get unused some
53  day. */
54 } CssValueType;
55 
56 /*
57  * Lengths are represented as int in the following way:
58  *
59  * | <------ integer value ------> |
60  *
61  * +---+ - - - +---+---+- - - - - -+---+---+---+---+
62  * | integer part | type |
63  * +---+ - - - +---+---+- - - - - -+---+---+---+---+
64  * | integer part | decimal fraction | type |
65  * +---+ - - - +---+---+- - - - - -+---+---+---+---+
66  * n-1 15 14 3 2 1 0
67  *
68  * | <------ fixed point value ------> |
69  *
70  * where type is one of the CSS_LENGTH_TYPE_* values.
71  * CSS_LENGTH_TYPE_PX values are stored as
72  * 29 bit signed integer, all other types as fixed point values.
73  */
74 
75 typedef int CssLength;
76 
77 typedef enum {
80  CSS_LENGTH_TYPE_MM, /* "cm", "in", "pt" and "pc" are converted into
81  millimeters. */
85  CSS_LENGTH_TYPE_RELATIVE, /* This does not exist in CSS but
86  is used in HTML */
87  CSS_LENGTH_TYPE_AUTO /* This can be used as a simple value. */
89 
91  static const int CSS_LENGTH_FRAC_MAX = (1 << (32 - 15 - 1)) - 1;
92  static const int CSS_LENGTH_INT_MAX = (1 << (32 - 4)) - 1;
93  int iv;
94 
95  switch (t) {
96  case CSS_LENGTH_TYPE_PX:
97  iv = lout::misc::roundInt(v);
98  if (iv > CSS_LENGTH_INT_MAX)
99  iv = CSS_LENGTH_INT_MAX;
100  else if (iv < -CSS_LENGTH_INT_MAX)
101  iv = -CSS_LENGTH_INT_MAX;
102  return iv << 3 | t;
104  case CSS_LENGTH_TYPE_MM:
105  case CSS_LENGTH_TYPE_EM:
106  case CSS_LENGTH_TYPE_EX:
109  if (v > CSS_LENGTH_FRAC_MAX)
110  v = CSS_LENGTH_FRAC_MAX;
111  else if (v < -CSS_LENGTH_FRAC_MAX)
112  v = -CSS_LENGTH_FRAC_MAX;
113  return ((int) (v * (1 << 15)) & ~7 ) | t;
115  return t;
116  default:
117  assert(false);
118  return CSS_LENGTH_TYPE_AUTO;
119  }
120 }
121 
123  return (CssLengthType) (l & 7);
124 }
125 
126 inline float CSS_LENGTH_VALUE (CssLength l) {
127  switch (CSS_LENGTH_TYPE(l)) {
128  case CSS_LENGTH_TYPE_PX:
129  return (float) (l >> 3);
131  case CSS_LENGTH_TYPE_MM:
132  case CSS_LENGTH_TYPE_EM:
133  case CSS_LENGTH_TYPE_EX:
136  return ((float)(l & ~7)) / (1 << 15);
138  return 0.0;
139  default:
140  assert(false);
141  return 0.0;
142  }
143 }
144 
145 typedef enum {
146  CSS_PROPERTY_END = -1, // used as terminator in CssShorthandInfo
236 
237 typedef struct {
238  int32_t posX;
239  int32_t posY;
241 
242 typedef union {
243  int32_t intVal;
244  char *strVal;
247 
248 typedef enum {
253 
254 typedef enum {
261 
262 typedef enum {
273 
274 typedef enum {
277 
278 typedef enum {
281 
282 
286 class CssProperty {
287  public:
288 
289  short name;
290  short type;
292 
293  inline void free () {
294  switch (type) {
295  case CSS_TYPE_STRING:
296  case CSS_TYPE_SYMBOL:
297  case CSS_TYPE_URI:
298  dFree (value.strVal);
299  break;
301  dFree (value.posVal);
302  default:
303  break;
304  }
305  }
306  void print ();
307 };
308 
312 class CssPropertyList : public lout::misc::SimpleVector <CssProperty> {
313  int refCount;
315  bool safe;
316 
317  public:
318  inline CssPropertyList(bool ownerOfStrings = false) :
319  lout::misc::SimpleVector <CssProperty> (1) {
320  refCount = 0;
321  safe = true;
322  this->ownerOfStrings = ownerOfStrings;
323  };
324  CssPropertyList(const CssPropertyList &p, bool deep = false);
325  ~CssPropertyList ();
326 
327  void set (CssPropertyName name, CssValueType type,
328  CssPropertyValue value);
329  void apply (CssPropertyList *props);
330  bool isSafe () { return safe; };
331  void print ();
332  inline void ref () { refCount++; }
333  inline void unref () { if (--refCount == 0) delete this; }
334 };
335 
337  private:
338  int element;
339  char *pseudo, *id;
341 
342  public:
343  enum {
346  };
347 
348  typedef enum {
353  } SelectType;
354 
357  inline void setElement (int e) { element = e; };
358  void setSelect (SelectType t, const char *v);
360  inline const char *getPseudoClass () { return pseudo; };
361  inline const char *getId () { return id; };
362  inline int getElement () { return element; };
363  bool match (const DoctreeNode *node);
364  int specificity ();
365  void print ();
366 };
367 
368 class MatchCache : public lout::misc::SimpleVector <int> {
369  public:
370  MatchCache() : lout::misc::SimpleVector <int> (0) {};
371 };
372 
378 class CssSelector {
379  public:
380  typedef enum {
385  } Combinator;
386 
387  private:
391  };
392 
395 
396  bool match (Doctree *dt, const DoctreeNode *node, int i, Combinator comb,
397  MatchCache *matchCache);
398 
399  public:
400  CssSelector ();
401  ~CssSelector ();
402  void addSimpleSelector (Combinator c);
403  inline CssSimpleSelector *top () {
404  return selectorList.getRef (selectorList.size () - 1)->selector;
405  }
406  inline int size () { return selectorList.size (); };
407  inline bool match (Doctree *dt, const DoctreeNode *node,
408  MatchCache *matchCache) {
409  return match (dt, node, selectorList.size () - 1, COMB_NONE,
410  matchCache);
411  }
412  inline void setMatchCacheOffset (int mo) {
413  if (matchCacheOffset == -1)
414  matchCacheOffset = mo;
415  }
416  inline int getRequiredMatchCache () {
417  return matchCacheOffset + size ();
418  }
419  int specificity ();
420  bool checksPseudoClass ();
421  void print ();
422  inline void ref () { refCount++; }
423  inline void unref () { if (--refCount == 0) delete this; }
424 };
425 
431 class CssRule {
432  private:
434  int spec, pos;
435 
436  public:
438 
440  ~CssRule ();
441 
442  void apply (CssPropertyList *props, Doctree *docTree,
443  const DoctreeNode *node, MatchCache *matchCache) const;
444  inline bool isSafe () {
445  return !selector->checksPseudoClass () || props->isSafe ();
446  };
447  inline int specificity () { return spec; };
448  inline int position () { return pos; };
449  void print ();
450 };
451 
458  private:
459  class RuleList : public lout::misc::SimpleVector <CssRule*>,
460  public lout::object::Object {
461  public:
462  RuleList () : lout::misc::SimpleVector <CssRule*> (1) {};
464  for (int i = 0; i < size (); i++)
465  delete get (i);
466  };
467 
468  void insert (CssRule *rule);
469  inline bool equals (lout::object::Object *other) {
470  return this == other;
471  };
472  inline int hashValue () { return (intptr_t) this; };
473  };
474 
476  <lout::object::ConstString, RuleList > {
477  public:
478  RuleMap () : lout::container::typed::HashTable
479  <lout::object::ConstString, RuleList > (true, true, 256) {};
480  };
481 
482  static const int ntags = 90 + 14; // \todo don't hardcode
483  /* 90 is the full number of html4 elements, including those which we have
484  * implemented. From html5, let's add: article, header, footer, mark,
485  * nav, section, aside, figure, figcaption, wbr, audio, video, source,
486  * embed.
487  */
488 
492 
493  public:
495  void addRule (CssRule *rule);
496  void apply (CssPropertyList *props, Doctree *docTree,
497  const DoctreeNode *node, MatchCache *matchCache) const;
499 };
500 
504 class CssContext {
505  private:
509  int pos;
510 
511  public:
512  CssContext ();
513 
514  void addRule (CssSelector *sel, CssPropertyList *props,
515  CssPrimaryOrder order);
516  void apply (CssPropertyList *props,
517  Doctree *docTree, DoctreeNode *node,
518  CssPropertyList *tagStyle, CssPropertyList *tagStyleImportant,
519  CssPropertyList *nonCssHints);
520 };
521 
522 #endif
CssSelector::specificity
int specificity()
Return the specificity of the selector.
Definition: css.cc:197
Doctree
HTML document tree interface.
Definition: doctree.hh:48
CssStyleSheet::RuleList::insert
void insert(CssRule *rule)
Definition: css.cc:354
CssRule
A CssSelector CssPropertyList pair.
Definition: css.hh:431
CssSimpleSelector::ELEMENT_NONE
Definition: css.hh:344
CSS_LENGTH_TYPE_PX
Definition: css.hh:79
CSS_PROPERTY_FONT_SIZE
Definition: css.hh:180
CssSimpleSelector::SELECT_CLASS
Definition: css.hh:350
CssRule::~CssRule
~CssRule()
Definition: css.cc:331
CSS_CREATE_LENGTH
CssLength CSS_CREATE_LENGTH(float v, CssLengthType t)
Definition: css.hh:90
CSS_PROPERTY_BORDER_LEFT_COLOR
Definition: css.hh:156
CssSelector::getRequiredMatchCache
int getRequiredMatchCache()
Definition: css.hh:416
CSS_FONT_SIZE_SMALLER
Definition: css.hh:267
CSS_FONT_SIZE_XX_SMALL
Definition: css.hh:269
CssSelector::matchCacheOffset
int matchCacheOffset
Definition: css.hh:393
CSS_PROPERTY_CLIP
Definition: css.hh:169
CssStyleSheet::RuleMap
Definition: css.hh:475
CssRule::spec
int spec
Definition: css.hh:434
CSS_PRIMARY_LAST
Definition: css.hh:14
CssProperty
This class holds a CSS property and value pair.
Definition: css.hh:286
CSS_PROPERTY_BACKGROUND_COLOR
Definition: css.hh:148
CSS_PROPERTY_BORDER_RIGHT_WIDTH
Definition: css.hh:161
CssBackgroundPosition::posY
int32_t posY
Definition: css.hh:239
CSS_BORDER_WIDTH_THICK
Definition: css.hh:251
lout::misc::SimpleVector< CssRule * >::get
CssRule * get(int i) const
Return the one element, explicitly.
Definition: misc.hh:177
CSS_TYPE_ENUM
Definition: css.hh:26
CssSimpleSelector::getElement
int getElement()
Definition: css.hh:362
CssSimpleSelector::element
int element
Definition: css.hh:338
PROPERTY_X_IMG
Definition: css.hh:232
CSS_PROPERTY_BORDER_RIGHT_STYLE
Definition: css.hh:160
CSS_FONT_WEIGHT_LIGHTER
Definition: css.hh:258
CssContext::matchCache
MatchCache matchCache
Definition: css.hh:508
CSS_PROPERTY_X_LINK
Definition: css.hh:227
CSS_PROPERTY_CLEAR
Definition: css.hh:168
CSS_PROPERTY_TEXT_TRANSFORM
Definition: css.hh:218
CssLetterSpacingExtensions
CssLetterSpacingExtensions
Definition: css.hh:274
CSS_PROPERTY_LIST_STYLE_IMAGE
Definition: css.hh:190
CSS_PROPERTY_BACKGROUND_REPEAT
Definition: css.hh:151
CSS_PROPERTY_MAX_WIDTH
Definition: css.hh:200
CssSimpleSelector::getPseudoClass
const char * getPseudoClass()
Definition: css.hh:360
CssSimpleSelector::setElement
void setElement(int e)
Definition: css.hh:357
CssSimpleSelector::print
void print()
Definition: css.cc:312
CssContext::CssContext
CssContext()
Definition: css.cc:489
CssProperty::name
short name
Definition: css.hh:289
CSS_PROPERTY_TEXT_INDENT
Definition: css.hh:216
CssSelector::match
bool match(Doctree *dt, const DoctreeNode *node, int i, Combinator comb, MatchCache *matchCache)
Return whether selector matches at a given node in the document tree.
Definition: css.cc:127
PROPERTY_X_LINK
Definition: css.hh:230
CSS_PROPERTY_FONT_SIZE_ADJUST
Definition: css.hh:181
CSS_PROPERTY_OUTLINE_STYLE
Definition: css.hh:204
CssRule::isSafe
bool isSafe()
Definition: css.hh:444
CSS_LETTER_SPACING_NORMAL
Definition: css.hh:275
CssProperty::free
void free()
Definition: css.hh:293
dFree
void dFree(void *mem)
Definition: dlib.c:66
CSS_PRIMARY_USER
Definition: css.hh:10
CssSimpleSelector::SELECT_NONE
Definition: css.hh:349
CssProperty::type
short type
Definition: css.hh:290
CSS_FONT_SIZE_LARGER
Definition: css.hh:264
CssSimpleSelector::getClass
lout::misc::SimpleVector< char * > * getClass()
Definition: css.hh:359
CSS_FONT_WEIGHT_BOLDER
Definition: css.hh:256
CssRule::apply
void apply(CssPropertyList *props, Doctree *docTree, const DoctreeNode *node, MatchCache *matchCache) const
Definition: css.cc:336
CSS_PROPERTY_DISPLAY
Definition: css.hh:176
CSS_WORD_SPACING_NORMAL
Definition: css.hh:279
CSS_PROPERTY_TEXT_SHADOW
Definition: css.hh:217
CssStyleSheet::idTable
RuleMap idTable
Definition: css.hh:490
CSS_PROPERTY_BACKGROUND_ATTACHMENT
Definition: css.hh:147
MatchCache
Definition: css.hh:368
CssPropertyList::isSafe
bool isSafe()
Definition: css.hh:330
CSS_PROPERTY_MARGIN_RIGHT
Definition: css.hh:195
CSS_TYPE_BACKGROUND_POSITION
Definition: css.hh:51
CSS_FONT_SIZE_MEDIUM
Definition: css.hh:265
CSS_PROPERTY_MARKS
Definition: css.hh:198
DoctreeNode
Definition: doctree.hh:6
CssRule::pos
int pos
Definition: css.hh:434
CSS_FONT_SIZE_X_SMALL
Definition: css.hh:271
CSS_TYPE_COLOR
Definition: css.hh:42
CssFontWeightExtensions
CssFontWeightExtensions
Definition: css.hh:254
CssSelector::CombinatorAndSelector
Definition: css.hh:388
CSS_PRIMARY_AUTHOR_IMPORTANT
Definition: css.hh:12
CssRule::print
void print()
Definition: css.cc:342
CSS_PROPERTY_COUNTER_RESET
Definition: css.hh:173
CssSelector::setMatchCacheOffset
void setMatchCacheOffset(int mo)
Definition: css.hh:412
CssPropertyList::apply
void apply(CssPropertyList *props)
Merge properties into argument property list.
Definition: css.cc:87
CSS_PROPERTY_BOTTOM
Definition: css.hh:166
CssSelector::selectorList
lout::misc::SimpleVector< struct CombinatorAndSelector > selectorList
Definition: css.hh:394
CSS_TYPE_SYMBOL
Definition: css.hh:46
CSS_PROPERTY_MARKER_OFFSET
Definition: css.hh:197
CssPrimaryOrder
CssPrimaryOrder
Definition: css.hh:8
CssSimpleSelector::SELECT_ID
Definition: css.hh:352
CSS_TYPE_UNUSED
Definition: css.hh:52
CSS_PROPERTY_BORDER_BOTTOM_COLOR
Definition: css.hh:152
CSS_PROPERTY_LIST_STYLE_POSITION
Definition: css.hh:191
CssSimpleSelector::id
char * id
Definition: css.hh:339
CssWordSpacingExtensions
CssWordSpacingExtensions
Definition: css.hh:278
MatchCache::MatchCache
MatchCache()
Definition: css.hh:370
CSS_PROPERTY_FONT_WEIGHT
Definition: css.hh:185
CssSelector::Combinator
Combinator
Definition: css.hh:380
CssContext::apply
void apply(CssPropertyList *props, Doctree *docTree, DoctreeNode *node, CssPropertyList *tagStyle, CssPropertyList *tagStyleImportant, CssPropertyList *nonCssHints)
Apply a CSS context to a property list.
Definition: css.cc:503
CSS_PROPERTY_LEFT
Definition: css.hh:187
CSS_PROPERTY_BORDER_TOP_WIDTH
Definition: css.hh:165
lout::misc::SimpleVector< CssRule * >::size
int size() const
Return the number of elements put into this vector.
Definition: misc.hh:119
CssOrigin
CssOrigin
Definition: css.hh:17
CSS_PROPERTY_PADDING_LEFT
Definition: css.hh:208
CssSimpleSelector::SELECT_PSEUDO_CLASS
Definition: css.hh:351
CSS_FONT_WEIGHT_NORMAL
Definition: css.hh:259
CSS_PROPERTY_COUNTER_INCREMENT
Definition: css.hh:172
CSS_TYPE_LENGTH_PERCENTAGE_NUMBER
Definition: css.hh:39
CssStyleSheet::elementTable
RuleList elementTable[ntags]
Definition: css.hh:489
CssSelector::~CssSelector
~CssSelector()
Definition: css.cc:119
CSS_PROPERTY_TEXT_ALIGN
Definition: css.hh:214
CSS_TYPE_LENGTH_PERCENTAGE
Definition: css.hh:30
CssPropertyList::print
void print()
Definition: css.cc:102
CssStyleSheet::RuleList::hashValue
int hashValue()
Return a hash value for the object.
Definition: css.hh:472
CSS_PROPERTY_PADDING_RIGHT
Definition: css.hh:209
CSS_ORIGIN_USER_AGENT
Definition: css.hh:18
CssStyleSheet::CssStyleSheet
CssStyleSheet()
Definition: css.hh:494
CSS_PROPERTY_HEIGHT
Definition: css.hh:186
CSS_TYPE_FONT_WEIGHT
Definition: css.hh:43
CSS_PROPERTY_OUTLINE_WIDTH
Definition: css.hh:205
CSS_PROPERTY_BORDER_LEFT_WIDTH
Definition: css.hh:158
CSS_PROPERTY_BORDER_BOTTOM_WIDTH
Definition: css.hh:154
CSS_BORDER_WIDTH_THIN
Definition: css.hh:249
CSS_PROPERTY_BORDER_TOP_COLOR
Definition: css.hh:163
CssSelector::checksPseudoClass
bool checksPseudoClass()
Definition: css.cc:184
CssSelector::ref
void ref()
Definition: css.hh:422
CSS_PROPERTY_FONT_VARIANT
Definition: css.hh:184
lout::container::typed::HashTable
Typed version of container::untyped::HashTable.
Definition: container.hh:475
CssStyleSheet
A list of CssRules.
Definition: css.hh:457
CssPropertyList::unref
void unref()
Definition: css.hh:333
CSS_PROPERTY_UNICODE_BIDI
Definition: css.hh:220
CSS_PROPERTY_BORDER_BOTTOM_STYLE
Definition: css.hh:153
lout::object::Object
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
CssFontSizeExtensions
CssFontSizeExtensions
Definition: css.hh:262
CssContext::userAgentSheet
static CssStyleSheet userAgentSheet
Definition: css.hh:506
CSS_PROPERTY_PADDING_BOTTOM
Definition: css.hh:207
CSS_PROPERTY_MAX_HEIGHT
Definition: css.hh:199
CSS_TYPE_AUTO
Definition: css.hh:40
CSS_PROPERTY_WORD_SPACING
Definition: css.hh:225
lout::container::typed::HashTable< lout::object::ConstString, RuleList >::HashTable
HashTable(bool ownerOfKeys, bool ownerOfValues, int tableSize=251)
Definition: container.hh:478
doctree.hh
CssStyleSheet::getRequiredMatchCache
int getRequiredMatchCache()
Definition: css.hh:498
CssSimpleSelector::pseudo
char * pseudo
Definition: css.hh:339
CSS_PROPERTY_MARGIN_TOP
Definition: css.hh:196
CssSimpleSelector::specificity
int specificity()
Return the specificity of the simple selector.
Definition: css.cc:298
CssStyleSheet::RuleMap::RuleMap
RuleMap()
Definition: css.hh:478
CssLength
int CssLength
Definition: css.hh:75
CssSelector::match
bool match(Doctree *dt, const DoctreeNode *node, MatchCache *matchCache)
Definition: css.hh:407
CssSimpleSelector::match
bool match(const DoctreeNode *node)
Return whether simple selector matches at a given node of the document tree.
Definition: css.cc:267
CSS_PROPERTY_COLOR
Definition: css.hh:170
CssSelector::refCount
int refCount
Definition: css.hh:393
CSS_LENGTH_TYPE_EM
Definition: css.hh:82
CSS_BORDER_WIDTH_MEDIUM
Definition: css.hh:250
lout
Definition: container.cc:26
CssSelector
CSS selector class.
Definition: css.hh:378
CSS_FONT_SIZE_XX_LARGE
Definition: css.hh:268
CssSelector::top
CssSimpleSelector * top()
Definition: css.hh:403
CssStyleSheet::anyTable
RuleList anyTable
Definition: css.hh:489
CssSelector::COMB_DESCENDANT
Definition: css.hh:382
CSS_FONT_WEIGHT_LIGHT
Definition: css.hh:257
CSS_PROPERTY_LETTER_SPACING
Definition: css.hh:188
CSS_PROPERTY_TOP
Definition: css.hh:219
CssPropertyList::set
void set(CssPropertyName name, CssValueType type, CssPropertyValue value)
Set property to a given name and type.
Definition: css.cc:58
CssStyleSheet::apply
void apply(CssPropertyList *props, Doctree *docTree, const DoctreeNode *node, MatchCache *matchCache) const
Apply a stylesheet to a property list.
Definition: css.cc:417
CSS_PROPERTY_FONT_STRETCH
Definition: css.hh:182
CSS_TYPE_LENGTH
Definition: css.hh:32
CssPropertyValue::strVal
char * strVal
Definition: css.hh:244
CssRule::specificity
int specificity()
Definition: css.hh:447
CssRule::props
CssPropertyList * props
Definition: css.hh:433
CssSelector::COMB_ADJACENT_SIBLING
Definition: css.hh:384
CssProperty::value
CssPropertyValue value
Definition: css.hh:291
CSS_PROPERTY_END
Definition: css.hh:146
CssSelector::CssSelector
CssSelector()
Definition: css.cc:107
CSS_LENGTH_TYPE
CssLengthType CSS_LENGTH_TYPE(CssLength l)
Definition: css.hh:122
CSS_PROPERTY_MIN_WIDTH
Definition: css.hh:202
CSS_PROPERTY_X_ROWSPAN
Definition: css.hh:229
CssStyleSheet::RuleList::~RuleList
~RuleList()
Definition: css.hh:463
CSS_FONT_WEIGHT_BOLD
Definition: css.hh:255
CSS_PROPERTY_CONTENT
Definition: css.hh:171
CSS_PROPERTY_LAST
Definition: css.hh:234
CSS_PROPERTY_BORDER_TOP_STYLE
Definition: css.hh:164
CSS_PROPERTY_OVERFLOW
Definition: css.hh:206
CssSelector::addSimpleSelector
void addSimpleSelector(Combinator c)
Definition: css.cc:173
CssPropertyList::ref
void ref()
Definition: css.hh:332
CssStyleSheet::classTable
RuleMap classTable
Definition: css.hh:490
CSS_PROPERTY_BORDER_LEFT_STYLE
Definition: css.hh:157
CSS_LENGTH_TYPE_EX
Definition: css.hh:83
CSS_LENGTH_TYPE_NONE
Definition: css.hh:78
CssSelector::COMB_CHILD
Definition: css.hh:383
CSS_PROPERTY_BORDER_RIGHT_COLOR
Definition: css.hh:159
CssContext::sheet
CssStyleSheet sheet[CSS_PRIMARY_USER_IMPORTANT+1]
Definition: css.hh:507
CssSelector::CombinatorAndSelector::combinator
Combinator combinator
Definition: css.hh:389
lout::misc::SimpleVector< CssProperty >::SimpleVector
SimpleVector(int initAlloc=1)
Definition: misc.hh:95
CSS_FONT_SIZE_SMALL
Definition: css.hh:266
CssPropertyName
CssPropertyName
Definition: css.hh:145
CssStyleSheet::RuleList::RuleList
RuleList()
Definition: css.hh:462
CSS_TYPE_INTEGER
Definition: css.hh:24
CssBackgroundPosition::posX
int32_t posX
Definition: css.hh:238
CSS_TYPE_SIGNED_LENGTH
Definition: css.hh:38
CSS_PROPERTY_EMPTY_CELLS
Definition: css.hh:177
CSS_PROPERTY_BACKGROUND_IMAGE
Definition: css.hh:149
CSS_PROPERTY_QUOTES
Definition: css.hh:212
CSS_PRIMARY_AUTHOR
Definition: css.hh:11
CSS_PROPERTY_FONT_FAMILY
Definition: css.hh:179
CssPropertyValue
Definition: css.hh:242
CSS_PROPERTY_DIRECTION
Definition: css.hh:175
PROPERTY_X_LANG
Definition: css.hh:231
CSS_PROPERTY_Z_INDEX
Definition: css.hh:226
CssSimpleSelector::CssSimpleSelector
CssSimpleSelector()
Definition: css.cc:231
CSS_PROPERTY_VERTICAL_ALIGN
Definition: css.hh:221
CssPropertyList::safe
bool safe
Definition: css.hh:315
CssSimpleSelector::~CssSimpleSelector
~CssSimpleSelector()
Definition: css.cc:237
CSS_PROPERTY_BACKGROUND_POSITION
Definition: css.hh:150
CSS_TYPE_MULTI_ENUM
Definition: css.hh:28
CssContext
A set of CssStyleSheets.
Definition: css.hh:504
CssPropertyList::CssPropertyList
CssPropertyList(bool ownerOfStrings=false)
Definition: css.hh:318
CssPropertyList::~CssPropertyList
~CssPropertyList()
Definition: css.cc:49
CSS_PROPERTY_BORDER_SPACING
Definition: css.hh:162
CSS_PROPERTY_POSITION
Definition: css.hh:211
CssBorderWidthExtensions
CssBorderWidthExtensions
Definition: css.hh:248
CSS_PROPERTY_FLOAT
Definition: css.hh:178
CSS_PROPERTY_MARGIN_BOTTOM
Definition: css.hh:193
CSS_PROPERTY_WIDTH
Definition: css.hh:224
CSS_TYPE_STRING
Definition: css.hh:45
core.hh
CssPropertyValue::intVal
int32_t intVal
Definition: css.hh:243
CSS_PROPERTY_LINE_HEIGHT
Definition: css.hh:189
CssSelector::CombinatorAndSelector::selector
CssSimpleSelector * selector
Definition: css.hh:390
CssSelector::unref
void unref()
Definition: css.hh:423
CSS_PROPERTY_CURSOR
Definition: css.hh:174
CssSimpleSelector::setSelect
void setSelect(SelectType t, const char *v)
Definition: css.cc:244
CSS_PROPERTY_BORDER_COLLAPSE
Definition: css.hh:155
CssStyleSheet::ntags
static const int ntags
Definition: css.hh:482
CssPropertyList
A list of CssProperty objects.
Definition: css.hh:312
CssLengthType
CssLengthType
Definition: css.hh:77
CssContext::pos
int pos
Definition: css.hh:509
CssRule::CssRule
CssRule(CssSelector *selector, CssPropertyList *props, int pos)
Definition: css.cc:320
CSS_PROPERTY_X_COLSPAN
Definition: css.hh:228
CssValueType
CssValueType
Definition: css.hh:23
CSS_LENGTH_TYPE_RELATIVE
Definition: css.hh:85
CssSimpleSelector::klass
lout::misc::SimpleVector< char * > klass
Definition: css.hh:340
CSS_ORIGIN_USER
Definition: css.hh:19
CSS_PROPERTY_MIN_HEIGHT
Definition: css.hh:201
CSS_TYPE_URI
Definition: css.hh:50
CssSimpleSelector::ELEMENT_ANY
Definition: css.hh:345
lout::misc::roundInt
int roundInt(double d)
Definition: misc.hh:41
CssStyleSheet::addRule
void addRule(CssRule *rule)
Insert a rule into CssStyleSheet.
Definition: css.cc:372
CssRule::selector
CssSelector * selector
Definition: css.hh:437
CssBackgroundPosition
Definition: css.hh:237
CssStyleSheet::RuleList::equals
bool equals(lout::object::Object *other)
Returns, whether two objects are equal.
Definition: css.hh:469
CssRule::position
int position()
Definition: css.hh:448
CSS_PROPERTY_MARGIN_LEFT
Definition: css.hh:194
CssProperty::print
void print()
Definition: css.cc:20
CssSelector::COMB_NONE
Definition: css.hh:381
CssPropertyList::refCount
int refCount
Definition: css.hh:313
CssSelector::size
int size()
Definition: css.hh:406
CSS_LENGTH_TYPE_PERCENTAGE
Definition: css.hh:84
CSS_PROPERTY_RIGHT
Definition: css.hh:213
CSS_ORIGIN_AUTHOR
Definition: css.hh:20
CSS_PROPERTY_LIST_STYLE_TYPE
Definition: css.hh:192
CSS_PRIMARY_USER_IMPORTANT
Definition: css.hh:13
CssPropertyValue::posVal
CssBackgroundPosition * posVal
Definition: css.hh:245
CSS_PROPERTY_TEXT_DECORATION
Definition: css.hh:215
CssSimpleSelector::getId
const char * getId()
Definition: css.hh:361
CssContext::addRule
void addRule(CssSelector *sel, CssPropertyList *props, CssPrimaryOrder order)
Definition: css.cc:529
CSS_LENGTH_TYPE_AUTO
Definition: css.hh:87
lout::misc::SimpleVector
Simple (simpler than container::untyped::Vector and container::typed::Vector) template based vector.
Definition: misc.hh:71
CSS_FONT_SIZE_LARGE
Definition: css.hh:263
CSS_PROPERTY_PADDING_TOP
Definition: css.hh:210
CssSelector::print
void print()
Definition: css.cc:206
CssPropertyList::ownerOfStrings
bool ownerOfStrings
Definition: css.hh:314
CssSimpleSelector::SelectType
SelectType
Definition: css.hh:348
CssStyleSheet::RuleList
Definition: css.hh:459
CssSimpleSelector
Definition: css.hh:336
CSS_LENGTH_VALUE
float CSS_LENGTH_VALUE(CssLength l)
Definition: css.hh:126
CSS_PROPERTY_FONT_STYLE
Definition: css.hh:183
CssStyleSheet::requiredMatchCache
int requiredMatchCache
Definition: css.hh:491
CSS_PROPERTY_CAPTION_SIDE
Definition: css.hh:167
CSS_PROPERTY_OUTLINE_COLOR
Definition: css.hh:203
CSS_PRIMARY_USER_AGENT
Definition: css.hh:9
PROPERTY_X_TOOLTIP
Definition: css.hh:233
CSS_FONT_SIZE_X_LARGE
Definition: css.hh:270
CSS_PROPERTY_VISIBILITY
Definition: css.hh:222
CSS_PROPERTY_WHITE_SPACE
Definition: css.hh:223
CSS_LENGTH_TYPE_MM
Definition: css.hh:80