ELinks 0.18.0
|
CSS style applier. More...
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "document/css/apply.h"
#include "document/css/css.h"
#include "document/css/parser.h"
#include "document/css/property.h"
#include "document/css/scanner.h"
#include "document/css/stylesheet.h"
#include "document/format.h"
#include "document/html/parser/parse.h"
#include "document/options.h"
#include "util/align.h"
#include "util/color.h"
#include "util/lists.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/string.h"
#include "document/html/internal.h"
Macros | |
#define | dbginfo(sel, type, base) |
#define | process_found_selector(sel, type, base) |
Typedefs | |
typedef void(* | css_applier_T) (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
Functions | |
static void | css_apply_color (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
static void | css_apply_background_color (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
static void | css_apply_display (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
static void | css_apply_font_attribute (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
static void | css_apply_list_style (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
static void | css_apply_text_align (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
static void | examine_element (struct html_context *html_context, struct css_selector *base, css_selector_type_T seltype, enum css_selector_relation rel, struct css_selector_set *selectors, struct html_element *element) |
This looks for a match in list of selectors. | |
struct css_selector * | get_css_selector_for_element (struct html_context *html_context, struct html_element *element, struct css_stylesheet *css, struct html_element list *html_stack) |
Gather all style information for the given element, so it can later be applied. | |
void | apply_css_selector_style (struct html_context *html_context, struct html_element *element, struct css_selector *selector) |
Apply properties from an existing selector. | |
void | css_apply (struct html_context *html_context, struct html_element *element, struct css_stylesheet *css, struct html_element list *html_stack) |
This function takes element and applies its 'style' attribute onto its attributes (if it contains such an attribute). | |
Variables | |
static const css_applier_T | css_appliers [CSS_PT_LAST] |
CSS style applier.
#define dbginfo | ( | sel, | |
type, | |||
base ) |
#define process_found_selector | ( | sel, | |
type, | |||
base ) |
typedef void(* css_applier_T) (struct html_context *html_context, struct html_element *element, struct css_property *prop) |
void apply_css_selector_style | ( | struct html_context * | html_context, |
struct html_element * | element, | ||
struct css_selector * | selector ) |
Apply properties from an existing selector.
void css_apply | ( | struct html_context * | html_context, |
struct html_element * | element, | ||
struct css_stylesheet * | css, | ||
struct html_element list * | html_stack ) |
This function takes element and applies its 'style' attribute onto its attributes (if it contains such an attribute).
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
This looks for a match in list of selectors.
struct css_selector * get_css_selector_for_element | ( | struct html_context * | html_context, |
struct html_element * | element, | ||
struct css_stylesheet * | css, | ||
struct html_element list * | html_stack ) |
Gather all style information for the given element, so it can later be applied.
Returned value should be freed using done_css_selector().
|
static |
XXX: Sort like the css_property_type