summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/select/computed.c8
-rw-r--r--src/select/dispatch.c2
-rw-r--r--src/select/properties.c4
-rw-r--r--src/select/propset.h46
4 files changed, 27 insertions, 33 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index 7829b23..d8007c1 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -65,10 +65,7 @@ css_error css_computed_style_destroy(css_computed_style *style)
style->alloc(style->uncommon->counter_reset, 0,
style->pw);
}
-
- if (style->uncommon->quotes != NULL)
- style->alloc(style->uncommon->quotes, 0, style->pw);
-
+
if (style->uncommon->cursor != NULL)
style->alloc(style->uncommon->cursor, 0, style->pw);
@@ -86,6 +83,9 @@ css_error css_computed_style_destroy(css_computed_style *style)
if (style->font_family != NULL)
style->alloc(style->font_family, 0, style->pw);
+ if (style->quotes != NULL)
+ style->alloc(style->quotes, 0, style->pw);
+
style->alloc(style, 0, style->pw);
return CSS_OK;
diff --git a/src/select/dispatch.c b/src/select/dispatch.c
index 10eb0ed..c15465b 100644
--- a/src/select/dispatch.c
+++ b/src/select/dispatch.c
@@ -610,7 +610,7 @@ struct prop_table prop_dispatch[CSS_N_PROPERTIES] = {
initial_quotes,
compose_quotes,
1,
- GROUP_UNCOMMON
+ GROUP_NORMAL
},
{
cascade_richness,
diff --git a/src/select/properties.c b/src/select/properties.c
index c607bf0..cb9ed02 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -4126,9 +4126,7 @@ css_error compose_quotes(const css_computed_style *parent,
css_error error;
lwc_string **quotes = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
- css_computed_quotes(child, &quotes) ==
- CSS_QUOTES_INHERIT) {
+ if (css_computed_quotes(child, &quotes) == CSS_QUOTES_INHERIT) {
uint8_t p = css_computed_quotes(parent, &quotes);
size_t n_quotes = 0;
lwc_string **copy = NULL;
diff --git a/src/select/propset.h b/src/select/propset.h
index 743297b..c98d47b 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -241,31 +241,6 @@ static inline css_error set_cursor(
#undef CURSOR_SHIFT
#undef CURSOR_INDEX
-#define QUOTES_INDEX 4
-#define QUOTES_SHIFT 2
-#define QUOTES_MASK 0x4
-static inline css_error set_quotes(
- css_computed_style *style, uint8_t type,
- lwc_string **quotes)
-{
- uint8_t *bits;
-
- ENSURE_UNCOMMON;
-
- bits = &style->uncommon->bits[QUOTES_INDEX];
-
- /* 1bit: type */
- *bits = (*bits & ~QUOTES_MASK) |
- ((type & 0x1) << QUOTES_SHIFT);
-
- style->uncommon->quotes = quotes;
-
- return CSS_OK;
-}
-#undef QUOTES_MASK
-#undef QUOTES_SHIFT
-#undef QUOTES_INDEX
-
#define CLIP_INDEX 7
#define CLIP_SHIFT 2
#define CLIP_MASK 0xfc
@@ -548,6 +523,27 @@ static inline css_error set_list_style_image(
#undef LIST_STYLE_IMAGE_SHIFT
#undef LIST_STYLE_IMAGE_INDEX
+#define QUOTES_INDEX 5
+#define QUOTES_SHIFT 0
+#define QUOTES_MASK 0x1
+static inline css_error set_quotes(
+ css_computed_style *style, uint8_t type,
+ lwc_string **quotes)
+{
+ uint8_t *bits = &style->bits[QUOTES_INDEX];
+
+ /* 1bit: type */
+ *bits = (*bits & ~QUOTES_MASK) |
+ ((type & 0x1) << QUOTES_SHIFT);
+
+ style->quotes = quotes;
+
+ return CSS_OK;
+}
+#undef QUOTES_MASK
+#undef QUOTES_SHIFT
+#undef QUOTES_INDEX
+
#define TOP_INDEX 6
#define TOP_SHIFT 2
#define TOP_MASK 0xfc