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

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

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month 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 56b0126fc8c4b2275d5ca68a636ca5264b3f7575..39376fe7c7d4785bdfe3ad0a56e9e0468e78d173 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -755,13 +755,13 @@ String AXObject::ariaTextAlternative(bool recursive,
nameFrom = AXNameFromRelatedElement;
if (nameSources) {
nameSources->append(NameSource(*foundTextAlternative, attr));
- nameSources->last().type = nameFrom;
+ nameSources->back().type = nameFrom;
}
const AtomicString& ariaLabelledby = getAttribute(attr);
if (!ariaLabelledby.isNull()) {
if (nameSources)
- nameSources->last().attributeValue = ariaLabelledby;
+ nameSources->back().attributeValue = ariaLabelledby;
// Operate on a copy of |visited| so that if |nameSources| is not null,
// the set of visited objects is preserved unmodified for future
@@ -770,7 +770,7 @@ String AXObject::ariaTextAlternative(bool recursive,
textAlternative = textFromAriaLabelledby(visitedCopy, relatedObjects);
if (!textAlternative.isNull()) {
if (nameSources) {
- NameSource& source = nameSources->last();
+ NameSource& source = nameSources->back();
source.type = nameFrom;
source.relatedObjects = *relatedObjects;
source.text = textAlternative;
@@ -780,7 +780,7 @@ String AXObject::ariaTextAlternative(bool recursive,
return textAlternative;
}
} else if (nameSources) {
- nameSources->last().invalid = true;
+ nameSources->back().invalid = true;
}
}
}
@@ -790,14 +790,14 @@ String AXObject::ariaTextAlternative(bool recursive,
nameFrom = AXNameFromAttribute;
if (nameSources) {
nameSources->append(NameSource(*foundTextAlternative, aria_labelAttr));
- nameSources->last().type = nameFrom;
+ nameSources->back().type = nameFrom;
}
const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
if (!ariaLabel.isEmpty()) {
textAlternative = ariaLabel;
if (nameSources) {
- NameSource& source = nameSources->last();
+ NameSource& source = nameSources->back();
source.text = textAlternative;
source.attributeValue = ariaLabel;
*foundTextAlternative = true;

Powered by Google App Engine
This is Rietveld 408576698