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

Unified Diff: Source/core/svg/properties/NewSVGListPropertyHelper.h

Issue 195313003: [SVG2] Add getters and setters to SVG*List interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tryserver rebase Created 6 years, 9 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
« no previous file with comments | « Source/core/svg/SVGTransformList.idl ('k') | Source/core/svg/properties/NewSVGListPropertyTearOffHelper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/properties/NewSVGListPropertyHelper.h
diff --git a/Source/core/svg/properties/NewSVGListPropertyHelper.h b/Source/core/svg/properties/NewSVGListPropertyHelper.h
index 9365de1fe78e01f629597df767f32da45c897c3a..3aa24e68b39c2d1214f94c793c456b7be393c942 100644
--- a/Source/core/svg/properties/NewSVGListPropertyHelper.h
+++ b/Source/core/svg/properties/NewSVGListPropertyHelper.h
@@ -125,12 +125,12 @@ public:
bool isEmpty() const
{
- return !numberOfItems();
+ return !length();
}
// SVGList*Property DOM spec:
- size_t numberOfItems() const
+ size_t length() const
{
return m_values.size();
}
@@ -168,11 +168,11 @@ private:
template<typename Derived, typename ItemProperty>
bool NewSVGListPropertyHelper<Derived, ItemProperty>::operator==(const Derived& other) const
{
- if (numberOfItems() != other.numberOfItems())
+ if (length() != other.length())
return false;
- size_t length = numberOfItems();
- for (size_t i = 0; i < length; ++i) {
+ size_t slength = length();
pdr. 2014/03/14 17:18:39 size?
+ for (size_t i = 0; i < slength; ++i) {
if (*at(i) != *other.at(i))
return false;
}
@@ -222,7 +222,7 @@ PassRefPtr<ItemProperty> NewSVGListPropertyHelper<Derived, ItemProperty>::getIte
template<typename Derived, typename ItemProperty>
PassRefPtr<ItemProperty> NewSVGListPropertyHelper<Derived, ItemProperty>::insertItemBefore(PassRefPtr<ItemProperty> passNewItem, size_t index)
{
- // Spec: If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.
+ // Spec: If the index is greater than or equal to length, then the new item is appended to the end of the list.
if (index > m_values.size())
index = m_values.size();
« no previous file with comments | « Source/core/svg/SVGTransformList.idl ('k') | Source/core/svg/properties/NewSVGListPropertyTearOffHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698