summaryrefslogtreecommitdiff
path: root/libs/litehtml/src/el_td.cpp
blob: 679d9212abe587c7ddb0dbcf12d2fc9faa681566 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "html.h"
#include "el_td.h"


litehtml::el_td::el_td(const std::shared_ptr<document>& doc) : html_tag(doc)
{

}

void litehtml::el_td::parse_attributes()
{
	const char* str = get_attr("width");
	if(str)
	{
		m_style.add_property(_width_, str);
	}
	str = get_attr("background");
	if(str)
	{
		string url = "url('";
		url += str;
		url += "')";
		m_style.add_property(_background_image_, url);
	}
	str = get_attr("align");
	if(str)
	{
		m_style.add_property(_text_align_, str);
	}

	str = get_attr("bgcolor");
	if (str)
	{
		m_style.add_property(_background_color_, str, "", false, get_document()->container());
	}

	str = get_attr("valign");
	if(str)
	{
		m_style.add_property(_vertical_align_, str);
	}
	html_tag::parse_attributes();
}