diff options
author | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2019-06-09 15:44:04 +0100 |
---|---|---|
committer | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2019-06-09 15:44:04 +0100 |
commit | 00cafe488273eab18e9c93bf59191efaa722fc3b (patch) | |
tree | a060fccd23893744e6a4af2f7b70d9baee860c46 /src | |
parent | bb6f896cf4e76730df40f2718d24c4cc15643995 (diff) | |
download | libcss-00cafe488273eab18e9c93bf59191efaa722fc3b.tar.gz libcss-00cafe488273eab18e9c93bf59191efaa722fc3b.tar.bz2 |
Stylesheet: Increase size of storage for selector count for rules.
We've found instances of well over 256 selectors for a rule in the wild.
`for N in $(seq 0 254); do echo ".selector-$N,"; done; echo ".selector-255 {}"`
Diffstat (limited to 'src')
-rw-r--r-- | src/stylesheet.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stylesheet.h b/src/stylesheet.h index a44ad1f..a71fca6 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -117,10 +117,10 @@ struct css_rule { css_rule *next; /**< next in list */ css_rule *prev; /**< previous in list */ - unsigned int type : 4, /**< css_rule_type */ - index : 16, /**< index in sheet */ - items : 8, /**< # items in rule */ - ptype : 1; /**< css_rule_parent_type */ + uint32_t index; /**< index in sheet */ + uint16_t items; /**< number of items (selectors) in rule */ + uint8_t type; /**< css_rule_type */ + uint8_t ptype; /**< css_rule_parent_type */ } _ALIGNED; typedef struct css_rule_selector { |