mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibWeb: Implement the exclusive <details> accordion
This is a relatively new feature which allows naming <details> groups to ensure only one <details> element in that group is opened at a time.
This commit is contained in:
parent
1fb1d5fcb9
commit
59a4203cf0
Notes:
github-actions[bot]
2025-01-17 09:23:27 +00:00
Author: https://github.com/trflynn89
Commit: 59a4203cf0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3264
4 changed files with 155 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, the SerenityOS developers.
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2023-2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -37,6 +37,8 @@ private:
|
|||
virtual void attribute_changed(FlyString const& local_name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
||||
|
||||
void queue_a_details_toggle_event_task(String old_state, String new_state);
|
||||
void ensure_details_exclusivity_by_closing_other_elements_if_needed();
|
||||
void ensure_details_exclusivity_by_closing_the_given_element_if_needed();
|
||||
|
||||
WebIDL::ExceptionOr<void> create_shadow_tree_if_needed();
|
||||
void update_shadow_tree_slots();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue