mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Implement XPath functionality using libxml2
This commit is contained in:
parent
f04b866cb0
commit
0ea519c539
Notes:
github-actions[bot]
2025-10-03 11:17:39 +00:00
Author: https://github.com/johannesg
Commit: 0ea519c539
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6342
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
8 changed files with 277 additions and 6 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
#include "XPath.h"
|
||||
#include "XPathEvaluator.h"
|
||||
#include "XPathExpression.h"
|
||||
#include "XPathResult.h"
|
||||
|
|
@ -40,10 +41,10 @@ void XPathExpression::visit_edges(Cell::Visitor& visitor)
|
|||
|
||||
XPathExpression::~XPathExpression() = default;
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<XPathResult>> XPathExpression::evaluate(DOM::Node const&, WebIDL::UnsignedShort, GC::Ptr<XPathResult>)
|
||||
WebIDL::ExceptionOr<GC::Ref<XPathResult>> XPathExpression::evaluate(DOM::Node const& context_node, WebIDL::UnsignedShort type, GC::Ptr<XPathResult> result)
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
return realm.create<XPathResult>(realm);
|
||||
return XPath::evaluate(realm, m_expression, context_node, m_resolver, type, result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue