mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1123760 - make autocomplete dropmarker in the urlbar actually work when activated through a11y APIs, r=surkov
This commit is contained in:
parent
6b555a2f4c
commit
b98ad74d18
@ -224,22 +224,28 @@ XULDropmarkerAccessible::DropmarkerOpen(bool aToggleOpen) const
|
||||
{
|
||||
bool isOpen = false;
|
||||
|
||||
nsCOMPtr<nsIDOMXULButtonElement> parentButtonElement =
|
||||
do_QueryInterface(mContent->GetFlattenedTreeParent());
|
||||
nsIContent* parent = mContent->GetFlattenedTreeParent();
|
||||
|
||||
bool foundRightElement = false;
|
||||
while (parent) {
|
||||
nsCOMPtr<nsIDOMXULButtonElement> parentButtonElement =
|
||||
do_QueryInterface(parent);
|
||||
if (parentButtonElement) {
|
||||
parentButtonElement->GetOpen(&isOpen);
|
||||
if (aToggleOpen)
|
||||
parentButtonElement->SetOpen(!isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
if (parentButtonElement) {
|
||||
parentButtonElement->GetOpen(&isOpen);
|
||||
if (aToggleOpen)
|
||||
parentButtonElement->SetOpen(!isOpen);
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsIDOMXULMenuListElement> parentMenuListElement =
|
||||
do_QueryInterface(parentButtonElement);
|
||||
do_QueryInterface(parent);
|
||||
if (parentMenuListElement) {
|
||||
parentMenuListElement->GetOpen(&isOpen);
|
||||
if (aToggleOpen)
|
||||
parentMenuListElement->SetOpen(!isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
parent = parent->GetFlattenedTreeParent();
|
||||
}
|
||||
|
||||
return isOpen;
|
||||
|
Loading…
Reference in New Issue
Block a user