summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorCaitlin Potter <snowball@defpixel.com>2013-09-10 17:44:53 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-10 17:44:53 +0100
commitbc9c80c2dbf21d805f5372aea3df14d310a1512c (patch)
tree990fab4a6a72e7ddea5f12da20329412da5006b6 /src/parse
parent2234cab352b0ef702b32aaa7ef433c4793086824 (diff)
downloadlibcss-bc9c80c2dbf21d805f5372aea3df14d310a1512c.tar.gz
libcss-bc9c80c2dbf21d805f5372aea3df14d310a1512c.tar.bz2
Add support for parsing the writing-mode property. Thanks to Caitlin Potter.
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/properties/properties.gen1
-rw-r--r--src/parse/properties/properties.h3
-rw-r--r--src/parse/propstrings.c4
-rw-r--r--src/parse/propstrings.h5
4 files changed, 11 insertions, 2 deletions
diff --git a/src/parse/properties/properties.gen b/src/parse/properties/properties.gen
index 5a4ebe0..80f1a30 100644
--- a/src/parse/properties/properties.gen
+++ b/src/parse/properties/properties.gen
@@ -212,3 +212,4 @@ column_span:CSS_PROP_COLUMN_SPAN IDENT:( INHERIT: NONE:0,COLUMN_SPAN_NONE ALL:0,
column_width:CSS_PROP_COLUMN_WIDTH IDENT:( INHERIT: AUTO:0,COLUMN_WIDTH_AUTO IDENT:) LENGTH_UNIT:( UNIT_PX:COLUMN_WIDTH_SET DISALLOW:unit&UNIT_ANGLE||unit&UNIT_TIME||unit&UNIT_FREQ||unit&UNIT_PCT LENGTH_UNIT:)
+writing_mode:CSS_PROP_WRITING_MODE IDENT:( INHERIT: HORIZONTAL_TB:0,WRITING_MODE_HORIZONTAL_TB VERTICAL_RL:0,WRITING_MODE_VERTICAL_RL VERTICAL_LR:0,WRITING_MODE_VERTICAL_LR IDENT:)
diff --git a/src/parse/properties/properties.h b/src/parse/properties/properties.h
index 7280d93..7c4d8a1 100644
--- a/src/parse/properties/properties.h
+++ b/src/parse/properties/properties.h
@@ -406,6 +406,9 @@ css_error css__parse_width(css_language *c,
css_error css__parse_word_spacing(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style *result);
+css_error css__parse_writing_mode(css_language *c,
+ const parserutils_vector *vector, int *ctx,
+ css_style *result);
css_error css__parse_z_index(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style *result);
diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c
index 35466eb..913241c 100644
--- a/src/parse/propstrings.c
+++ b/src/parse/propstrings.c
@@ -210,6 +210,7 @@ const stringmap_entry stringmap[LAST_KNOWN] = {
{ "widows", SLEN("widows") },
{ "width", SLEN("width") },
{ "word-spacing", SLEN("word-spacing") },
+ { "writing-mode", SLEN("writing-mode") },
{ "z-index", SLEN("z-index") },
{ "inherit", SLEN("inherit") },
@@ -406,6 +407,9 @@ const stringmap_entry stringmap[LAST_KNOWN] = {
{ "avoid-page", SLEN("avoid_page") },
{ "avoid-column", SLEN("avoid-column") },
{ "balance", SLEN("balance") },
+ { "horizontal-tb", SLEN("horizontal-tb") },
+ { "vertical-rl", SLEN("vertical-rl") },
+ { "vertical-lr", SLEN("vertical-lr") },
{ "aliceblue", SLEN("aliceblue") },
{ "antiquewhite", SLEN("antiquewhite") },
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
index 2ed0743..72a60ae 100644
--- a/src/parse/propstrings.h
+++ b/src/parse/propstrings.h
@@ -64,7 +64,8 @@ enum {
SPEAK_HEADER, SPEAK_NUMERAL, SPEAK_PUNCTUATION, SPEAK, SPEECH_RATE,
STRESS, TABLE_LAYOUT, TEXT_ALIGN, TEXT_DECORATION, TEXT_INDENT,
TEXT_TRANSFORM, TOP, UNICODE_BIDI, VERTICAL_ALIGN, VISIBILITY,
- VOICE_FAMILY, VOLUME, WHITE_SPACE, WIDOWS, WIDTH, WORD_SPACING, Z_INDEX,
+ VOICE_FAMILY, VOLUME, WHITE_SPACE, WIDOWS, WIDTH, WORD_SPACING,
+ WRITING_MODE, Z_INDEX,
LAST_PROP = Z_INDEX,
@@ -96,7 +97,7 @@ enum {
LINE_THROUGH, BLINK, RGB, RGBA, HSL, HSLA, LIBCSS_LEFT, LIBCSS_CENTER,
LIBCSS_RIGHT, CURRENTCOLOR, ODD, EVEN, SRC, LOCAL, INITIAL,
FORMAT, WOFF, TRUETYPE, OPENTYPE, EMBEDDED_OPENTYPE, SVG, COLUMN,
- AVOID_PAGE, AVOID_COLUMN, BALANCE,
+ AVOID_PAGE, AVOID_COLUMN, BALANCE, HORIZONTAL_TB, VERTICAL_RL, VERTICAL_LR,
/* Named colours */
FIRST_COLOUR,