mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
LibHTML: Anonymous blocks *should* inherit some properties
Okay, I got that a bit wrong. Here's what CSS 2.1 says: "The properties of anonymous boxes are inherited from the enclosing non-anonymous box. Non-inherited properties have their initial value." This patch implements a better behavior by only copying the inherited properties from the parent style.
This commit is contained in:
parent
958b395418
commit
48f43a7429
4 changed files with 19 additions and 2 deletions
|
@ -78,7 +78,7 @@ NonnullRefPtrVector<StyleRule> StyleResolver::collect_matching_rules(const Eleme
|
|||
return matching_rules;
|
||||
}
|
||||
|
||||
static bool is_inherited_property(const StringView& name)
|
||||
bool StyleResolver::is_inherited_property(const StringView& name)
|
||||
{
|
||||
static HashTable<String> inherited_properties;
|
||||
if (inherited_properties.is_empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue