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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/accessibility/AXObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 43efc61b0bb9ff4aaa9ad7ffb77007246b87263e..4371c9095bbbdb61c2866a76039f1cd1638a0751 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -503,7 +503,8 @@ AXObjectInclusion AXObject::defaultObjectInclusion(
if (isPresentationalChild()) {
if (ignoredReasons) {
AXObject* ancestor = ancestorForWhichThisIsAPresentationalChild();
- ignoredReasons->append(IgnoredReason(AXAncestorDisallowsChild, ancestor));
+ ignoredReasons->push_back(
+ IgnoredReason(AXAncestorDisallowsChild, ancestor));
}
return IgnoreObject;
}
@@ -525,13 +526,13 @@ bool AXObject::computeIsInertOrAriaHidden(
if (dialog) {
AXObject* dialogObject = axObjectCache().getOrCreate(dialog);
if (dialogObject)
- ignoredReasons->append(
+ ignoredReasons->push_back(
IgnoredReason(AXActiveModalDialog, dialogObject));
else
- ignoredReasons->append(IgnoredReason(AXInert));
+ ignoredReasons->push_back(IgnoredReason(AXInert));
} else {
// TODO(aboxhall): handle inert attribute if it eventuates
- ignoredReasons->append(IgnoredReason(AXInert));
+ ignoredReasons->push_back(IgnoredReason(AXInert));
}
}
return true;
@@ -549,9 +550,9 @@ bool AXObject::computeIsInertOrAriaHidden(
if (hiddenRoot) {
if (ignoredReasons) {
if (hiddenRoot == this)
- ignoredReasons->append(IgnoredReason(AXAriaHidden));
+ ignoredReasons->push_back(IgnoredReason(AXAriaHidden));
else
- ignoredReasons->append(IgnoredReason(AXAriaHiddenRoot, hiddenRoot));
+ ignoredReasons->push_back(IgnoredReason(AXAriaHiddenRoot, hiddenRoot));
}
return true;
}
@@ -676,7 +677,7 @@ String AXObject::name(AXNameFrom& nameFrom,
if (nameObjects) {
nameObjects->clear();
for (size_t i = 0; i < relatedObjects.size(); i++)
- nameObjects->append(relatedObjects[i]->object);
+ nameObjects->push_back(relatedObjects[i]->object);
}
return text;
@@ -754,7 +755,7 @@ String AXObject::ariaTextAlternative(bool recursive,
: aria_labelledbyAttr;
nameFrom = AXNameFromRelatedElement;
if (nameSources) {
- nameSources->append(NameSource(*foundTextAlternative, attr));
+ nameSources->push_back(NameSource(*foundTextAlternative, attr));
nameSources->back().type = nameFrom;
}
@@ -789,7 +790,7 @@ String AXObject::ariaTextAlternative(bool recursive,
// If you change this logic, update AXNodeObject::nameFromLabelElement, too.
nameFrom = AXNameFromAttribute;
if (nameSources) {
- nameSources->append(NameSource(*foundTextAlternative, aria_labelAttr));
+ nameSources->push_back(NameSource(*foundTextAlternative, aria_labelAttr));
nameSources->back().type = nameFrom;
}
const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
@@ -825,7 +826,7 @@ String AXObject::textFromElements(bool inAriaLabelledbyTraversal,
String result = recursiveTextAlternative(
*axElement, inAriaLabelledbyTraversal, visited);
- localRelatedObjects.append(
+ localRelatedObjects.push_back(
new NameSourceRelatedObject(axElement, result));
if (!result.isEmpty()) {
if (!accumulatedText.isEmpty())
@@ -865,7 +866,7 @@ void AXObject::elementsFromAttribute(HeapVector<Member<Element>>& elements,
TreeScope& scope = getNode()->treeScope();
for (const auto& id : ids) {
if (Element* idElement = scope.getElementById(AtomicString(id)))
- elements.append(idElement);
+ elements.push_back(idElement);
}
}
@@ -1512,7 +1513,7 @@ void AXObject::scrollToGlobalPoint(const IntPoint& globalPoint) const {
if (parentObject->getScrollableAreaIfScrollable())
objects.prepend(parentObject);
}
- objects.append(this);
+ objects.push_back(this);
// Start with the outermost scrollable (the main window) and try to scroll the
// next innermost object to the given point.

Powered by Google App Engine
This is Rietveld 408576698