Disable stack execution on plugins
[claws.git] / src / plugins / litehtml_viewer / litehtml / render_inline.h
blob476011563238be96a67efc28719db2f14015465f
1 #ifndef LITEHTML_RENDER_INLINE_H
2 #define LITEHTML_RENDER_INLINE_H
4 #include "render_item.h"
6 namespace litehtml
8 class render_item_inline : public render_item
10 protected:
11 position::vector m_boxes;
13 public:
14 explicit render_item_inline(std::shared_ptr<element> src_el) : render_item(std::move(src_el))
17 void get_inline_boxes( position::vector& boxes ) const override { boxes = m_boxes; }
18 void set_inline_boxes( position::vector& boxes ) override { m_boxes = boxes; }
19 void add_inline_box( const position& box ) override { m_boxes.emplace_back(box); };
20 void clear_inline_boxes() override { m_boxes.clear(); }
21 int get_base_line() override { return src_el()->css().get_font_metrics().base_line(); }
23 std::shared_ptr<render_item> clone() override
25 return std::make_shared<render_item_inline>(src_el());
30 #endif //LITEHTML_RENDER_INLINE_H