Fix component that inherits from PopupWindow

This regressed in commit 12d904a71c
which changed the order of the pass to get the lower_popup pass before
the first inlining pass.
If by chance (which is likely if one have children), the component that
inherits from PopupWindow was inlined in that pass, it would be as
if it was not a component, and it would be removed from its parent.
But since it is no longer inlined, we need to support that case and
delay the removal when processing the component that holds that popup.
This commit is contained in:
Olivier Goffart 2024-05-06 13:20:25 +02:00 committed by GitHub
parent ed0030efe8
commit af1aa2991e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 179 additions and 20 deletions

View file

@ -337,6 +337,9 @@ pub struct Component {
pub used_types: RefCell<UsedSubTypes>,
pub popup_windows: RefCell<Vec<PopupWindow>>,
/// This component actually inherits PopupWindow (although that has been changed to a Window by the lower_popups pass)
pub inherits_popup_window: Cell<bool>,
/// The names under which this component should be accessible
/// if it is a global singleton and exported.
pub exported_global_names: RefCell<Vec<ExportedName>>,