Disable stack execution on plugins
[claws.git] / src / plugins / litehtml_viewer / litehtml / formatting_context.h
blobeee481dc46cd83d9f2c3fee3728e110038026cad
1 #ifndef LITEHTML_FLOATS_HOLDER_H
2 #define LITEHTML_FLOATS_HOLDER_H
4 #include <list>
5 #include "types.h"
7 namespace litehtml
9 class formatting_context
11 private:
12 std::list<floated_box> m_floats_left;
13 std::list<floated_box> m_floats_right;
14 int_int_cache m_cache_line_left;
15 int_int_cache m_cache_line_right;
16 int m_current_top;
17 int m_current_left;
19 public:
20 formatting_context() : m_current_top(0), m_current_left(0) {}
22 void push_position(int x, int y)
24 m_current_left += x;
25 m_current_top += y;
27 void pop_position(int x, int y)
29 m_current_left -= x;
30 m_current_top -= y;
33 void add_float(const std::shared_ptr<render_item> &el, int min_width, int context);
34 void clear_floats(int context);
35 int find_next_line_top( int top, int width, int def_right );
36 int get_floats_height(element_float el_float = float_none) const;
37 int get_left_floats_height() const;
38 int get_right_floats_height() const;
39 int get_line_left( int y );
40 void get_line_left_right( int y, int def_right, int& ln_left, int& ln_right )
42 ln_left = get_line_left(y);
43 ln_right = get_line_right(y, def_right);
45 int get_line_right( int y, int def_right );
46 int get_cleared_top(const std::shared_ptr<render_item> &el, int line_top) const;
47 void update_floats(int dy, const std::shared_ptr<render_item> &parent);
48 void apply_relative_shift(const containing_block_context &containing_block_size);
49 int find_min_left(int y, int context_idx);
50 int find_min_right(int y, int right, int context_idx);
54 #endif //LITEHTML_FLOATS_HOLDER_H