Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: Source/modules/accessibility/AXMenuList.cpp

Issue 1019313003: Use c++11 range loops in accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return false; 109 return false;
110 110
111 return !toElement(node())->isDisabledFormControl(); 111 return !toElement(node())->isDisabledFormControl();
112 } 112 }
113 113
114 void AXMenuList::didUpdateActiveOption(int optionIndex) 114 void AXMenuList::didUpdateActiveOption(int optionIndex)
115 { 115 {
116 RefPtrWillBeRawPtr<Document> document(m_layoutObject->document()); 116 RefPtrWillBeRawPtr<Document> document(m_layoutObject->document());
117 AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache()); 117 AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache());
118 118
119 const AccessibilityChildrenVector& childObjects = children(); 119 const auto& childObjects = children();
120 if (!childObjects.isEmpty()) { 120 if (!childObjects.isEmpty()) {
121 ASSERT(childObjects.size() == 1); 121 ASSERT(childObjects.size() == 1);
122 ASSERT(childObjects[0]->isMenuListPopup()); 122 ASSERT(childObjects[0]->isMenuListPopup());
123 123
124 if (childObjects[0]->isMenuListPopup()) { 124 if (childObjects[0]->isMenuListPopup()) {
125 if (AXMenuListPopup* popup = toAXMenuListPopup(childObjects[0].get() )) 125 if (AXMenuListPopup* popup = toAXMenuListPopup(childObjects[0].get() ))
126 popup->didUpdateActiveOption(optionIndex); 126 popup->didUpdateActiveOption(optionIndex);
127 } 127 }
128 } 128 }
129 129
130 cache->postNotification(this, document.get(), AXObjectCacheImpl::AXMenuListV alueChanged, true); 130 cache->postNotification(this, document.get(), AXObjectCacheImpl::AXMenuListV alueChanged, true);
131 } 131 }
132 132
133 } // namespace blink 133 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698