Disable stack execution on plugins
[claws.git] / src / plugins / litehtml_viewer / litehtml / stylesheet.h
blob923853d768ef1b256994bb022d58288d982e1f4f
1 #ifndef LH_STYLESHEET_H
2 #define LH_STYLESHEET_H
4 #include "style.h"
5 #include "css_selector.h"
7 namespace litehtml
9 class document_container;
11 class css
13 css_selector::vector m_selectors;
14 public:
15 css() = default;
16 ~css() = default;
18 const css_selector::vector& selectors() const
20 return m_selectors;
23 void clear()
25 m_selectors.clear();
28 void parse_stylesheet(const char* str, const char* baseurl, const std::shared_ptr<document>& doc, const media_query_list::ptr& media);
29 void sort_selectors();
30 static void parse_css_url(const string& str, string& url);
32 private:
33 void parse_atrule(const string& text, const char* baseurl, const std::shared_ptr<document>& doc, const media_query_list::ptr& media);
34 void add_selector(const css_selector::ptr& selector);
35 bool parse_selectors(const string& txt, const style::ptr& styles, const media_query_list::ptr& media);
39 inline void litehtml::css::add_selector( const css_selector::ptr& selector )
41 selector->m_order = (int) m_selectors.size();
42 m_selectors.push_back(selector);
47 #endif // LH_STYLESHEET_H