vCalendar: Honor VTIMEZONE component if present
[claws.git] / src / plugins / litehtml_viewer / litehtml / el_table.cpp
blob0bb8648436694dcc0730c653b39a4af04e6edf21
1 #include "html.h"
2 #include "el_table.h"
3 #include "document.h"
4 #include "iterators.h"
7 litehtml::el_table::el_table(const std::shared_ptr<document>& doc) : html_tag(doc)
12 bool litehtml::el_table::appendChild(const element::ptr& el)
14 if(!el) return false;
15 if( el->tag() == _tbody_ ||
16 el->tag() == _thead_ ||
17 el->tag() == _tfoot_ ||
18 el->tag() == _caption_)
20 return html_tag::appendChild(el);
22 return false;
25 void litehtml::el_table::parse_attributes()
27 const char* str = get_attr("width");
28 if(str)
30 m_style.add_property(_width_, str);
33 str = get_attr("cellspacing");
34 if(str)
36 string val = str;
37 val += " ";
38 val += str;
39 m_style.add_property(_border_spacing_, val);
42 str = get_attr("border");
43 if(str)
45 m_style.add_property(_border_width_, str);
48 str = get_attr("bgcolor");
49 if (str)
51 m_style.add_property(_background_color_, str, "", false, get_document()->container());
54 html_tag::parse_attributes();