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

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

Issue 2044023005: Make PropertyReference value() return a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_remove_style_property_set_mutable_overload
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, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class PropertyValueForSerializer { 67 class PropertyValueForSerializer {
68 STACK_ALLOCATED(); 68 STACK_ALLOCATED();
69 public: 69 public:
70 explicit PropertyValueForSerializer(StylePropertySet::PropertyReference property) 70 explicit PropertyValueForSerializer(StylePropertySet::PropertyReference property)
71 : m_value(property.value()) 71 : m_value(property.value())
72 , m_id(property.id()) 72 , m_id(property.id())
73 , m_isImportant(property.isImportant()) 73 , m_isImportant(property.isImportant())
74 , m_isImplicit(property.isImplicit()) 74 , m_isImplicit(property.isImplicit())
75 , m_isInherited(property.isInherited()) { } 75 , m_isInherited(property.isInherited()) { }
76 76
77 // TODO(sashab): Make this take a const CSSValue&.
77 PropertyValueForSerializer(CSSPropertyID id, const CSSValue* value, bool isImportant) 78 PropertyValueForSerializer(CSSPropertyID id, const CSSValue* value, bool isImportant)
78 : m_value(value) 79 : m_value(value)
79 , m_id(id) 80 , m_id(id)
80 , m_isImportant(isImportant) 81 , m_isImportant(isImportant)
81 , m_isImplicit(value->isImplicitInitialValue()) 82 , m_isImplicit(value->isImplicitInitialValue())
82 , m_isInherited(value->isInheritedValue()) { } 83 , m_isInherited(value->isInheritedValue()) { }
83 84
84 CSSPropertyID id() const { return m_id; } 85 CSSPropertyID id() const { return m_id; }
85 const CSSValue* value() const { return m_value; } 86 const CSSValue* value() const { return m_value; }
86 bool isImportant() const { return m_isImportant; } 87 bool isImportant() const { return m_isImportant; }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 std::bitset<numCSSProperties> m_longhandPropertyUsed; 124 std::bitset<numCSSProperties> m_longhandPropertyUsed;
124 bool m_needToExpandAll; 125 bool m_needToExpandAll;
125 }; 126 };
126 127
127 const StylePropertySetForSerializer m_propertySet; 128 const StylePropertySetForSerializer m_propertySet;
128 }; 129 };
129 130
130 } // namespace blink 131 } // namespace blink
131 132
132 #endif // StylePropertySerializer_h 133 #endif // StylePropertySerializer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | third_party/WebKit/Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698