Remove Vector::prepend
https://bugs.webkit.org/show_bug.cgi?id=115618
Reviewed by Geoffrey Garen.
Source/WebCore:
Replace calls to Vector::prepend with either Vector::insert,
or a combination of Vector::append and Vector::reverse.
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::scrollToGlobalPoint):
- css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
(WebCore::CSSValueList::prepend):
(WebCore::Document::iconURLs):
- editing/TextIterator.cpp:
(WebCore::SearchBuffer::prependContext):
- editing/VisibleUnits.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
(WebCore::HistoryItem::padDailyCountsForNewVisit):
(WebCore::HistoryItem::collapseDailyVisitsToWeekly):
- inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::addInspectedObject):
- platform/graphics/SVGGlyph.cpp:
(WebCore::charactersWithArabicForm):
Source/WTF:
Given the performance characteristics of prepending something to a Vector, not having prepend
will hopefully make developers think about whether prepending is necessary at all. For example,
the functions in HexNumber.h were easily converted to using Vector::append and then Vector::reverse.
(WTF::appendUnsignedAsHex):
(WTF::appendUnsignedAsHexFixedSize):
(Vector):