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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 of N] (Closed)
Patch Set: rebase 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/core/html/parser/HTMLSrcsetParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
index 298834acafc36e574f5ec7f316beef3bea8981c8..b2cee22c0536560baadc6d53a96cb9ed0a4968a6 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
@@ -107,8 +107,8 @@ static void appendDescriptorAndReset(const CharType* attributeStart,
const CharType* position,
Vector<DescriptorToken>& descriptors) {
if (position > descriptorStart)
- descriptors.append(DescriptorToken(descriptorStart - attributeStart,
- position - descriptorStart));
+ descriptors.push_back(DescriptorToken(descriptorStart - attributeStart,
+ position - descriptorStart));
descriptorStart = 0;
}
@@ -337,9 +337,9 @@ static void parseImageCandidatesFromSrcsetAttribute(
unsigned imageURLStartingPosition = imageURLStart - attributeStart;
ASSERT(imageURLEnd > imageURLStart);
unsigned imageURLLength = imageURLEnd - imageURLStart;
- imageCandidates.append(ImageCandidate(attribute, imageURLStartingPosition,
- imageURLLength, result,
- ImageCandidate::SrcsetOrigin));
+ imageCandidates.push_back(
+ ImageCandidate(attribute, imageURLStartingPosition, imageURLLength,
+ result, ImageCandidate::SrcsetOrigin));
// 11. Return to the step labeled splitting loop.
}
}
@@ -429,7 +429,7 @@ static ImageCandidate pickBestImageCandidate(
float prevDensity = -1.0;
for (ImageCandidate& image : imageCandidates) {
if (image.density() != prevDensity && (!ignoreSrc || !image.srcOrigin()))
- deDupedImageCandidates.append(&image);
+ deDupedImageCandidates.push_back(&image);
prevDensity = image.density();
}
unsigned winner = selectionLogic(deDupedImageCandidates, deviceScaleFactor);
@@ -479,7 +479,7 @@ ImageCandidate bestFitSourceForImageAttributes(float deviceScaleFactor,
document);
if (!srcAttribute.isEmpty())
- imageCandidates.append(
+ imageCandidates.push_back(
ImageCandidate(srcAttribute, 0, srcAttribute.length(),
DescriptorParsingResult(), ImageCandidate::SrcOrigin));
@@ -495,10 +495,10 @@ String bestFitSourceForImageAttributes(float deviceScaleFactor,
return srcAttribute;
Vector<ImageCandidate> imageCandidates;
- imageCandidates.append(srcsetImageCandidate);
+ imageCandidates.push_back(srcsetImageCandidate);
if (!srcAttribute.isEmpty())
- imageCandidates.append(
+ imageCandidates.push_back(
ImageCandidate(srcAttribute, 0, srcAttribute.length(),
DescriptorParsingResult(), ImageCandidate::SrcOrigin));

Powered by Google App Engine
This is Rietveld 408576698