mirror of
https://github.com/RGBCube/serenity
synced 2026-01-12 23:01:01 +00:00
LibWeb: Resolve cyclic dependency between StyleSheet and ImportRule
Previously: CSSImportRule::loaded_style_sheet() (and others) depend on
the definition of class CSSStyleSheet. Meanwhile,
CSSStyleSheet::template for_each_effective_style_rule (and others)
depend on the definition of class CSSImportRule.
This hasn't caused any problems so far because CSSStyleSheet.h happened
to be always included after CSSImportRule.h (in part due to alphabetical
ordering).
However, a compilation unit that (for example) only contains
#include <Userland/Libraries/LibWeb/CSSImportRule.h>
would fail to compile.
This patch resolves this issue by pushing the inline definition of
Web::CSS::CSSStyleSheet::for_each_effective_style_rule and
for_first_not_loaded_import_rule into a different file, and adding the
missing headers.
This commit is contained in:
parent
0f35ae13fb
commit
0db6ca4065
6 changed files with 41 additions and 33 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <AK/URL.h>
|
||||
#include <LibWeb/CSS/CSSRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleSheet.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue