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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValueList.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool CSSValueList::hasValue(CSSValue* val) const 54 bool CSSValueList::hasValue(CSSValue* val) const
55 { 55 {
56 for (size_t index = 0; index < m_values.size(); index++) { 56 for (size_t index = 0; index < m_values.size(); index++) {
57 const Member<CSSValue>& value = m_values.at(index); 57 const Member<CSSValue>& value = m_values.at(index);
58 if (value && val && value->equals(*val)) 58 if (value && val && value->equals(*val))
59 return true; 59 return true;
60 } 60 }
61 return false; 61 return false;
62 } 62 }
63 63
64 RawPtr<CSSValueList> CSSValueList::copy() 64 CSSValueList* CSSValueList::copy()
65 { 65 {
66 RawPtr<CSSValueList> newList = nullptr; 66 CSSValueList* newList = nullptr;
67 switch (m_valueListSeparator) { 67 switch (m_valueListSeparator) {
68 case SpaceSeparator: 68 case SpaceSeparator:
69 newList = createSpaceSeparated(); 69 newList = createSpaceSeparated();
70 break; 70 break;
71 case CommaSeparator: 71 case CommaSeparator:
72 newList = createCommaSeparated(); 72 newList = createCommaSeparated();
73 break; 73 break;
74 case SlashSeparator: 74 case SlashSeparator:
75 newList = createSlashSeparated(); 75 newList = createSlashSeparated();
76 break; 76 break;
77 default: 77 default:
78 ASSERT_NOT_REACHED(); 78 ASSERT_NOT_REACHED();
79 } 79 }
80 for (size_t index = 0; index < m_values.size(); index++) 80 for (size_t index = 0; index < m_values.size(); index++)
81 newList->append(m_values[index]); 81 newList->append(m_values[index]);
82 return newList.release(); 82 return newList;
83 } 83 }
84 84
85 String CSSValueList::customCSSText() const 85 String CSSValueList::customCSSText() const
86 { 86 {
87 StringBuilder result; 87 StringBuilder result;
88 String separator; 88 String separator;
89 switch (m_valueListSeparator) { 89 switch (m_valueListSeparator) {
90 case SpaceSeparator: 90 case SpaceSeparator:
91 separator = " "; 91 separator = " ";
92 break; 92 break;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return false; 124 return false;
125 } 125 }
126 126
127 DEFINE_TRACE_AFTER_DISPATCH(CSSValueList) 127 DEFINE_TRACE_AFTER_DISPATCH(CSSValueList)
128 { 128 {
129 visitor->trace(m_values); 129 visitor->trace(m_values);
130 CSSValue::traceAfterDispatch(visitor); 130 CSSValue::traceAfterDispatch(visitor);
131 } 131 }
132 132
133 } // namespace blink 133 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValueList.h ('k') | third_party/WebKit/Source/core/css/CSSValuePair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698