fix bug 4376, 'Litehtml breaks locale'
[claws.git] / src / plugins / litehtml_viewer / litehtml / el_anchor.cpp
1 #include "html.h"
2 #include "el_anchor.h"
3 #include "document.h"
4
5 litehtml::el_anchor::el_anchor(const std::shared_ptr<litehtml::document>& doc) : html_tag(doc)
6 {
7 }
8
9 litehtml::el_anchor::~el_anchor()
10 {
11
12 }
13
14 void litehtml::el_anchor::on_click()
15 {
16         const tchar_t* href = get_attr(_t("href"));
17
18         if(href)
19         {
20                 get_document()->container()->on_anchor_click(href, shared_from_this());
21         }
22 }
23
24 void litehtml::el_anchor::apply_stylesheet( const litehtml::css& stylesheet )
25 {
26         if( get_attr(_t("href")) )
27         {
28                 m_pseudo_classes.push_back(_t("link"));
29         }
30         html_tag::apply_stylesheet(stylesheet);
31 }