aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuri Kobets <[email protected]>2025-06-10 01:46:11 +0300
committerYuri Kobets <[email protected]>2025-06-10 01:46:11 +0300
commit6f36dd247277a98a3eaa82c65efc112044c19898 (patch)
treeb8e5a9d76e2ca9d8cbb2c3111260335c97596120 /src
parentbfcca39e24c3f24f023dd609daace7d4d1879452 (diff)
Add const qualifier to calc_document_size methodupstream/overflow_scroll
Diffstat (limited to 'src')
-rw-r--r--src/render_item.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render_item.cpp b/src/render_item.cpp
index 7292373a..0362685e 100644
--- a/src/render_item.cpp
+++ b/src/render_item.cpp
@@ -707,7 +707,7 @@ void litehtml::render_item::get_redraw_box(litehtml::position& pos, int x /*= 0*
}
}
-void litehtml::render_item::calc_document_size( litehtml::size& sz, int x /*= 0*/, int y /*= 0*/ )
+void litehtml::render_item::calc_document_size( litehtml::size& sz, int x /*= 0*/, int y /*= 0*/ ) const
{
if(css().get_display() != display_inline && css().get_display() != display_table_row)
{
@@ -717,7 +717,7 @@ void litehtml::render_item::calc_document_size( litehtml::size& sz, int x /*= 0*
sz.height = std::max(sz.height, y + bottom());
// All children of tables and blocks with style other than "overflow: visible" are inside element.
- // We can skip calculating size of children
+ // We can skip calculating the size of children
if (src_el()->css().get_overflow() == overflow_visible && src_el()->css().get_display() != display_table)
{
for (auto &el: m_children)
@@ -730,7 +730,7 @@ void litehtml::render_item::calc_document_size( litehtml::size& sz, int x /*= 0*
{
position::vector boxes;
get_inline_boxes(boxes);
- for(auto& box : boxes)
+ for(const auto& box : boxes)
{
sz.width = std::max(sz.width, x + box.x + box.width);
sz.height = std::max(sz.height, y + box.y + box.height);