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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 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) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 1649
1650 AccessibilityRole AXObject::ariaRoleToWebCoreRole(const String& value) { 1650 AccessibilityRole AXObject::ariaRoleToWebCoreRole(const String& value) {
1651 ASSERT(!value.isEmpty()); 1651 ASSERT(!value.isEmpty());
1652 1652
1653 static const ARIARoleMap* roleMap = createARIARoleMap(); 1653 static const ARIARoleMap* roleMap = createARIARoleMap();
1654 1654
1655 Vector<String> roleVector; 1655 Vector<String> roleVector;
1656 value.split(' ', roleVector); 1656 value.split(' ', roleVector);
1657 AccessibilityRole role = UnknownRole; 1657 AccessibilityRole role = UnknownRole;
1658 for (const auto& child : roleVector) { 1658 for (const auto& child : roleVector) {
1659 role = roleMap->get(child); 1659 role = roleMap->at(child);
1660 if (role) 1660 if (role)
1661 return role; 1661 return role;
1662 } 1662 }
1663 1663
1664 return role; 1664 return role;
1665 } 1665 }
1666 1666
1667 bool AXObject::isInsideFocusableElementOrARIAWidget(const Node& node) { 1667 bool AXObject::isInsideFocusableElementOrARIAWidget(const Node& node) {
1668 const Node* curNode = &node; 1668 const Node* curNode = &node;
1669 do { 1669 do {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 } 1762 }
1763 1763
1764 DEFINE_TRACE(AXObject) { 1764 DEFINE_TRACE(AXObject) {
1765 visitor->trace(m_children); 1765 visitor->trace(m_children);
1766 visitor->trace(m_parent); 1766 visitor->trace(m_parent);
1767 visitor->trace(m_cachedLiveRegionRoot); 1767 visitor->trace(m_cachedLiveRegionRoot);
1768 visitor->trace(m_axObjectCache); 1768 visitor->trace(m_axObjectCache);
1769 } 1769 }
1770 1770
1771 } // namespace blink 1771 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698