aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-12 18:57:38 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-12 18:57:38 +0100
commit76a081186a340bb5a1ef6f928b25c99885429d50 (patch)
tree19294344281f214e1c33734a0136029bac422f8e /src
parent92470d5c3d8eb174ee66a1ce3f6f17ef54b0a41b (diff)
support cursor
Diffstat (limited to 'src')
-rw-r--r--src/css.cc13
-rw-r--r--src/cssparser.cc8
2 files changed, 14 insertions, 7 deletions
diff --git a/src/css.cc b/src/css.cc
index 0eace483..d5f6e9ba 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -148,12 +148,13 @@ void CssContext::addRule (CssRule *rule, CssPrimaryOrder order) {
void CssContext::buildUserAgentStyle () {
char *cssBuf =
- "body {background-color: 0xdcd1ba; font-family: helvetica; color: black; margin-left: 5px; \
- margin-top: 5px; margin-bottom: 5px; margin-right: 5px; } \
- :link {color: blue; text-decoration: underline; cursor: pointer; } \
- :visited {color: green; text-decoration: underline; cursor: pointer; } \
- b, strong {font-weight: bolder; } \
- h1 {font-size: 20em;} ";
+ "body {background-color: 0xdcd1ba; font-family: helvetica; color: black;"
+// " margin-left: 5px; margin-top: 5px; margin-bottom: 5px; margin-right: 5px;"
+ " }"
+ ":link {color: blue; text-decoration: underline; cursor: pointer; } "
+ ":visited {color: green; text-decoration: underline; cursor: pointer; } "
+ "b, strong {font-weight: bolder; } "
+ "h1 {font-size: 20em;} ";
a_Css_parse (this, cssBuf, strlen (cssBuf), 0, CSS_ORIGIN_USER_AGENT);
diff --git a/src/cssparser.cc b/src/cssparser.cc
index e9fa0617..07ab3ac1 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -27,6 +27,12 @@ static char *Css_border_style_enum_vals[] = {
"inset", "outset", NULL
};
+static char *Css_cursor_enum_vals[] = {
+ "crosshair", "default", "pointer", "move", "e_resize", "ne_resize", "nw_resize",
+ "n_resize", "se_resize", "sw_resize", "s_resize", "w_resize", "text", "wait",
+ "help", NULL
+};
+
static char *Css_display_enum_vals[DISPLAY_LAST + 1] = {
"block", "inline", "list-item", "table", "table-row-group",
"table-header-group", "table-footer-group", "table-row",
@@ -90,7 +96,7 @@ CssPropertyInfo Css_property_info[CssProperty::CSS_PROPERTY_LAST] = {
{ "content", CSS_TYPE_STRING, NULL },
{ "counter-increment", CSS_TYPE_UNUSED, NULL },
{ "counter-reset", CSS_TYPE_UNUSED, NULL },
- { "cursor", CSS_TYPE_UNUSED, NULL },
+ { "cursor", CSS_TYPE_ENUM, Css_cursor_enum_vals },
{ "direction", CSS_TYPE_UNUSED, NULL },
{ "display", CSS_TYPE_ENUM, Css_display_enum_vals },
{ "empty-cells", CSS_TYPE_UNUSED, NULL },