summaryrefslogtreecommitdiff
path: root/libs/litehtml/src/el_text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/litehtml/src/el_text.cpp')
-rw-r--r--libs/litehtml/src/el_text.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/libs/litehtml/src/el_text.cpp b/libs/litehtml/src/el_text.cpp
index 5a1dffb69e..70ed82e6af 100644
--- a/libs/litehtml/src/el_text.cpp
+++ b/libs/litehtml/src/el_text.cpp
@@ -10,7 +10,7 @@ litehtml::el_text::el_text(const char* text, const document::ptr& doc) : element
}
m_use_transformed = false;
m_draw_spaces = true;
- css_w().set_display(display_inline_text);
+ css_w().set_display(display_inline_text);
}
void litehtml::el_text::get_content_size( size& sz, int /*max_width*/ )
@@ -25,17 +25,17 @@ void litehtml::el_text::get_text( string& text )
void litehtml::el_text::compute_styles(bool /*recursive*/)
{
- element::ptr el_parent = parent();
- if (el_parent)
- {
- css_w().set_line_height(el_parent->css().get_line_height());
- css_w().set_font(el_parent->css().get_font());
- css_w().set_font_metrics(el_parent->css().get_font_metrics());
- css_w().set_white_space(el_parent->css().get_white_space());
+ element::ptr el_parent = parent();
+ if (el_parent)
+ {
+ css_w().set_line_height(el_parent->css().get_line_height());
+ css_w().set_font(el_parent->css().get_font());
+ css_w().set_font_metrics(el_parent->css().get_font_metrics());
+ css_w().set_white_space(el_parent->css().get_white_space());
css_w().set_text_transform(el_parent->css().get_text_transform());
- }
- css_w().set_display(display_inline_text);
- css_w().set_float(float_none);
+ }
+ css_w().set_display(display_inline_text);
+ css_w().set_float(float_none);
if(m_css.get_text_transform() != text_transform_none)
{
@@ -47,21 +47,21 @@ void litehtml::el_text::compute_styles(bool /*recursive*/)
m_use_transformed = false;
}
- element::ptr p = parent();
- while(p && p->css().get_display() == display_inline)
- {
- if(p->css().get_position() == element_position_relative)
- {
- css_w().set_offsets(p->css().get_offsets());
- css_w().set_position(element_position_relative);
- break;
- }
- p = p->parent();
- }
- if(p)
- {
- css_w().set_position(element_position_static);
- }
+ element::ptr p = parent();
+ while(p && p->css().get_display() == display_inline)
+ {
+ if(p->css().get_position() == element_position_relative)
+ {
+ css_w().set_offsets(p->css().get_offsets());
+ css_w().set_position(element_position_relative);
+ break;
+ }
+ p = p->parent();
+ }
+ if(p)
+ {
+ css_w().set_position(element_position_static);
+ }
if(is_white_space())
{
@@ -86,7 +86,7 @@ void litehtml::el_text::compute_styles(bool /*recursive*/)
if (el_parent)
{
font = el_parent->css().get_font();
- fm = el_parent->css().get_font_metrics();
+ fm = el_parent->css().get_font_metrics();
}
if(is_break() || !font)
{
@@ -131,10 +131,10 @@ void litehtml::el_text::draw(uint_ptr hdc, int x, int y, const position *clip, c
litehtml::string litehtml::el_text::dump_get_name()
{
- return "text: \"" + get_escaped_string(m_text) + "\"";
+ return "text: \"" + get_escaped_string(m_text) + "\"";
}
std::vector<std::tuple<litehtml::string, litehtml::string>> litehtml::el_text::dump_get_attrs()
{
- return std::vector<std::tuple<string, string>>();
+ return {};
}