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

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

Issue 23903041: Make the Vector copy constructor for mismatched inline sizes explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/StylePropertySet.h » ('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 * (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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 result.append(toCSSPrimitiveValue(m_values[i].get())->customCssText( AlwaysQuoteCSSString)); 120 result.append(toCSSPrimitiveValue(m_values[i].get())->customCssText( AlwaysQuoteCSSString));
121 else 121 else
122 result.append(m_values[i]->cssText()); 122 result.append(m_values[i]->cssText());
123 } 123 }
124 124
125 return result.toString(); 125 return result.toString();
126 } 126 }
127 127
128 bool CSSValueList::equals(const CSSValueList& other) const 128 bool CSSValueList::equals(const CSSValueList& other) const
129 { 129 {
130 return m_valueListSeparator == other.m_valueListSeparator && compareCSSValue Vector<CSSValue>(m_values, other.m_values); 130 // FIXME: the explicit Vector conversion copies into a temporary and is
131 // wasteful.
132 return m_valueListSeparator == other.m_valueListSeparator && compareCSSValue Vector<CSSValue>(Vector<RefPtr<CSSValue> >(m_values), Vector<RefPtr<CSSValue> >( other.m_values));
131 } 133 }
132 134
133 bool CSSValueList::equals(const CSSValue& other) const 135 bool CSSValueList::equals(const CSSValue& other) const
134 { 136 {
135 if (m_values.size() != 1) 137 if (m_values.size() != 1)
136 return false; 138 return false;
137 139
138 const RefPtr<CSSValue>& value = m_values[0]; 140 const RefPtr<CSSValue>& value = m_values[0];
139 return value && value->equals(other); 141 return value && value->equals(other);
140 } 142 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 for (unsigned i = 0; i < m_values.size(); ++i) 193 for (unsigned i = 0; i < m_values.size(); ++i)
192 m_values[i] = cloneFrom.m_values[i]->cloneForCSSOM(); 194 m_values[i] = cloneFrom.m_values[i]->cloneForCSSOM();
193 } 195 }
194 196
195 PassRefPtr<CSSValueList> CSSValueList::cloneForCSSOM() const 197 PassRefPtr<CSSValueList> CSSValueList::cloneForCSSOM() const
196 { 198 {
197 return adoptRef(new CSSValueList(*this)); 199 return adoptRef(new CSSValueList(*this));
198 } 200 }
199 201
200 } // namespace WebCore 202 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698