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

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

Issue 181783005: Have Element::ensureMutableInlineStyle() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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 | « Source/core/css/CSSKeyframeRule.h ('k') | Source/core/css/CSSPageRule.cpp » ('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 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 void StyleKeyframe::setKeys(PassOwnPtr<Vector<double> > keys) 87 void StyleKeyframe::setKeys(PassOwnPtr<Vector<double> > keys)
88 { 88 {
89 ASSERT(keys && !keys->isEmpty()); 89 ASSERT(keys && !keys->isEmpty());
90 m_keys = keys; 90 m_keys = keys;
91 m_keyText = String(); 91 m_keyText = String();
92 ASSERT(m_keyText.isNull()); 92 ASSERT(m_keyText.isNull());
93 } 93 }
94 94
95 MutableStylePropertySet* StyleKeyframe::mutableProperties() 95 MutableStylePropertySet& StyleKeyframe::mutableProperties()
96 { 96 {
97 if (!m_properties->isMutable()) 97 if (!m_properties->isMutable())
98 m_properties = m_properties->mutableCopy(); 98 m_properties = m_properties->mutableCopy();
99 return toMutableStylePropertySet(m_properties); 99 return *toMutableStylePropertySet(m_properties);
100 } 100 }
101 101
102 void StyleKeyframe::setProperties(PassRefPtr<StylePropertySet> properties) 102 void StyleKeyframe::setProperties(PassRefPtr<StylePropertySet> properties)
103 { 103 {
104 ASSERT(properties);
104 m_properties = properties; 105 m_properties = properties;
105 } 106 }
106 107
107 String StyleKeyframe::cssText() const 108 String StyleKeyframe::cssText() const
108 { 109 {
109 StringBuilder result; 110 StringBuilder result;
110 result.append(keyText()); 111 result.append(keyText());
111 result.appendLiteral(" { "); 112 result.appendLiteral(" { ");
112 String decls = m_properties->asText(); 113 String decls = m_properties->asText();
113 result.append(decls); 114 result.append(decls);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return m_propertiesCSSOMWrapper.get(); 157 return m_propertiesCSSOMWrapper.get();
157 } 158 }
158 159
159 void CSSKeyframeRule::reattach(StyleRuleBase*) 160 void CSSKeyframeRule::reattach(StyleRuleBase*)
160 { 161 {
161 // No need to reattach, the underlying data is shareable on mutation. 162 // No need to reattach, the underlying data is shareable on mutation.
162 ASSERT_NOT_REACHED(); 163 ASSERT_NOT_REACHED();
163 } 164 }
164 165
165 } // namespace WebCore 166 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSKeyframeRule.h ('k') | Source/core/css/CSSPageRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698