aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/doctree.hh1
-rw-r--r--src/html.cc7
-rw-r--r--src/styleengine.hh1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/doctree.hh b/src/doctree.hh
index 92960422..5533d136 100644
--- a/src/doctree.hh
+++ b/src/doctree.hh
@@ -6,6 +6,7 @@ class DoctreeNode {
int depth;
int tag;
const char *klass;
+ const char *pseudoClass;
const char *id;
};
diff --git a/src/html.cc b/src/html.cc
index e840b46c..fcc769d0 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -2470,6 +2470,13 @@ static void Html_tag_open_a(DilloHtml *html, const char *tag, int tagsize)
url = a_Html_url_new(html, attrbuf, NULL, 0);
dReturn_if_fail ( url != NULL );
+ if (a_Capi_get_flags(url) & CAPI_IsCached) {
+ html->InVisitedLink = true;
+ html->styleEngine->setPseudoClass ("visited");
+ } else {
+ html->styleEngine->setPseudoClass ("link");
+ }
+
props.set (CssProperty::PROPERTY_X_LINK, Html_set_new_link(html, &url));
html->styleEngine->setNonCssProperties (&props);
}
diff --git a/src/styleengine.hh b/src/styleengine.hh
index 218d874b..76ca226c 100644
--- a/src/styleengine.hh
+++ b/src/styleengine.hh
@@ -40,6 +40,7 @@ class StyleEngine : public Doctree {
const char *style);
void endElement (int tag);
void setNonCssProperties (CssPropertyList *props);
+ void setPseudoClass (const char *pseudoClass);
inline dw::core::style::Style *style () {
dw::core::style::Style *s = stack->getRef (stack->size () - 1)->style;