ladybird/Libraries/LibWeb/XPath
sideshowbarker 4af1b9357b LibWeb: Don't crash when evaluating XPath against a rootless document
Problem: Crash when evaluating an XPath expression against a document
that has no root element.

Cause: mirror_node()’s DOCUMENT_NODE branch unconditionally mirrored
document.document_element(). But a document may lack a root element —
in which case, document_element() returns null.

Fix: Return null from mirror_node() when the document has no root
element. (The caller already maps a null mirror result to a failed
evaluation, and raises an error in that case.)

Fixes https://github.com/LadybirdBrowser/ladybird/issues/10004
2026-06-23 08:59:01 +02:00
..
XPath.cpp LibWeb: Don't crash when evaluating XPath against a rootless document 2026-06-23 08:59:01 +02:00
XPath.h
XPathEvaluator.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
XPathEvaluator.h
XPathEvaluator.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
XPathExpression.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
XPathExpression.h LibWeb: Reduce recompilation impact of DOM/Document.h 2026-02-11 20:02:28 +01:00
XPathExpression.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
XPathNSResolver.cpp
XPathNSResolver.h LibWeb/Bindings: Implement callback interface object bindings 2026-03-11 21:16:44 +01:00
XPathNSResolver.idl LibWeb/Bindings: Implement callback interface object bindings 2026-03-11 21:16:44 +01:00
XPathResult.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
XPathResult.h LibWeb: Add missing initializers in XPathResult 2025-12-19 20:21:07 -06:00
XPathResult.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00