| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 AccessibilityExpanded AXMenuList::isExpanded() const | 116 AccessibilityExpanded AXMenuList::isExpanded() const |
| 117 { | 117 { |
| 118 if (isCollapsed()) | 118 if (isCollapsed()) |
| 119 return ExpandedCollapsed; | 119 return ExpandedCollapsed; |
| 120 | 120 |
| 121 return ExpandedExpanded; | 121 return ExpandedExpanded; |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool AXMenuList::canSetFocusAttribute() const | 124 bool AXMenuList::canSetFocusAttribute() const |
| 125 { | 125 { |
| 126 if (!node()) | 126 if (!getNode()) |
| 127 return false; | 127 return false; |
| 128 | 128 |
| 129 return !toElement(node())->isDisabledFormControl(); | 129 return !toElement(getNode())->isDisabledFormControl(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void AXMenuList::didUpdateActiveOption(int optionIndex) | 132 void AXMenuList::didUpdateActiveOption(int optionIndex) |
| 133 { | 133 { |
| 134 const auto& childObjects = children(); | 134 const auto& childObjects = children(); |
| 135 if (!childObjects.isEmpty()) { | 135 if (!childObjects.isEmpty()) { |
| 136 ASSERT(childObjects.size() == 1); | 136 ASSERT(childObjects.size() == 1); |
| 137 ASSERT(childObjects[0]->isMenuListPopup()); | 137 ASSERT(childObjects[0]->isMenuListPopup()); |
| 138 | 138 |
| 139 if (childObjects[0]->isMenuListPopup()) { | 139 if (childObjects[0]->isMenuListPopup()) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 void AXMenuList::didHidePopup() | 157 void AXMenuList::didHidePopup() |
| 158 { | 158 { |
| 159 if (children().size() != 1) | 159 if (children().size() != 1) |
| 160 return; | 160 return; |
| 161 | 161 |
| 162 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); | 162 AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); |
| 163 popup->didHide(); | 163 popup->didHide(); |
| 164 | 164 |
| 165 if (node() && node()->focused()) | 165 if (getNode() && getNode()->focused()) |
| 166 axObjectCache().postNotification(this, AXObjectCacheImpl::AXFocusedUIEle
mentChanged); | 166 axObjectCache().postNotification(this, AXObjectCacheImpl::AXFocusedUIEle
mentChanged); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace blink | 169 } // namespace blink |
| OLD | NEW |