mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Revert "Apply styles of html element for body element."
This reverts commit 5f9b54f594
.
This commit is contained in:
parent
03c4eec1d4
commit
ca4d770c0b
@ -42,7 +42,6 @@ struct html_context {
|
||||
* from <style>-tags and external stylesheets if enabled is merged
|
||||
* added to it. */
|
||||
struct css_stylesheet css_styles;
|
||||
struct html_element html;
|
||||
#endif
|
||||
|
||||
/* These are global per-document base values, alterable by the <base>
|
||||
@ -80,7 +79,6 @@ struct html_context {
|
||||
unsigned int has_link_lines:1;
|
||||
unsigned int was_body:1; /* For META refresh inside <body>. */
|
||||
unsigned int was_body_background:1; /* For <HTML> with style. */
|
||||
unsigned int was_html:1; /* was <HTML> */
|
||||
|
||||
/* For html/parser.c, html/renderer.c */
|
||||
int margin;
|
||||
|
@ -647,7 +647,6 @@ parse_html(unsigned char *html, unsigned char *eof,
|
||||
html_context->was_br = 0;
|
||||
html_context->was_li = 0;
|
||||
html_context->was_body = 0;
|
||||
html_context->was_html = 0;
|
||||
/* html_context->was_body_background = 0; */
|
||||
html_context->part = part;
|
||||
html_context->eoff = eof;
|
||||
@ -951,21 +950,6 @@ start_element(struct element_info *ei,
|
||||
/* Apply CSS styles. */
|
||||
#ifdef CONFIG_CSS
|
||||
if (html_top->options && html_context->options->css_enable) {
|
||||
if (ei->open == html_html) {
|
||||
html_context->html = *html_top;
|
||||
html_context->was_html = 1;
|
||||
}
|
||||
if (ei->open == html_body && html_context->was_html == 1) {
|
||||
selector = get_css_selector_for_element(html_context,
|
||||
&html_context->html,
|
||||
&html_context->css_styles,
|
||||
&html_context->stack);
|
||||
if (selector) {
|
||||
apply_css_selector_style(html_context, html_top, selector);
|
||||
done_css_selector(selector);
|
||||
}
|
||||
}
|
||||
|
||||
/* XXX: We should apply CSS otherwise as well, but that'll need
|
||||
* some deeper changes in order to have options filled etc.
|
||||
* Probably just applying CSS from more places, since we
|
||||
|
Loading…
Reference in New Issue
Block a user