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

Side by Side Diff: Source/core/svg/SVGPathSegList.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: s/slength/size 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 unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGNumberList.idl ('k') | Source/core/svg/SVGPathSegList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void clearByteStream() { m_byteStream.clear(); } 60 void clearByteStream() { m_byteStream.clear(); }
61 61
62 // NewSVGListPropertyHelper methods with |m_byteStream| sync: 62 // NewSVGListPropertyHelper methods with |m_byteStream| sync:
63 63
64 ItemPropertyType* at(size_t index) 64 ItemPropertyType* at(size_t index)
65 { 65 {
66 updateListFromByteStream(); 66 updateListFromByteStream();
67 return Base::at(index); 67 return Base::at(index);
68 } 68 }
69 69
70 size_t numberOfItems() 70 size_t length()
71 { 71 {
72 updateListFromByteStream(); 72 updateListFromByteStream();
73 return Base::numberOfItems(); 73 return Base::length();
74 } 74 }
75 75
76 bool isEmpty() const 76 bool isEmpty() const
77 { 77 {
78 if (m_listSyncedToByteStream) 78 if (m_listSyncedToByteStream)
79 return Base::isEmpty(); 79 return Base::isEmpty();
80 80
81 return !m_byteStream || m_byteStream->isEmpty(); 81 return !m_byteStream || m_byteStream->isEmpty();
82 } 82 }
83 83
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 inline PassRefPtr<SVGPathSegList> toSVGPathSegList(PassRefPtr<NewSVGPropertyBase > passBase) 170 inline PassRefPtr<SVGPathSegList> toSVGPathSegList(PassRefPtr<NewSVGPropertyBase > passBase)
171 { 171 {
172 RefPtr<NewSVGPropertyBase> base = passBase; 172 RefPtr<NewSVGPropertyBase> base = passBase;
173 ASSERT(base->type() == SVGPathSegList::classType()); 173 ASSERT(base->type() == SVGPathSegList::classType());
174 return static_pointer_cast<SVGPathSegList>(base.release()); 174 return static_pointer_cast<SVGPathSegList>(base.release());
175 } 175 }
176 176
177 } // namespace WebCore 177 } // namespace WebCore
178 178
179 #endif 179 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGNumberList.idl ('k') | Source/core/svg/SVGPathSegList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698