mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
LibWeb: Implement Document.evaluate and related XPath methods
This commit is contained in:
parent
0ea519c539
commit
d2030a5377
Notes:
github-actions[bot]
2025-10-03 11:17:31 +00:00
Author: https://github.com/johannesg
Commit: d2030a5377
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6342
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
3 changed files with 29 additions and 0 deletions
|
@ -6802,6 +6802,23 @@ HashMap<FlyString, GC::Ref<Web::CSS::CSSPropertyRule>>& Document::registered_cus
|
|||
return m_registered_custom_properties;
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<XPath::XPathExpression>> Document::create_expression(String const& expression, GC::Ptr<XPath::XPathNSResolver> resolver)
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
return XPath::create_expression(realm, expression, resolver);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<XPath::XPathResult>> Document::evaluate(String const& expression, DOM::Node const& context_node, GC::Ptr<XPath::XPathNSResolver> resolver, WebIDL::UnsignedShort type, GC::Ptr<XPath::XPathResult> result)
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
return XPath::evaluate(realm, expression, context_node, resolver, type, result);
|
||||
}
|
||||
|
||||
GC::Ref<DOM::Node> Document::create_ns_resolver(GC::Ref<DOM::Node> node_resolver)
|
||||
{
|
||||
return node_resolver;
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSS::StyleValue const> Document::custom_property_initial_value(FlyString const& name) const
|
||||
{
|
||||
auto maybe_custom_property = m_registered_custom_properties.get(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue