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

Side by Side Diff: third_party/WebKit/WebCore/css/CSSStyleDeclaration.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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
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, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 // FIXME: This should use mass removal. 137 // FIXME: This should use mass removal.
138 for (unsigned i = 0; i < propertiesToRemove.size(); i++) 138 for (unsigned i = 0; i < propertiesToRemove.size(); i++)
139 style->removeProperty(propertiesToRemove[i]); 139 style->removeProperty(propertiesToRemove[i]);
140 } 140 }
141 141
142 PassRefPtr<CSSMutableStyleDeclaration> CSSStyleDeclaration::copyPropertiesInSet( const int* set, unsigned length) const 142 PassRefPtr<CSSMutableStyleDeclaration> CSSStyleDeclaration::copyPropertiesInSet( const int* set, unsigned length) const
143 { 143 {
144 Vector<CSSProperty> list; 144 Vector<CSSProperty> list;
145 list.reserveCapacity(length); 145 list.reserveInitialCapacity(length);
146 unsigned variableDependentValueCount = 0; 146 unsigned variableDependentValueCount = 0;
147 for (unsigned i = 0; i < length; i++) { 147 for (unsigned i = 0; i < length; i++) {
148 RefPtr<CSSValue> value = getPropertyCSSValue(set[i]); 148 RefPtr<CSSValue> value = getPropertyCSSValue(set[i]);
149 if (value) { 149 if (value) {
150 if (value->isVariableDependentValue()) 150 if (value->isVariableDependentValue())
151 variableDependentValueCount++; 151 variableDependentValueCount++;
152 list.append(CSSProperty(set[i], value.release(), false)); 152 list.append(CSSProperty(set[i], value.release(), false));
153 } 153 }
154 } 154 }
155 return CSSMutableStyleDeclaration::create(list, variableDependentValueCount) ; 155 return CSSMutableStyleDeclaration::create(list, variableDependentValueCount) ;
156 } 156 }
157 157
158 } // namespace WebCore 158 } // namespace WebCore
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/css/CSSPrimitiveValue.cpp ('k') | third_party/WebKit/WebCore/css/CSSStyleSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698