1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00
elinks/src/document/css/apply.h
Witold Filipczyk 1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00

45 lines
1.2 KiB
C

/*! @file
* This is the main entry point for the CSS micro-engine. It throws
* all the power of the stylesheets at a given element. */
#ifndef EL__DOCUMENT_CSS_APPLY_H
#define EL__DOCUMENT_CSS_APPLY_H
#include "util/lists.h"
#ifdef __cplusplus
extern "C" {
#endif
struct css_stylesheet;
struct html_context;
struct html_element;
/** Gather all style information for the given @a element, so it can later be
* applied. Returned value should be freed using done_css_selector(). */
struct css_selector *
get_css_selector_for_element(struct html_context *html_context,
struct html_element *element,
struct css_stylesheet *css,
LIST_OF(struct html_element) *html_stack);
/** Apply properties from an existing selector. */
void
apply_css_selector_style(struct html_context *html_context,
struct html_element *element,
struct css_selector *selector);
/** This function takes @a element and applies its 'style' attribute onto its
* attributes (if it contains such an attribute). */
void
css_apply(struct html_context *html_context, struct html_element *element,
struct css_stylesheet *css,
LIST_OF(struct html_element) *html_stack);
#ifdef __cplusplus
}
#endif
#endif