| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 void WebElementCollection::reset() | 41 void WebElementCollection::reset() |
| 42 { | 42 { |
| 43 m_private.reset(); | 43 m_private.reset(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void WebElementCollection::assign(const WebElementCollection& other) | 46 void WebElementCollection::assign(const WebElementCollection& other) |
| 47 { | 47 { |
| 48 m_private = other.m_private; | 48 m_private = other.m_private; |
| 49 } | 49 } |
| 50 | 50 |
| 51 WebElementCollection::WebElementCollection(const PassRefPtrWillBeRawPtr<HTMLColl
ection>& col) | 51 WebElementCollection::WebElementCollection(const RawPtr<HTMLCollection>& col) |
| 52 : m_private(col) | 52 : m_private(col) |
| 53 { | 53 { |
| 54 } | 54 } |
| 55 | 55 |
| 56 WebElementCollection& WebElementCollection::operator=(const PassRefPtrWillBeRawP
tr<HTMLCollection>& col) | 56 WebElementCollection& WebElementCollection::operator=(const RawPtr<HTMLCollectio
n>& col) |
| 57 { | 57 { |
| 58 m_private = col; | 58 m_private = col; |
| 59 return *this; | 59 return *this; |
| 60 } | 60 } |
| 61 | 61 |
| 62 unsigned WebElementCollection::length() const | 62 unsigned WebElementCollection::length() const |
| 63 { | 63 { |
| 64 return m_private->length(); | 64 return m_private->length(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 WebElement WebElementCollection::nextItem() const | 67 WebElement WebElementCollection::nextItem() const |
| 68 { | 68 { |
| 69 Element* element = m_private->item(m_current); | 69 Element* element = m_private->item(m_current); |
| 70 if (element) | 70 if (element) |
| 71 m_current++; | 71 m_current++; |
| 72 return WebElement(element); | 72 return WebElement(element); |
| 73 } | 73 } |
| 74 | 74 |
| 75 WebElement WebElementCollection::firstItem() const | 75 WebElement WebElementCollection::firstItem() const |
| 76 { | 76 { |
| 77 m_current = 0; | 77 m_current = 0; |
| 78 return nextItem(); | 78 return nextItem(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace blink | 81 } // namespace blink |
| OLD | NEW |