Created
March 6, 2026 15:38
-
-
Save dbaron/8ce9dfe1a6a00a166b82dd734429f8b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Document::PopoverStack& popover_auto_stack = document.PopoverAutoStack(); | |
| auto submenu_it = std::ranges::find(popover_auto_stack, sub_menu_); | |
| if (submenu_it == popover_auto_stack.end()) { | |
| // Our submenu is no longer open. | |
| Finish(); | |
| return; | |
| } | |
| if (std::ranges::any_of( | |
| base::span(submenu_it, popover_auto_stack.end()).subspan<1>(), | |
| [](HTMLElement* e) -> bool { return IsA<HTMLMenuListElement>(e); })) { | |
| // There is another menu open, on top of our submenu in the popover stack. | |
| // The innermost submenu is the only one that should have a safe triangle. | |
| Finish(); | |
| return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment