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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years 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/dom/IntersectionObserver.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
index 91a4f0be3c2ce66996b66f2d8433e842f3dbd465..eade5171943781f148713d6be880359e56c06682 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -82,16 +82,16 @@ void parseRootMargin(String rootMarginParameter,
const CSSParserToken& token = tokenRange.consumeIncludingWhitespace();
switch (token.type()) {
case PercentageToken:
- rootMargin.append(Length(token.numericValue(), Percent));
+ rootMargin.push_back(Length(token.numericValue(), Percent));
break;
case DimensionToken:
switch (token.unitType()) {
case CSSPrimitiveValue::UnitType::Pixels:
- rootMargin.append(
+ rootMargin.push_back(
Length(static_cast<int>(floor(token.numericValue())), Fixed));
break;
case CSSPrimitiveValue::UnitType::Percentage:
- rootMargin.append(Length(token.numericValue(), Percent));
+ rootMargin.push_back(Length(token.numericValue(), Percent));
break;
default:
exceptionState.throwDOMException(
@@ -110,10 +110,10 @@ void parseThresholds(const DoubleOrDoubleSequence& thresholdParameter,
Vector<float>& thresholds,
ExceptionState& exceptionState) {
if (thresholdParameter.isDouble()) {
- thresholds.append(static_cast<float>(thresholdParameter.getAsDouble()));
+ thresholds.push_back(static_cast<float>(thresholdParameter.getAsDouble()));
} else {
for (auto thresholdValue : thresholdParameter.getAsDoubleSequence())
- thresholds.append(static_cast<float>(thresholdValue));
+ thresholds.push_back(static_cast<float>(thresholdValue));
}
for (auto thresholdValue : thresholds) {
@@ -383,7 +383,7 @@ String IntersectionObserver::rootMargin() const {
void IntersectionObserver::enqueueIntersectionObserverEntry(
IntersectionObserverEntry& entry) {
- m_entries.append(&entry);
+ m_entries.push_back(&entry);
toDocument(m_callback->getExecutionContext())
->ensureIntersectionObserverController()
.scheduleIntersectionObserverForDelivery(*this);

Powered by Google App Engine
This is Rietveld 408576698