mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibWeb: Prevent crash when inspecting SVG documents
(Or any document with aria-hidden=true on the root)
This commit is contained in:
parent
9430bbcc62
commit
1cc199d365
Notes:
sideshowbarker
2024-07-16 21:39:23 +09:00
Author: https://github.com/MacDue
Commit: 1cc199d365
Pull-request: https://github.com/SerenityOS/serenity/pull/19660
2 changed files with 3 additions and 3 deletions
|
@ -1638,7 +1638,7 @@ void Node::build_accessibility_tree(AccessibilityTreeNode& parent)
|
|||
if (is_document()) {
|
||||
auto* document = static_cast<DOM::Document*>(this);
|
||||
auto* document_element = document->document_element();
|
||||
if (document_element) {
|
||||
if (document_element && document_element->include_in_accessibility_tree()) {
|
||||
parent.set_value(document_element);
|
||||
if (document_element->has_child_nodes())
|
||||
document_element->for_each_child([&parent](DOM::Node& child) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue