Bindings: Implement is_supported_property_index in terms of item_value

Greatly simplifying the code :^)
This commit is contained in:
Shannon Booth
2024-07-25 18:30:29 +12:00
committed by Andreas Kling
parent c5c1a8fcc7
commit 9b1af542e7
34 changed files with 4 additions and 138 deletions

View File

@@ -51,13 +51,6 @@ void CSSRuleList::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_rules);
}
bool CSSRuleList::is_supported_property_index(u32 index) const
{
// The objects supported property indices are the numbers in the range zero to one less than the number of CSSRule objects represented by the collection.
// If there are no such CSSRule objects, then there are no supported property indices.
return index < m_rules.size();
}
// https://www.w3.org/TR/cssom/#insert-a-css-rule
WebIDL::ExceptionOr<unsigned> CSSRuleList::insert_a_css_rule(Variant<StringView, CSSRule*> rule, u32 index)
{