mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-12 05:59:53 +02:00
System/Libraries/Html/Renderer: Apply CSS display rules in order
This commit is contained in:
@@ -392,17 +392,20 @@ Bool @apply_css_rules_to_node(@html_dom_node* node, HtmlRenderer* renderer)
|
|||||||
|
|
||||||
if (!StrICmp(key->name, "display")) {
|
if (!StrICmp(key->name, "display")) {
|
||||||
if (!StrICmp(values->@(0), "none")) {
|
if (!StrICmp(values->@(0), "none")) {
|
||||||
return FALSE;
|
should_display = FALSE;
|
||||||
}
|
node->display = CSS_DISPLAY_NONE;
|
||||||
|
} else {
|
||||||
|
should_display = TRUE;
|
||||||
|
node->display = CSS_DISPLAY_INLINE; // default to inline
|
||||||
if (!StrICmp(values->@(0), "block")) {
|
if (!StrICmp(values->@(0), "block")) {
|
||||||
node->display = CSS_DISPLAY_BLOCK;
|
node->display = CSS_DISPLAY_BLOCK;
|
||||||
} else if (!StrICmp(values->@(0), "inline")) {
|
}
|
||||||
|
if (!StrICmp(values->@(0), "inline")) {
|
||||||
node->display = CSS_DISPLAY_INLINE;
|
node->display = CSS_DISPLAY_INLINE;
|
||||||
} else if (!StrICmp(values->@(0), "inline-block")) {
|
}
|
||||||
|
if (!StrICmp(values->@(0), "inline-block")) {
|
||||||
node->display = CSS_DISPLAY_INLINE_BLOCK;
|
node->display = CSS_DISPLAY_INLINE_BLOCK;
|
||||||
} else {
|
}
|
||||||
// FIXME: unimplemented; default to inline
|
|
||||||
node->display = CSS_DISPLAY_INLINE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user