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

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

Issue 2143483002: Use the single char overload of append() when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 858
859 for (const auto& element : elements) { 859 for (const auto& element : elements) {
860 AXObject* axElement = axObjectCache().getOrCreate(element); 860 AXObject* axElement = axObjectCache().getOrCreate(element);
861 if (axElement) { 861 if (axElement) {
862 foundValidElement = true; 862 foundValidElement = true;
863 863
864 String result = recursiveTextAlternative(*axElement, inAriaLabelledb yTraversal, visited); 864 String result = recursiveTextAlternative(*axElement, inAriaLabelledb yTraversal, visited);
865 localRelatedObjects.append(new NameSourceRelatedObject(axElement, re sult)); 865 localRelatedObjects.append(new NameSourceRelatedObject(axElement, re sult));
866 if (!result.isEmpty()) { 866 if (!result.isEmpty()) {
867 if (!accumulatedText.isEmpty()) 867 if (!accumulatedText.isEmpty())
868 accumulatedText.append(" "); 868 accumulatedText.append(' ');
869 accumulatedText.append(result); 869 accumulatedText.append(result);
870 } 870 }
871 } 871 }
872 } 872 }
873 if (!foundValidElement) 873 if (!foundValidElement)
874 return String(); 874 return String();
875 if (relatedObjects) 875 if (relatedObjects)
876 *relatedObjects = localRelatedObjects; 876 *relatedObjects = localRelatedObjects;
877 return accumulatedText.toString(); 877 return accumulatedText.toString();
878 } 878 }
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 1748
1749 DEFINE_TRACE(AXObject) 1749 DEFINE_TRACE(AXObject)
1750 { 1750 {
1751 visitor->trace(m_children); 1751 visitor->trace(m_children);
1752 visitor->trace(m_parent); 1752 visitor->trace(m_parent);
1753 visitor->trace(m_cachedLiveRegionRoot); 1753 visitor->trace(m_cachedLiveRegionRoot);
1754 visitor->trace(m_axObjectCache); 1754 visitor->trace(m_axObjectCache);
1755 } 1755 }
1756 1756
1757 } // namespace blink 1757 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698