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

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

Issue 2046463003: Resubmission of sashab's patch: Make CSSComputedStyledeclaration::getPropertyCSSValue return const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing const Created 4 years, 6 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 // Copyright 2016 the Chromium Authors. All rights reserved. 1 // Copyright 2016 the Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/cssom/ComputedStylePropertyMap.h" 5 #include "core/css/cssom/ComputedStylePropertyMap.h"
6 6
7 #include "core/css/CSSComputedStyleDeclaration.h" 7 #include "core/css/CSSComputedStyleDeclaration.h"
8 #include "core/css/cssom/StyleValueFactory.h" 8 #include "core/css/cssom/StyleValueFactory.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 StylePropertyMap::StyleValueVector ComputedStylePropertyMap::getAll(CSSPropertyI D propertyID) 12 StylePropertyMap::StyleValueVector ComputedStylePropertyMap::getAll(CSSPropertyI D propertyID)
13 { 13 {
14 CSSValue* cssValue = m_computedStyleDeclaration->getPropertyCSSValueInternal (propertyID); 14 const CSSValue* cssValue = m_computedStyleDeclaration->getPropertyCSSValueIn ternal(propertyID);
15 if (!cssValue) 15 if (!cssValue)
16 return StylePropertyMap::StyleValueVector(); 16 return StylePropertyMap::StyleValueVector();
17 return cssValueToStyleValueVector(propertyID, *cssValue); 17 return cssValueToStyleValueVector(propertyID, *cssValue);
18 } 18 }
19 19
20 Vector<String> ComputedStylePropertyMap::getProperties() 20 Vector<String> ComputedStylePropertyMap::getProperties()
21 { 21 {
22 Vector<String> result; 22 Vector<String> result;
23 for (unsigned i = 0; i < m_computedStyleDeclaration->length(); i++) { 23 for (unsigned i = 0; i < m_computedStyleDeclaration->length(); i++) {
24 result.append(m_computedStyleDeclaration->item(i)); 24 result.append(m_computedStyleDeclaration->item(i));
25 } 25 }
26 return result; 26 return result;
27 } 27 }
28 28
29 } // namespace blink 29 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698