12011-07-27 Luke Macpherson <macpherson@chromium.org>
2
3 Add iterator to CSSValueList
4 https://bugs.webkit.org/show_bug.cgi?id=65297
5
6 Reviewed by NOBODY (OOPS!).
7
8 No new tests / refactoring only.
9
10 * css/CSSPrimitiveValue.h:
11 (WebCore::CSSPrimitiveValue::isLength):
12 Add shorthand to determine if this primitive value is a length.
13 * css/CSSStyleSelector.cpp:
14 Use CSSValueListIterator throughout.
15 (WebCore::CSSStyleSelector::applyProperty):
16 (WebCore::CSSStyleSelector::applyPageSizeProperty):
17 (WebCore::CSSStyleSelector::createTransformOperations):
18 * css/CSSValueList.cpp:
19 (WebCore::CSSValueList::copy):
20 Use itemWithoutBoundsCheck() instead of item().
21 * css/CSSValueList.h:
22 Add CSSValueListIterator class definition.
23 (WebCore::CSSValueList::item)
24 Provide inline definition of item.
25 (WebCore::CSSValueListIterator::CSSValueListIterator):
26 (WebCore::CSSValueListIterator::hasMore):
27 Return true if there are more values to consume, including the current value.
28 (WebCore::CSSValueListIterator::value):
29 Return the value at the current position.
30 (WebCore::CSSValueListIterator::next):
31 Move the iterator forward to the next item.
32 (WebCore::CSSValueListIterator::index):
33 Return the current position in the list.
34 (WebCore::CSSValueListIterator::length):
35 Return the size of the underlying list.
36 (WebCore::CSSValueListExpander::first):
37 Return the first item in the list.
38 (WebCore::CSSValueListExpander::second):
39 Return the second item in the list.
40 (WebCore::CSSValueListExpander::length):
41 Return the size of the underlying list.
42