mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 15:09:42 +00:00
LibWeb: Return the same DataTransfer.types()
array if unmodified
This commit is contained in:
parent
3fc7613bf1
commit
3099459504
Notes:
github-actions[bot]
2025-09-12 10:31:31 +00:00
Author: https://github.com/tcl3
Commit: 3099459504
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6088
Reviewed-by: https://github.com/gmta
3 changed files with 6 additions and 1 deletions
|
@ -74,6 +74,8 @@ void DataTransfer::visit_edges(JS::Cell::Visitor& visitor)
|
|||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_items);
|
||||
visitor.visit(m_item_list);
|
||||
|
||||
VISIT_CACHED_ATTRIBUTE(types);
|
||||
}
|
||||
|
||||
void DataTransfer::set_drop_effect(String const& drop_effect)
|
||||
|
@ -374,6 +376,7 @@ void DataTransfer::update_data_transfer_types_list()
|
|||
}
|
||||
|
||||
// 3. Set the DataTransfer object's types array to the result of creating a frozen array from L.
|
||||
set_cached_types(nullptr);
|
||||
m_types = move(types);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue