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

Side by Side Diff: third_party/WebKit/Source/web/WebElementCollection.cpp

Issue 1865813002: Remove RawPtr from Source/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
OLDNEW
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
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 RawPtr<HTMLCollection>& col) 51 WebElementCollection::WebElementCollection(HTMLCollection*col)
52 : m_private(col) 52 : m_private(col)
53 { 53 {
54 } 54 }
55 55
56 WebElementCollection& WebElementCollection::operator=(const RawPtr<HTMLCollectio n>& col) 56 WebElementCollection& WebElementCollection::operator=(HTMLCollection*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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebElement.cpp ('k') | third_party/WebKit/Source/web/WebElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698