summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-10-03 03:05:26 +0000
committercorvid <corvid@lavabit.com>2009-10-03 03:05:26 +0000
commitff98b21d34e1fe491b2188914f09cad1417b1924 (patch)
tree04a8271fc97bba255647c1b28b48b46ff2105ead
parent74c690bc83186311a0567b5d35edd30961104ed4 (diff)
tooltip for A element
-rw-r--r--src/html.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/html.cc b/src/html.cc
index 6450caa3..8c1a9519 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -2417,6 +2417,7 @@ static void Html_add_anchor(DilloHtml *html, const char *name)
static void Html_tag_open_a(DilloHtml *html, const char *tag, int tagsize)
{
DilloUrl *url;
+ char *tooltip_str = NULL;
CssPropertyList props;
const char *attrbuf;
@@ -2447,9 +2448,14 @@ static void Html_tag_open_a(DilloHtml *html, const char *tag, int tagsize)
props.set (PROPERTY_X_LINK, CSS_TYPE_INTEGER,
Html_set_new_link(html, &url));
-
- html->styleEngine->setNonCssHints (&props);
}
+ if (prefs.show_tooltip &&
+ (attrbuf = a_Html_get_attr(html, tag, tagsize, "title"))) {
+ tooltip_str = dStrdup(attrbuf);
+ props.set (PROPERTY_X_TOOLTIP, CSS_TYPE_STRING, tooltip_str);
+ }
+ html->styleEngine->setNonCssHints (&props);
+ dFree(tooltip_str);
html->styleEngine->inheritBackgroundColor ();