mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Mark should_reject_with_ancestor_filter()
as inline
This commit is contained in:
parent
0f8050f0bd
commit
0f3665e64e
Notes:
github-actions[bot]
2025-02-19 20:53:28 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/0f3665e64e6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3634
2 changed files with 12 additions and 11 deletions
|
@ -420,16 +420,6 @@ StyleComputer::RuleCache const* StyleComputer::rule_cache_for_cascade_origin(Cas
|
|||
return true;
|
||||
}
|
||||
|
||||
bool StyleComputer::should_reject_with_ancestor_filter(Selector const& selector) const
|
||||
{
|
||||
for (u32 hash : selector.ancestor_hashes()) {
|
||||
if (hash == 0)
|
||||
break;
|
||||
if (!m_ancestor_filter.may_contain(hash))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Vector<MatchingRule> const& StyleComputer::get_hover_rules() const
|
||||
{
|
||||
build_rule_cache_if_needed();
|
||||
|
|
|
@ -186,7 +186,7 @@ public:
|
|||
void absolutize_values(ComputedProperties&) const;
|
||||
void compute_font(ComputedProperties&, DOM::Element const*, Optional<CSS::Selector::PseudoElement::Type>) const;
|
||||
|
||||
[[nodiscard]] bool should_reject_with_ancestor_filter(Selector const&) const;
|
||||
[[nodiscard]] inline bool should_reject_with_ancestor_filter(Selector const&) const;
|
||||
|
||||
private:
|
||||
enum class ComputeStyleMode {
|
||||
|
@ -338,4 +338,15 @@ private:
|
|||
Function<void()> m_on_fail;
|
||||
};
|
||||
|
||||
inline bool StyleComputer::should_reject_with_ancestor_filter(Selector const& selector) const
|
||||
{
|
||||
for (u32 hash : selector.ancestor_hashes()) {
|
||||
if (hash == 0)
|
||||
break;
|
||||
if (!m_ancestor_filter.may_contain(hash))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue