aboutsummaryrefslogtreecommitdiffstats
path: root/src/render_block.cpp
diff options
context:
space:
mode:
authorstasoid <stasoid@yahoo.com>2022-11-07 22:11:00 +0600
committerstasoid <stasoid@yahoo.com>2022-11-07 22:11:00 +0600
commit8c7621034f2edadc46a9cf236ddef874953c3939 (patch)
tree11f9c7db16db51ae2d2bac9c338d5c48c99f3a93 /src/render_block.cpp
parentf843d66fb3c43d8705512e9d8c802cdf09acc6c4 (diff)
parse_styles optimization: use string_id for CSS property names
decreases parse_styles time by 37% (750 ms -> 468 ms on Obama wiki on my machine)
Diffstat (limited to 'src/render_block.cpp')
-rw-r--r--src/render_block.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render_block.cpp b/src/render_block.cpp
index 682db6e2..449a5561 100644
--- a/src/render_block.cpp
+++ b/src/render_block.cpp
@@ -789,14 +789,14 @@ int litehtml::render_item_block::_render(int x, int y, int max_width, bool secon
if (src_el()->css().get_display() == display_list_item)
{
- const char* list_image = src_el()->get_style_property("list-style-image", true, nullptr);
+ const char* list_image = src_el()->get_style_property(_list_style_image_, true, nullptr);
if (list_image)
{
string url;
css::parse_css_url(list_image, url);
size sz;
- const char* list_image_baseurl = src_el()->get_style_property("list-style-image-baseurl", true, nullptr);
+ const char* list_image_baseurl = src_el()->get_style_property(_list_style_image_baseurl_, true, nullptr);
src_el()->get_document()->container()->get_image_size(url.c_str(), list_image_baseurl, sz);
if (min_height < sz.height)
{