Photon 1.0.0
|
Namespaces | |
namespace | num_cvt |
Typedefs | |
using | length_vector = vector< css_length > |
using | keep_whitespace_fn = std::function< bool(const css_token &left, const css_token &right)> |
using | size_vector = std::vector< css_size > |
using | css_token_vector = vector< css_token > |
typedef std::map< string_id, property_value > | props_map |
using | uint_ptr = std::uintptr_t |
using | string_map = std::map< string, string > |
using | elements_list = std::list< std::shared_ptr< element > > |
using | int_vector = std::vector< int > |
using | string_vector = std::vector< string > |
using | byte = unsigned char |
using | ucode_t = unsigned int |
using | fonts_map = std::map< string, font_item > |
using | parse_fn = std::function< bool(const css_token_vector &tokens, int &index)> |
Functions | |
bool | is_ascii_codepoint (char c) |
bool | is_url_reserved_codepoint (char c) |
bool | is_url_scheme_codepoint (char c) |
void | remove_whitespace (css_token_vector &tokens, keep_whitespace_fn keep_whitespace=0) |
template<class Input > | |
css_token_vector | normalize (Input input, int options=0, keep_whitespace_fn keep_whitespace=0) |
vector< css_token_vector > | parse_comma_separated_list (const css_token_vector &tokens) |
bool | is_declaration_value (const css_token_vector &tokens, int index=0) |
bool | is_any_value (const css_token_vector &tokens) |
bool | skip_whitespace (const css_token_vector &tokens, int &index) |
bool | operator> (const css_selector &v1, const css_selector &v2) |
bool | operator< (const css_selector &v1, const css_selector &v2) |
bool | operator> (const css_selector::ptr &v1, const css_selector::ptr &v2) |
bool | operator< (const css_selector::ptr &v1, const css_selector::ptr &v2) |
css_selector::vector | parse_selector_list (const css_token_vector &tokens, int options, document_mode mode) |
string | get_repr (const css_token_vector &tokens, int index=0, int count=-1, bool insert_spaces=false) |
void | css_parse_error (string msg) |
css_token_vector | tokenize (const string &str) |
encoding | bom_sniff (const string &str) |
void | encoding_sniffing_algorithm (estring &str) |
encoding | get_encoding (string label) |
encoding | extract_encoding_from_meta_element (string str) |
void | decode (string input, encoding coding, string &output) |
string | decode (string input, encoding coding) |
bool | parse_gradient (const css_token &token, gradient &gradient, document_container *container) |
string & | trim (string &s, const string &chars_to_trim=whitespace) |
string | trim (const string &s, const string &chars_to_trim=whitespace) |
string & | lcase (string &s) |
int | value_index (const string &val, const string &strings, int defValue=-1, char delim=';') |
string | index_value (int index, const string &strings, char delim=';') |
bool | value_in_list (const string &val, const string &strings, char delim=';') |
string::size_type | find_close_bracket (const string &s, string::size_type off, char open_b='(', char close_b=')') |
void | split_string (const string &str, string_vector &tokens, const string &delims=whitespace, const string &delims_preserve="", const string "e="\"") |
string_vector | split_string (const string &str, const string &delims=whitespace, const string &delims_preserve="", const string "e="\"") |
void | join_string (string &str, const string_vector &tokens, const string &delims) |
double | t_strtod (const char *string, char **endPtr=nullptr) |
string | get_escaped_string (const string &in_str) |
template<typename X , typename A > | |
bool | is_one_of (X x, A a) |
template<typename X , typename A , typename... AA> | |
bool | is_one_of (X x, A a, AA... aa) |
template<class T > | |
const T & | at (const vector< T > &vec, int index) |
template<class Map , class Key > | |
auto | at (const Map &map, Key key) |
template<typename T > | |
vector< T > | slice (const vector< T > &vec, int index, int count=-1) |
template<class C > | |
void | remove (C &vec, int index, int count=1) |
template<class T > | |
void | insert (vector< T > &vec, int index, const vector< T > &x) |
template<class T > | |
vector< T > & | operator+= (vector< T > &vec, const vector< T > &x) |
template<class C , class T > | |
bool | contains (const C &coll, const T &item) |
bool | contains (const string &str, const string &substr) |
template<class C > | |
void | sort (C &coll) |
int | t_strcasecmp (const char *s1, const char *s2) |
int | t_strncasecmp (const char *s1, const char *s2, size_t n) |
bool | equal_i (const string &s1, const string &s2) |
bool | match (const string &str, int index, const string &substr) |
bool | match_i (const string &str, int index, const string &substr) |
bool | is_number (const string &string, bool allow_dot=true) |
bool | is_whitespace (int c) |
int | t_isalpha (int c) |
int | t_tolower (int c) |
int | lowcase (int c) |
string | lowcase (string str) |
int | t_isdigit (int c) |
bool | is_hex_digit (int ch) |
int | digit_value (int ch) |
bool | is_surrogate (int ch) |
int | round_f (float val) |
int | round_d (double val) |
float | t_strtof (const string &str, char **endPtr=nullptr) |
int | baseline_align (int line_height, int line_base_line, int height, int baseline) |
bool | html_parse_integer (const string &str, int &val) |
bool | html_parse_non_negative_integer (const string &str, int &val) |
bool | html_parse_dimension_value (const string &str, float &val, html_dimension_type &type) |
bool | html_parse_nonzero_dimension_value (const string &str, float &val, html_dimension_type &type) |
trilean | operator! (trilean x) |
trilean | operator&& (trilean a, trilean b) |
trilean | operator|| (trilean a, trilean b) |
media_query_list | parse_media_query_list (const css_token_vector &tokens, shared_ptr< document > doc) |
media_query_list | parse_media_query_list (const string &str, shared_ptr< document > doc) |
STRING_ID (_a_, _abbr_, _acronym_, _address_, _applet_, _area_, _article_, _aside_, _audio_, _b_, _base_, _basefont_, _bdi_, _bdo_, _big_, _blockquote_, _body_, _br_, _button_, _canvas_, _caption_, _center_, _cite_, _code_, _col_, _colgroup_, _data_, _datalist_, _dd_, _del_, _details_, _dfn_, _dialog_, _dir_, _div_, _dl_, _dt_, _em_, _embed_, _fieldset_, _figcaption_, _figure_, _footer_, _form_, _frame_, _frameset_, _h1_, _h2_, _h3_, _h4_, _h5_, _h6_, _head_, _header_, _hr_, _html_, _i_, _iframe_, _img_, _input_, _ins_, _kbd_, _label_, _legend_, _li_, _link_, _main_, _map_, _mark_, _meta_, _meter_, _nav_, _noframes_, _noscript_, _object_, _ol_, _optgroup_, _option_, _output_, _p_, _param_, _picture_, _pre_, _progress_, _q_, _rp_, _rt_, _ruby_, _s_, _samp_, _script_, _section_, _select_, _small_, _source_, _span_, _strike_, _strong_, _style_, _sub_, _summary_, _sup_, _svg_, _table_, _tbody_, _td_, _template_, _textarea_, _tfoot_, _th_, _thead_, _time_, _title_, _tr_, _track_, _tt_, _u_, _ul_, _var_, _video_, _wbr_, __tag_before_, __tag_after_, _before_, _after_, _root_, _only_child_, _only_of_type_, _first_child_, _first_of_type_, _last_child_, _last_of_type_, _nth_child_, _nth_of_type_, _nth_last_child_, _nth_last_of_type_, _is_, _not_, _lang_, _active_, _hover_, _background_, _background_color_, _background_image_, _background_image_baseurl_, _background_repeat_, _background_origin_, _background_clip_, _background_attachment_, _background_size_, _background_position_, _background_position_x_, _background_position_y_, _background_gradient_, _border_, _border_width_, _border_style_, _border_color_, _border_spacing_, __litehtml_border_spacing_x_, __litehtml_border_spacing_y_, _border_top_, _border_right_, _border_bottom_, _border_left_, _border_top_style_, _border_right_style_, _border_bottom_style_, _border_left_style_, _border_top_width_, _border_right_width_, _border_bottom_width_, _border_left_width_, _border_top_color_, _border_right_color_, _border_bottom_color_, _border_left_color_, _border_radius_, _border_radius_x_, _border_radius_y_, _border_top_left_radius_, _border_top_right_radius_, _border_bottom_right_radius_, _border_bottom_left_radius_, _border_top_left_radius_x_, _border_top_right_radius_x_, _border_bottom_right_radius_x_, _border_bottom_left_radius_x_, _border_top_left_radius_y_, _border_top_right_radius_y_, _border_bottom_right_radius_y_, _border_bottom_left_radius_y_, _list_style_, _list_style_type_, _list_style_position_, _list_style_image_, _list_style_image_baseurl_, _margin_, _margin_top_, _margin_right_, _margin_bottom_, _margin_left_, _padding_, _padding_top_, _padding_right_, _padding_bottom_, _padding_left_, _font_, _font_family_, _font_style_, _font_variant_, _font_weight_, _font_size_, _line_height_, _text_decoration_, _white_space_, _text_align_, _vertical_align_, _color_, _width_, _height_, _min_width_, _min_height_, _max_width_, _max_height_, _position_, _overflow_, _display_, _visibility_, _appearance_, _box_sizing_, _z_index_, _float_, _clear_, _text_indent_, _top_, _right_, _bottom_, _left_, _cursor_, _content_, _border_collapse_, _text_transform_, _flex_, _flex_flow_, _flex_direction_, _flex_wrap_, _justify_content_, _align_items_, _align_content_, _align_self_, _flex_grow_, _flex_shrink_, _flex_basis_, _caption_side_, _order_, _counter_reset_, _counter_increment_, _deg_, _grad_, _rad_, _turn_, _initial_, _auto_, _none_, _linear_gradient_, _repeating_linear_gradient_, _radial_gradient_, _repeating_radial_gradient_, _conic_gradient_, _repeating_conic_gradient_, _charset_, _layer_, _import_, _media_, _and_, _or_, _boolean_, _plain_, _range_, _discrete_, _integer_, _length_, _resolution_, _ratio_, _keyword_, _orientation_, _portrait_, _landscape_, _device_width_, _device_height_, _aspect_ratio_, _device_aspect_ratio_, _color_index_, _monochrome_,) extern const string_id empty_id | |
string_id | _id (const string &str) |
const string & | _s (string_id id) |
bool | parse_url (const css_token &token, string &url) |
bool | parse_length (const css_token &tok, css_length &length, int options, string keywords="") |
bool | parse_angle (const css_token &tok, float &angle, bool percents_allowed=false) |
bool | parse_bg_position (const css_token_vector &tokens, int &index, css_length &x, css_length &y, bool convert_keywords_to_percents) |
template<typename Enum > | |
bool | parse_keyword (const css_token &tok, Enum &val, string keywords, int first_keyword_value=0) |
std::basic_ostream< tstring_view::value_type > & | operator<< (std::basic_ostream< tstring_view::value_type > &, tstring_view str) |
url | resolve (const url &base, const url &reference) |
bool | is_url_path_absolute (const string &path) |
string | url_path_directory_name (const string &path) |
string | url_path_base_name (const string &path) |
string | url_path_append (const string &base, const string &path) |
string | url_path_resolve (const string &base, const string &path) |
void | append_char (string &str, char32_t ch) |
char32_t | read_utf8_char (const string &str, int &index) |
void | prev_utf8_char (const string &str, int &index) |
bool | parse_color (const css_token &token, web_color &color, document_container *container) |
float | normalize_length (css_length length, float line_len) |
void | filter_code_points (string &input) |
void | componentize (css_token_vector &tokens) |
template<> | |
css_token_vector | normalize (css_token_vector input, int options, keep_whitespace_fn keep_whitespace) |
template<> | |
css_token_vector | normalize (string input, int options, keep_whitespace_fn keep_whitespace) |
char | mirror (char c) |
void | trim_whitespace (css_token_vector &tokens) |
string | parse_ns_prefix (const css_token_vector &tokens, int &index) |
wq_name | parse_wq_name (const css_token_vector &tokens, int &index) |
wq_name | parse_type_selector (const css_token_vector &tokens, int &index) |
bool | parse_attr_matcher (const css_token_vector &tokens, int &index, attr_matcher &matcher) |
css_attribute_selector | parse_attribute_selector (const css_token &block) |
bool | to_int (string s, int &number) |
an_b | parse_an_b (string s) |
int | find_of_keyword (const css_token_vector &tokens) |
css_attribute_selector | parse_nth_child (const css_token &token, bool of_keyword, document_mode mode) |
css_attribute_selector | parse_function_pseudo_class (const css_token &token, document_mode mode) |
bool | is_supported_simple_pseudo_class (const string &name) |
css_attribute_selector | parse_pseudo_class (const css_token_vector &tokens, int &index, document_mode mode) |
css_attribute_selector | parse_subclass_selector (const css_token_vector &tokens, int &index, document_mode mode) |
bool | is_supported_simple_pseudo_element (const string &name) |
css_attribute_selector | parse_pseudo_element (const css_token_vector &tokens, int &index) |
css_element_selector::ptr | parse_compound_selector (const css_token_vector &tokens, int &index, document_mode mode) |
int | parse_combinator (const css_token_vector &tokens, int &index) |
css_selector::ptr | parse_complex_selector (const css_token_vector &tokens, document_mode mode) |
bool | has_selector (const css_selector &selector, attr_select_type type, const string &name="") |
encoding | adjust_meta_encoding (encoding meta_encoding, encoding current_encoding) |
encoding | get_meta_encoding (GumboNode *root) |
decoder::ptr | get_decoder (encoding _encoding) |
bool | end_condition (int index) |
void | increment (int &index, const string &str) |
bool | prescan_get_attribute (const string &str, inout int &index, out string &name, out string &value) |
encoding | prescan_a_byte_stream_to_determine_its_encoding (const string &str) |
encoding | get_xml_encoding (const string &str) |
encoding | prescan_for_encoding (const string &str) |
bool | parse_linear_gradient_direction (const css_token_vector &tokens, int &index, float &angle, int &side) |
bool | parse_linear_gradient_direction_and_interpolation (const css_token_vector &tokens, gradient &gradient) |
bool | parse_color_interpolation_method (const css_token_vector &tokens, int &index, color_space_t &color_space, hue_interpolation_t &hue_interpolation) |
bool | parse_gradient_position (const css_token_vector &tokens, int &index, gradient &gradient) |
bool | parse_radial_gradient_shape_size_position_interpolation (const css_token_vector &tokens, gradient &result) |
bool | parse_conic_gradient_angle_position_interpolation (const css_token_vector &tokens, gradient &gradient) |
template<class T > | |
bool | parse_color_stop_list (const vector< css_token_vector > &list, gradient &grad, document_container *container) |
parse_fn | opt (parse_fn a) |
parse_fn | seq (parse_fn a, parse_fn b) |
parse_fn | oror (parse_fn a, parse_fn b) |
parse_fn | operator""_x (const char *str, size_t len) |
bool | end (const css_token_vector &tokens, int index) |
bool | parse_lenang (const css_token &tok, css_length &length) |
bool | parse_lenang (const css_token &tok, float &angle) |
template<class T > | |
bool | parse_color_hint (const css_token_vector &tokens, vector< gradient::color_stop > &color_stops) |
template<class T > | |
bool | parse_color_stop (const css_token_vector &tokens, vector< gradient::color_stop > &color_stops, document_container *container) |
bool | parse_conic_angle_position (const css_token_vector &tokens, int &index, gradient &gradient) |
bool | parse_radial_size (const css_token_vector &tokens, int &index, gradient &gradient) |
template<class T , class TT > | |
bool | operator/ (const T &x, const TT &xx) |
bool | eval_op (float x, short op, float value) |
bool | parse_media_query (const css_token_vector &tokens, media_query &mquery, document::ptr doc) |
media_query_list | parse_media_query_list (const css_token_vector &_tokens, document::ptr doc) |
bool | parse_media_condition (const css_token_vector &tokens, int &index, bool or_allowed, media_condition &condition, document::ptr doc) |
bool | parse_media_in_parens (const css_token &token, media_in_parens &media_in_parens, document::ptr doc) |
bool | parse_media_feature (const css_token &token, media_feature &media_feature, document::ptr doc) |
bool | parse_mf_value (const css_token_vector &tokens, int &index, css_token val[2]) |
bool | parse_mf_range (const css_token_vector &tokens, media_feature &media_feature, document::ptr doc) |
bool | convert_units (mf_info mfi, css_token val[2], document::ptr doc) |
short | mirror (short op) |
bool | parse_bg_image (const css_token &token, image &bg_image, document_container *container) |
bool | parse_bg_position_size (const css_token_vector &tokens, int &index, css_length &x, css_length &y, css_size &size) |
bool | parse_bg_size (const css_token_vector &tokens, int &index, css_size &size) |
bool | parse_two_lengths (const css_token_vector &tokens, css_length len[2], int options) |
template<class T , class... Args> | |
int | parse_1234_values (const css_token_vector &tokens, T result[4], bool(*func)(const css_token &, T &, Args...), Args... args) |
int | parse_1234_lengths (const css_token_vector &tokens, css_length len[4], int options, string keywords="") |
bool | parse_border_width (const css_token &tok, css_length &width) |
bool | parse_font_family (const css_token_vector &tokens, string &font_family) |
bool | parse_font_weight (const css_token &tok, css_length &weight) |
bool | has_var (const css_token_vector &tokens) |
bool | parse_border_helper (const css_token_vector &tokens, document_container *container, css_length &width, border_style &style, web_color &color) |
bool | is_one_of_predef (const css_length &x, int idx1, int idx2) |
bool | parse_font_style_variant_weight (const css_token_vector &tokens, int &index, int &style, int &variant, css_length &weight) |
bool | is_custom_ident (const css_token &tok) |
bool | check_var_syntax (const css_token_vector &args) |
bool | subst_var (css_token_vector &tokens, const html_tag *el, std::set< string_id > &used_vars) |
void | subst_vars_ (string_id name, css_token_vector &tokens, const html_tag *el) |
bool | parse_hash_color (const css_token &tok, web_color &color) |
float | clamp (float x, float min, float max) |
bool | parse_modern_syntax (const css_token_vector &tokens, bool is_hsl, css_length &x, css_length &y, css_length &z, css_length &a) |
byte | calc_percent_and_clamp (const css_length &val, float max=255) |
bool | parse_rgb_func (const css_token &tok, web_color &color) |
void | hsl_to_rgb (float hue, float sat, float light, float &r, float &g, float &b) |
bool | parse_hsl_func (const css_token &tok, web_color &color) |
bool | parse_func_color (const css_token &tok, web_color &color) |
string | resolve_name (const string &name, document_container *container) |
bool | parse_name_color (const css_token &tok, web_color &color, document_container *container) |
Variables | ||
const string | whitespace = " \n\r\t\f" | |
const auto | is_letter = t_isalpha | |
const auto | is_digit = t_isdigit | |
const char *const | master_css | |
const string_id | star_id = _id("*") | |
const unsigned int | font_decoration_none = 0x00 | |
const unsigned int | font_decoration_underline = 0x01 | |
const unsigned int | font_decoration_linethrough = 0x02 | |
const unsigned int | font_decoration_overline = 0x04 | |
const float | border_width_thin_value = 1 | |
const float | border_width_medium_value = 3 | |
const float | border_width_thick_value = 5 | |
const float | border_width_values [] = { border_width_thin_value, border_width_medium_value, border_width_thick_value } | |
const float | background_position_percentages [] = {0, 100, 0, 100, 50} | |
const char *const | split_delims_spaces = " \t\r\n\f\v" | |
const char *const | void_elements = "area;base;br;col;command;embed;hr;img;input;keygen;link;meta;param;source;track;wbr" | |
struct { | ||
const char * litehtml::name | ||
encoding litehtml::coding | ||
} | labels [] | |
const size_t | EOL = string::npos | |
const float | pi = 3.14159265f | |
std::map< string, mf_info > | supported_media_features | |
const string_id | empty_id = _id("") | |
std::map< string_id, vector< string_id > > | shorthands | |
def_color | g_def_colors [] | |
using litehtml::byte = typedef unsigned char |
using litehtml::css_token_vector = typedef vector<css_token> |
using litehtml::elements_list = typedef std::list<std::shared_ptr<element> > |
using litehtml::fonts_map = typedef std::map<string, font_item> |
using litehtml::int_vector = typedef std::vector<int> |
using litehtml::keep_whitespace_fn = typedef std::function<bool (const css_token& left, const css_token& right)> |
using litehtml::length_vector = typedef vector<css_length> |
using litehtml::parse_fn = typedef std::function<bool(const css_token_vector& tokens, int& index)> |
typedef std::map<string_id, property_value> litehtml::props_map |
using litehtml::size_vector = typedef std::vector<css_size> |
using litehtml::string_map = typedef std::map<string, string> |
using litehtml::string_vector = typedef std::vector<string> |
using litehtml::ucode_t = typedef unsigned int |
using litehtml::uint_ptr = typedef std::uintptr_t |
enum litehtml::appearance |
enum litehtml::attr_matcher : char |
enum litehtml::box_sizing |
|
strong |
enum litehtml::css_units : byte |
enum litehtml::draw_flag |
|
strong |
|
strong |
enum litehtml::flex_basis |
enum litehtml::flex_wrap |
enum litehtml::font_size |
enum litehtml::font_style |
enum litehtml::media_type |
enum litehtml::overflow |
enum litehtml::text_align |
enum litehtml::trilean |
enum litehtml::visibility |
string_id litehtml::_id | ( | const string & | str | ) |
const string & litehtml::_s | ( | string_id | id | ) |
void litehtml::append_char | ( | string & | str, |
char32_t | ch | ||
) |
auto litehtml::at | ( | const Map & | map, |
Key | key | ||
) |
const T & litehtml::at | ( | const vector< T > & | vec, |
int | index | ||
) |
|
inline |
encoding litehtml::bom_sniff | ( | const string & | str | ) |
byte litehtml::calc_percent_and_clamp | ( | const css_length & | val, |
float | max = 255 |
||
) |
bool litehtml::check_var_syntax | ( | const css_token_vector & | args | ) |
float litehtml::clamp | ( | float | x, |
float | min, | ||
float | max | ||
) |
void litehtml::componentize | ( | css_token_vector & | tokens | ) |
bool litehtml::contains | ( | const C & | coll, |
const T & | item | ||
) |
|
inline |
bool litehtml::convert_units | ( | mf_info | mfi, |
css_token | val[2], | ||
document::ptr | doc | ||
) |
void litehtml::css_parse_error | ( | string | msg | ) |
string litehtml::decode | ( | string | input, |
encoding | coding | ||
) |
void litehtml::decode | ( | string | input, |
encoding | coding, | ||
string & | output | ||
) |
|
inline |
void litehtml::encoding_sniffing_algorithm | ( | estring & | str | ) |
bool litehtml::end | ( | const css_token_vector & | tokens, |
int | index | ||
) |
bool litehtml::end_condition | ( | int | index | ) |
|
inline |
bool litehtml::eval_op | ( | float | x, |
short | op, | ||
float | value | ||
) |
encoding litehtml::extract_encoding_from_meta_element | ( | string | str | ) |
void litehtml::filter_code_points | ( | string & | input | ) |
string::size_type litehtml::find_close_bracket | ( | const string & | s, |
string::size_type | off, | ||
char | open_b = '(' , |
||
char | close_b = ')' |
||
) |
int litehtml::find_of_keyword | ( | const css_token_vector & | tokens | ) |
decoder::ptr litehtml::get_decoder | ( | encoding | _encoding | ) |
encoding litehtml::get_encoding | ( | string | label | ) |
string litehtml::get_escaped_string | ( | const string & | in_str | ) |
string litehtml::get_repr | ( | const css_token_vector & | tokens, |
int | index = 0 , |
||
int | count = -1 , |
||
bool | insert_spaces = false |
||
) |
encoding litehtml::get_xml_encoding | ( | const string & | str | ) |
bool litehtml::has_selector | ( | const css_selector & | selector, |
attr_select_type | type, | ||
const string & | name = "" |
||
) |
bool litehtml::has_var | ( | const css_token_vector & | tokens | ) |
void litehtml::hsl_to_rgb | ( | float | hue, |
float | sat, | ||
float | light, | ||
float & | r, | ||
float & | g, | ||
float & | b | ||
) |
bool litehtml::html_parse_dimension_value | ( | const string & | str, |
float & | val, | ||
html_dimension_type & | type | ||
) |
bool litehtml::html_parse_integer | ( | const string & | str, |
int & | val | ||
) |
bool litehtml::html_parse_non_negative_integer | ( | const string & | str, |
int & | val | ||
) |
bool litehtml::html_parse_nonzero_dimension_value | ( | const string & | str, |
float & | val, | ||
html_dimension_type & | type | ||
) |
void litehtml::increment | ( | int & | index, |
const string & | str | ||
) |
string litehtml::index_value | ( | int | index, |
const string & | strings, | ||
char | delim = ';' |
||
) |
void litehtml::insert | ( | vector< T > & | vec, |
int | index, | ||
const vector< T > & | x | ||
) |
bool litehtml::is_any_value | ( | const css_token_vector & | tokens | ) |
bool litehtml::is_ascii_codepoint | ( | char | c | ) |
bool litehtml::is_custom_ident | ( | const css_token & | tok | ) |
bool litehtml::is_declaration_value | ( | const css_token_vector & | tokens, |
int | index = 0 |
||
) |
|
inline |
bool litehtml::is_number | ( | const string & | string, |
bool | allow_dot = true |
||
) |
bool litehtml::is_one_of | ( | X | x, |
A | a | ||
) |
bool litehtml::is_one_of | ( | X | x, |
A | a, | ||
AA... | aa | ||
) |
bool litehtml::is_one_of_predef | ( | const css_length & | x, |
int | idx1, | ||
int | idx2 | ||
) |
bool litehtml::is_supported_simple_pseudo_class | ( | const string & | name | ) |
bool litehtml::is_supported_simple_pseudo_element | ( | const string & | name | ) |
|
inline |
bool litehtml::is_url_path_absolute | ( | const string & | path | ) |
bool litehtml::is_url_reserved_codepoint | ( | char | c | ) |
bool litehtml::is_url_scheme_codepoint | ( | char | c | ) |
|
inline |
void litehtml::join_string | ( | string & | str, |
const string_vector & | tokens, | ||
const string & | delims | ||
) |
string & litehtml::lcase | ( | string & | s | ) |
|
inline |
|
inline |
|
inline |
|
inline |
char litehtml::mirror | ( | char | c | ) |
short litehtml::mirror | ( | short | op | ) |
css_token_vector litehtml::normalize | ( | css_token_vector | input, |
int | options, | ||
keep_whitespace_fn | keep_whitespace | ||
) |
css_token_vector litehtml::normalize | ( | Input | input, |
int | options = 0 , |
||
keep_whitespace_fn | keep_whitespace = 0 |
||
) |
css_token_vector litehtml::normalize | ( | string | input, |
int | options, | ||
keep_whitespace_fn | keep_whitespace | ||
) |
float litehtml::normalize_length | ( | css_length | length, |
float | line_len | ||
) |
parse_fn litehtml::operator""_x | ( | const char * | str, |
size_t | len | ||
) |
vector< T > & litehtml::operator+= | ( | vector< T > & | vec, |
const vector< T > & | x | ||
) |
bool litehtml::operator/ | ( | const T & | x, |
const TT & | xx | ||
) |
|
inline |
|
inline |
std::basic_ostream< tstring_view::value_type > & litehtml::operator<< | ( | std::basic_ostream< tstring_view::value_type > & | os, |
tstring_view | str | ||
) |
|
inline |
|
inline |
int litehtml::parse_1234_lengths | ( | const css_token_vector & | tokens, |
css_length | len[4], | ||
int | options, | ||
string | keywords = "" |
||
) |
int litehtml::parse_1234_values | ( | const css_token_vector & | tokens, |
T | result[4], | ||
bool(*)(const css_token &, T &, Args...) | func, | ||
Args... | args | ||
) |
an_b litehtml::parse_an_b | ( | string | s | ) |
bool litehtml::parse_angle | ( | const css_token & | tok, |
float & | angle, | ||
bool | percents_allowed = false |
||
) |
bool litehtml::parse_attr_matcher | ( | const css_token_vector & | tokens, |
int & | index, | ||
attr_matcher & | matcher | ||
) |
css_attribute_selector litehtml::parse_attribute_selector | ( | const css_token & | block | ) |
bool litehtml::parse_bg_image | ( | const css_token & | token, |
image & | bg_image, | ||
document_container * | container | ||
) |
bool litehtml::parse_bg_position | ( | const css_token_vector & | tokens, |
int & | index, | ||
css_length & | x, | ||
css_length & | y, | ||
bool | convert_keywords_to_percents | ||
) |
bool litehtml::parse_bg_position_size | ( | const css_token_vector & | tokens, |
int & | index, | ||
css_length & | x, | ||
css_length & | y, | ||
css_size & | size | ||
) |
bool litehtml::parse_bg_size | ( | const css_token_vector & | tokens, |
int & | index, | ||
css_size & | size | ||
) |
bool litehtml::parse_border_helper | ( | const css_token_vector & | tokens, |
document_container * | container, | ||
css_length & | width, | ||
border_style & | style, | ||
web_color & | color | ||
) |
bool litehtml::parse_border_width | ( | const css_token & | tok, |
css_length & | width | ||
) |
bool litehtml::parse_color | ( | const css_token & | token, |
web_color & | color, | ||
document_container * | container | ||
) |
bool litehtml::parse_color_hint | ( | const css_token_vector & | tokens, |
vector< gradient::color_stop > & | color_stops | ||
) |
bool litehtml::parse_color_interpolation_method | ( | const css_token_vector & | tokens, |
int & | index, | ||
color_space_t & | color_space, | ||
hue_interpolation_t & | hue_interpolation | ||
) |
bool litehtml::parse_color_stop | ( | const css_token_vector & | tokens, |
vector< gradient::color_stop > & | color_stops, | ||
document_container * | container | ||
) |
bool litehtml::parse_color_stop_list | ( | const vector< css_token_vector > & | list, |
gradient & | grad, | ||
document_container * | container | ||
) |
int litehtml::parse_combinator | ( | const css_token_vector & | tokens, |
int & | index | ||
) |
vector< css_token_vector > litehtml::parse_comma_separated_list | ( | const css_token_vector & | tokens | ) |
css_selector::ptr litehtml::parse_complex_selector | ( | const css_token_vector & | tokens, |
document_mode | mode | ||
) |
css_element_selector::ptr litehtml::parse_compound_selector | ( | const css_token_vector & | tokens, |
int & | index, | ||
document_mode | mode | ||
) |
bool litehtml::parse_conic_angle_position | ( | const css_token_vector & | tokens, |
int & | index, | ||
gradient & | gradient | ||
) |
bool litehtml::parse_conic_gradient_angle_position_interpolation | ( | const css_token_vector & | tokens, |
gradient & | gradient | ||
) |
bool litehtml::parse_font_family | ( | const css_token_vector & | tokens, |
string & | font_family | ||
) |
bool litehtml::parse_font_style_variant_weight | ( | const css_token_vector & | tokens, |
int & | index, | ||
int & | style, | ||
int & | variant, | ||
css_length & | weight | ||
) |
bool litehtml::parse_font_weight | ( | const css_token & | tok, |
css_length & | weight | ||
) |
css_attribute_selector litehtml::parse_function_pseudo_class | ( | const css_token & | token, |
document_mode | mode | ||
) |
bool litehtml::parse_gradient | ( | const css_token & | token, |
gradient & | gradient, | ||
document_container * | container | ||
) |
bool litehtml::parse_gradient_position | ( | const css_token_vector & | tokens, |
int & | index, | ||
gradient & | gradient | ||
) |
bool litehtml::parse_keyword | ( | const css_token & | tok, |
Enum & | val, | ||
string | keywords, | ||
int | first_keyword_value = 0 |
||
) |
bool litehtml::parse_lenang | ( | const css_token & | tok, |
css_length & | length | ||
) |
bool litehtml::parse_lenang | ( | const css_token & | tok, |
float & | angle | ||
) |
bool litehtml::parse_length | ( | const css_token & | tok, |
css_length & | length, | ||
int | options, | ||
string | keywords = "" |
||
) |
bool litehtml::parse_linear_gradient_direction | ( | const css_token_vector & | tokens, |
int & | index, | ||
float & | angle, | ||
int & | side | ||
) |
bool litehtml::parse_linear_gradient_direction_and_interpolation | ( | const css_token_vector & | tokens, |
gradient & | gradient | ||
) |
bool litehtml::parse_media_condition | ( | const css_token_vector & | tokens, |
int & | index, | ||
bool | or_allowed, | ||
media_condition & | condition, | ||
document::ptr | doc | ||
) |
bool litehtml::parse_media_feature | ( | const css_token & | token, |
media_feature & | media_feature, | ||
document::ptr | doc | ||
) |
bool litehtml::parse_media_in_parens | ( | const css_token & | token, |
media_in_parens & | media_in_parens, | ||
document::ptr | doc | ||
) |
bool litehtml::parse_media_query | ( | const css_token_vector & | tokens, |
media_query & | mquery, | ||
document::ptr | doc | ||
) |
media_query_list litehtml::parse_media_query_list | ( | const css_token_vector & | _tokens, |
document::ptr | doc | ||
) |
media_query_list litehtml::parse_media_query_list | ( | const css_token_vector & | tokens, |
shared_ptr< document > | doc | ||
) |
media_query_list litehtml::parse_media_query_list | ( | const string & | str, |
shared_ptr< document > | doc | ||
) |
bool litehtml::parse_mf_range | ( | const css_token_vector & | tokens, |
media_feature & | media_feature, | ||
document::ptr | doc | ||
) |
bool litehtml::parse_mf_value | ( | const css_token_vector & | tokens, |
int & | index, | ||
css_token | val[2] | ||
) |
bool litehtml::parse_modern_syntax | ( | const css_token_vector & | tokens, |
bool | is_hsl, | ||
css_length & | x, | ||
css_length & | y, | ||
css_length & | z, | ||
css_length & | a | ||
) |
bool litehtml::parse_name_color | ( | const css_token & | tok, |
web_color & | color, | ||
document_container * | container | ||
) |
string litehtml::parse_ns_prefix | ( | const css_token_vector & | tokens, |
int & | index | ||
) |
css_attribute_selector litehtml::parse_nth_child | ( | const css_token & | token, |
bool | of_keyword, | ||
document_mode | mode | ||
) |
css_attribute_selector litehtml::parse_pseudo_class | ( | const css_token_vector & | tokens, |
int & | index, | ||
document_mode | mode | ||
) |
css_attribute_selector litehtml::parse_pseudo_element | ( | const css_token_vector & | tokens, |
int & | index | ||
) |
bool litehtml::parse_radial_gradient_shape_size_position_interpolation | ( | const css_token_vector & | tokens, |
gradient & | result | ||
) |
bool litehtml::parse_radial_size | ( | const css_token_vector & | tokens, |
int & | index, | ||
gradient & | gradient | ||
) |
css_selector::vector litehtml::parse_selector_list | ( | const css_token_vector & | tokens, |
int | options, | ||
document_mode | mode | ||
) |
css_attribute_selector litehtml::parse_subclass_selector | ( | const css_token_vector & | tokens, |
int & | index, | ||
document_mode | mode | ||
) |
bool litehtml::parse_two_lengths | ( | const css_token_vector & | tokens, |
css_length | len[2], | ||
int | options | ||
) |
wq_name litehtml::parse_type_selector | ( | const css_token_vector & | tokens, |
int & | index | ||
) |
bool litehtml::parse_url | ( | const css_token & | token, |
string & | url | ||
) |
wq_name litehtml::parse_wq_name | ( | const css_token_vector & | tokens, |
int & | index | ||
) |
encoding litehtml::prescan_a_byte_stream_to_determine_its_encoding | ( | const string & | str | ) |
encoding litehtml::prescan_for_encoding | ( | const string & | str | ) |
bool litehtml::prescan_get_attribute | ( | const string & | str, |
inout int & | index, | ||
out string & | name, | ||
out string & | value | ||
) |
void litehtml::prev_utf8_char | ( | const string & | str, |
int & | index | ||
) |
char32_t litehtml::read_utf8_char | ( | const string & | str, |
int & | index | ||
) |
void litehtml::remove | ( | C & | vec, |
int | index, | ||
int | count = 1 |
||
) |
void litehtml::remove_whitespace | ( | css_token_vector & | tokens, |
keep_whitespace_fn | keep_whitespace = 0 |
||
) |
string litehtml::resolve_name | ( | const string & | name, |
document_container * | container | ||
) |
|
inline |
|
inline |
bool litehtml::skip_whitespace | ( | const css_token_vector & | tokens, |
int & | index | ||
) |
vector< T > litehtml::slice | ( | const vector< T > & | vec, |
int | index, | ||
int | count = -1 |
||
) |
void litehtml::sort | ( | C & | coll | ) |
string_vector litehtml::split_string | ( | const string & | str, |
const string & | delims = whitespace , |
||
const string & | delims_preserve = "" , |
||
const string & | quote = "\"" |
||
) |
void litehtml::split_string | ( | const string & | str, |
string_vector & | tokens, | ||
const string & | delims = whitespace , |
||
const string & | delims_preserve = "" , |
||
const string & | quote = "\"" |
||
) |
litehtml::STRING_ID | ( | _a_ | , |
_abbr_ | , | ||
_acronym_ | , | ||
_address_ | , | ||
_applet_ | , | ||
_area_ | , | ||
_article_ | , | ||
_aside_ | , | ||
_audio_ | , | ||
_b_ | , | ||
_base_ | , | ||
_basefont_ | , | ||
_bdi_ | , | ||
_bdo_ | , | ||
_big_ | , | ||
_blockquote_ | , | ||
_body_ | , | ||
_br_ | , | ||
_button_ | , | ||
_canvas_ | , | ||
_caption_ | , | ||
_center_ | , | ||
_cite_ | , | ||
_code_ | , | ||
_col_ | , | ||
_colgroup_ | , | ||
_data_ | , | ||
_datalist_ | , | ||
_dd_ | , | ||
_del_ | , | ||
_details_ | , | ||
_dfn_ | , | ||
_dialog_ | , | ||
_dir_ | , | ||
_div_ | , | ||
_dl_ | , | ||
_dt_ | , | ||
_em_ | , | ||
_embed_ | , | ||
_fieldset_ | , | ||
_figcaption_ | , | ||
_figure_ | , | ||
_footer_ | , | ||
_form_ | , | ||
_frame_ | , | ||
_frameset_ | , | ||
_h1_ | , | ||
_h2_ | , | ||
_h3_ | , | ||
_h4_ | , | ||
_h5_ | , | ||
_h6_ | , | ||
_head_ | , | ||
_header_ | , | ||
_hr_ | , | ||
_html_ | , | ||
_i_ | , | ||
_iframe_ | , | ||
_img_ | , | ||
_input_ | , | ||
_ins_ | , | ||
_kbd_ | , | ||
_label_ | , | ||
_legend_ | , | ||
_li_ | , | ||
_link_ | , | ||
_main_ | , | ||
_map_ | , | ||
_mark_ | , | ||
_meta_ | , | ||
_meter_ | , | ||
_nav_ | , | ||
_noframes_ | , | ||
_noscript_ | , | ||
_object_ | , | ||
_ol_ | , | ||
_optgroup_ | , | ||
_option_ | , | ||
_output_ | , | ||
_p_ | , | ||
_param_ | , | ||
_picture_ | , | ||
_pre_ | , | ||
_progress_ | , | ||
_q_ | , | ||
_rp_ | , | ||
_rt_ | , | ||
_ruby_ | , | ||
_s_ | , | ||
_samp_ | , | ||
_script_ | , | ||
_section_ | , | ||
_select_ | , | ||
_small_ | , | ||
_source_ | , | ||
_span_ | , | ||
_strike_ | , | ||
_strong_ | , | ||
_style_ | , | ||
_sub_ | , | ||
_summary_ | , | ||
_sup_ | , | ||
_svg_ | , | ||
_table_ | , | ||
_tbody_ | , | ||
_td_ | , | ||
_template_ | , | ||
_textarea_ | , | ||
_tfoot_ | , | ||
_th_ | , | ||
_thead_ | , | ||
_time_ | , | ||
_title_ | , | ||
_tr_ | , | ||
_track_ | , | ||
_tt_ | , | ||
_u_ | , | ||
_ul_ | , | ||
_var_ | , | ||
_video_ | , | ||
_wbr_ | , | ||
__tag_before_ | , | ||
__tag_after_ | , | ||
_before_ | , | ||
_after_ | , | ||
_root_ | , | ||
_only_child_ | , | ||
_only_of_type_ | , | ||
_first_child_ | , | ||
_first_of_type_ | , | ||
_last_child_ | , | ||
_last_of_type_ | , | ||
_nth_child_ | , | ||
_nth_of_type_ | , | ||
_nth_last_child_ | , | ||
_nth_last_of_type_ | , | ||
_is_ | , | ||
_not_ | , | ||
_lang_ | , | ||
_active_ | , | ||
_hover_ | , | ||
_background_ | , | ||
_background_color_ | , | ||
_background_image_ | , | ||
_background_image_baseurl_ | , | ||
_background_repeat_ | , | ||
_background_origin_ | , | ||
_background_clip_ | , | ||
_background_attachment_ | , | ||
_background_size_ | , | ||
_background_position_ | , | ||
_background_position_x_ | , | ||
_background_position_y_ | , | ||
_background_gradient_ | , | ||
_border_ | , | ||
_border_width_ | , | ||
_border_style_ | , | ||
_border_color_ | , | ||
_border_spacing_ | , | ||
__litehtml_border_spacing_x_ | , | ||
__litehtml_border_spacing_y_ | , | ||
_border_top_ | , | ||
_border_right_ | , | ||
_border_bottom_ | , | ||
_border_left_ | , | ||
_border_top_style_ | , | ||
_border_right_style_ | , | ||
_border_bottom_style_ | , | ||
_border_left_style_ | , | ||
_border_top_width_ | , | ||
_border_right_width_ | , | ||
_border_bottom_width_ | , | ||
_border_left_width_ | , | ||
_border_top_color_ | , | ||
_border_right_color_ | , | ||
_border_bottom_color_ | , | ||
_border_left_color_ | , | ||
_border_radius_ | , | ||
_border_radius_x_ | , | ||
_border_radius_y_ | , | ||
_border_top_left_radius_ | , | ||
_border_top_right_radius_ | , | ||
_border_bottom_right_radius_ | , | ||
_border_bottom_left_radius_ | , | ||
_border_top_left_radius_x_ | , | ||
_border_top_right_radius_x_ | , | ||
_border_bottom_right_radius_x_ | , | ||
_border_bottom_left_radius_x_ | , | ||
_border_top_left_radius_y_ | , | ||
_border_top_right_radius_y_ | , | ||
_border_bottom_right_radius_y_ | , | ||
_border_bottom_left_radius_y_ | , | ||
_list_style_ | , | ||
_list_style_type_ | , | ||
_list_style_position_ | , | ||
_list_style_image_ | , | ||
_list_style_image_baseurl_ | , | ||
_margin_ | , | ||
_margin_top_ | , | ||
_margin_right_ | , | ||
_margin_bottom_ | , | ||
_margin_left_ | , | ||
_padding_ | , | ||
_padding_top_ | , | ||
_padding_right_ | , | ||
_padding_bottom_ | , | ||
_padding_left_ | , | ||
_font_ | , | ||
_font_family_ | , | ||
_font_style_ | , | ||
_font_variant_ | , | ||
_font_weight_ | , | ||
_font_size_ | , | ||
_line_height_ | , | ||
_text_decoration_ | , | ||
_white_space_ | , | ||
_text_align_ | , | ||
_vertical_align_ | , | ||
_color_ | , | ||
_width_ | , | ||
_height_ | , | ||
_min_width_ | , | ||
_min_height_ | , | ||
_max_width_ | , | ||
_max_height_ | , | ||
_position_ | , | ||
_overflow_ | , | ||
_display_ | , | ||
_visibility_ | , | ||
_appearance_ | , | ||
_box_sizing_ | , | ||
_z_index_ | , | ||
_float_ | , | ||
_clear_ | , | ||
_text_indent_ | , | ||
_top_ | , | ||
_right_ | , | ||
_bottom_ | , | ||
_left_ | , | ||
_cursor_ | , | ||
_content_ | , | ||
_border_collapse_ | , | ||
_text_transform_ | , | ||
_flex_ | , | ||
_flex_flow_ | , | ||
_flex_direction_ | , | ||
_flex_wrap_ | , | ||
_justify_content_ | , | ||
_align_items_ | , | ||
_align_content_ | , | ||
_align_self_ | , | ||
_flex_grow_ | , | ||
_flex_shrink_ | , | ||
_flex_basis_ | , | ||
_caption_side_ | , | ||
_order_ | , | ||
_counter_reset_ | , | ||
_counter_increment_ | , | ||
_deg_ | , | ||
_grad_ | , | ||
_rad_ | , | ||
_turn_ | , | ||
_initial_ | , | ||
_auto_ | , | ||
_none_ | , | ||
_linear_gradient_ | , | ||
_repeating_linear_gradient_ | , | ||
_radial_gradient_ | , | ||
_repeating_radial_gradient_ | , | ||
_conic_gradient_ | , | ||
_repeating_conic_gradient_ | , | ||
_charset_ | , | ||
_layer_ | , | ||
_import_ | , | ||
_media_ | , | ||
_and_ | , | ||
_or_ | , | ||
_boolean_ | , | ||
_plain_ | , | ||
_range_ | , | ||
_discrete_ | , | ||
_integer_ | , | ||
_length_ | , | ||
_resolution_ | , | ||
_ratio_ | , | ||
_keyword_ | , | ||
_orientation_ | , | ||
_portrait_ | , | ||
_landscape_ | , | ||
_device_width_ | , | ||
_device_height_ | , | ||
_aspect_ratio_ | , | ||
_device_aspect_ratio_ | , | ||
_color_index_ | , | ||
_monochrome_ | |||
) | const |
bool litehtml::subst_var | ( | css_token_vector & | tokens, |
const html_tag * | el, | ||
std::set< string_id > & | used_vars | ||
) |
void litehtml::subst_vars_ | ( | string_id | name, |
css_token_vector & | tokens, | ||
const html_tag * | el | ||
) |
|
inline |
|
inline |
int litehtml::t_strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
int litehtml::t_strncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | n | ||
) |
double litehtml::t_strtod | ( | const char * | string, |
char ** | endPtr = nullptr |
||
) |
|
inline |
|
inline |
bool litehtml::to_int | ( | string | s, |
int & | number | ||
) |
|
inline |
string litehtml::trim | ( | const string & | s, |
const string & | chars_to_trim = whitespace |
||
) |
string & litehtml::trim | ( | string & | s, |
const string & | chars_to_trim = whitespace |
||
) |
void litehtml::trim_whitespace | ( | css_token_vector & | tokens | ) |
string litehtml::url_path_append | ( | const string & | base, |
const string & | path | ||
) |
string litehtml::url_path_base_name | ( | const string & | path | ) |
string litehtml::url_path_directory_name | ( | const string & | path | ) |
string litehtml::url_path_resolve | ( | const string & | base, |
const string & | path | ||
) |
bool litehtml::value_in_list | ( | const string & | val, |
const string & | strings, | ||
char | delim = ';' |
||
) |
int litehtml::value_index | ( | const string & | val, |
const string & | strings, | ||
int | defValue = -1 , |
||
char | delim = ';' |
||
) |
const float litehtml::background_position_percentages[] = {0, 100, 0, 100, 50} |
const float litehtml::border_width_medium_value = 3 |
const float litehtml::border_width_thick_value = 5 |
const float litehtml::border_width_thin_value = 1 |
const float litehtml::border_width_values[] = { border_width_thin_value, border_width_medium_value, border_width_thick_value } |
encoding litehtml::coding |
const string_id litehtml::empty_id = _id("") |
const size_t litehtml::EOL = string::npos |
const unsigned int litehtml::font_decoration_linethrough = 0x02 |
const unsigned int litehtml::font_decoration_none = 0x00 |
const unsigned int litehtml::font_decoration_overline = 0x04 |
const unsigned int litehtml::font_decoration_underline = 0x01 |
def_color litehtml::g_def_colors[] |
const auto litehtml::is_digit = t_isdigit |
const auto litehtml::is_letter = t_isalpha |
struct { ... } litehtml::labels[] |
const char* const litehtml::master_css |
const char* litehtml::name |
const float litehtml::pi = 3.14159265f |
std::map<string_id, vector<string_id> > litehtml::shorthands |
const char* const litehtml::split_delims_spaces = " \t\r\n\f\v" |
const string_id litehtml::star_id = _id("*") |
std::map<string, mf_info> litehtml::supported_media_features |
const char* const litehtml::void_elements = "area;base;br;col;command;embed;hr;img;input;keygen;link;meta;param;source;track;wbr" |
const string litehtml::whitespace = " \n\r\t\f" |