diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-05 23:47:06 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-05 23:47:06 +0200 |
commit | 48f43a74298161cf54bdc5b4c27ca280e3422510 (patch) | |
tree | 5ee0da100f390056b05b6a9368de8dc465d81657 /Libraries/LibHTML/CSS/StyleResolver.h | |
parent | 958b395418d1d5aa092c2a89278447ece2c9364e (diff) | |
download | serenity-48f43a74298161cf54bdc5b4c27ca280e3422510.zip |
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.
Diffstat (limited to 'Libraries/LibHTML/CSS/StyleResolver.h')
-rw-r--r-- | Libraries/LibHTML/CSS/StyleResolver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibHTML/CSS/StyleResolver.h b/Libraries/LibHTML/CSS/StyleResolver.h index 9056e130ba..d91470ccdf 100644 --- a/Libraries/LibHTML/CSS/StyleResolver.h +++ b/Libraries/LibHTML/CSS/StyleResolver.h @@ -22,6 +22,8 @@ public: NonnullRefPtrVector<StyleRule> collect_matching_rules(const Element&) const; + static bool is_inherited_property(const StringView&); + private: template<typename Callback> void for_each_stylesheet(Callback) const; |