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

Side by Side Diff: third_party/WebKit/Source/core/css/StylePropertySet.h

Issue 2046243002: Removed the non-const version of PropertyReference::value() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_csscursorimagevalue_reresolveurl_const
Patch Set: Rebase Created 4 years, 5 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, 2008, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 CSSPropertyID id() const { return static_cast<CSSPropertyID>(propertyMet adata().m_propertyID); } 59 CSSPropertyID id() const { return static_cast<CSSPropertyID>(propertyMet adata().m_propertyID); }
60 CSSPropertyID shorthandID() const { return propertyMetadata().shorthandI D(); } 60 CSSPropertyID shorthandID() const { return propertyMetadata().shorthandI D(); }
61 61
62 bool isImportant() const { return propertyMetadata().m_important; } 62 bool isImportant() const { return propertyMetadata().m_important; }
63 bool isInherited() const { return propertyMetadata().m_inherited; } 63 bool isInherited() const { return propertyMetadata().m_inherited; }
64 bool isImplicit() const { return propertyMetadata().m_implicit; } 64 bool isImplicit() const { return propertyMetadata().m_implicit; }
65 65
66 const CSSValue* value() const { return propertyValue(); } 66 const CSSValue* value() const { return propertyValue(); }
67 // FIXME: We should try to remove this mutable overload.
68 CSSValue* value() { return const_cast<CSSValue*>(propertyValue()); }
69 67
70 // FIXME: Remove this. 68 // FIXME: Remove this.
71 CSSProperty toCSSProperty() const { return CSSProperty(propertyMetadata( ), *propertyValue()); } 69 CSSProperty toCSSProperty() const { return CSSProperty(propertyMetadata( ), *propertyValue()); }
72 70
73 const StylePropertyMetadata& propertyMetadata() const; 71 const StylePropertyMetadata& propertyMetadata() const;
74 72
75 private: 73 private:
76 const CSSValue* propertyValue() const; 74 const CSSValue* propertyValue() const;
77 75
78 Member<const StylePropertySet> m_propertySet; 76 Member<const StylePropertySet> m_propertySet;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 inline int StylePropertySet::findPropertyIndex(T property) const 284 inline int StylePropertySet::findPropertyIndex(T property) const
287 { 285 {
288 if (m_isMutable) 286 if (m_isMutable)
289 return toMutableStylePropertySet(this)->findPropertyIndex(property); 287 return toMutableStylePropertySet(this)->findPropertyIndex(property);
290 return toImmutableStylePropertySet(this)->findPropertyIndex(property); 288 return toImmutableStylePropertySet(this)->findPropertyIndex(property);
291 } 289 }
292 290
293 } // namespace blink 291 } // namespace blink
294 292
295 #endif // StylePropertySet_h 293 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | third_party/WebKit/Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698