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

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

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/RuleFeature.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 * (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 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 String result; 229 String result;
230 bool changed = propertySet().removeProperty(propertyID, &result); 230 bool changed = propertySet().removeProperty(propertyID, &result);
231 231
232 didMutate(changed ? PropertyChanged : NoChanges); 232 didMutate(changed ? PropertyChanged : NoChanges);
233 233
234 if (changed) 234 if (changed)
235 mutationScope.enqueueMutationRecord(); 235 mutationScope.enqueueMutationRecord();
236 return result; 236 return result;
237 } 237 }
238 238
239 PassRefPtrWillBeRawPtr<CSSValue> AbstractPropertySetCSSStyleDeclaration::getProp ertyCSSValueInternal(CSSPropertyID propertyID) 239 NullableCSSValue AbstractPropertySetCSSStyleDeclaration::getPropertyCSSValueInte rnal(CSSPropertyID propertyID)
240 { 240 {
241 return propertySet().getPropertyCSSValue(propertyID); 241 return propertySet().getPropertyCSSValue(propertyID);
242 } 242 }
243 243
244 String AbstractPropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPrope rtyID propertyID) 244 String AbstractPropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPrope rtyID propertyID)
245 { 245 {
246 return propertySet().getPropertyValue(propertyID); 246 return propertySet().getPropertyValue(propertyID);
247 } 247 }
248 248
249 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID u nresolvedProperty, const String& value, bool important, ExceptionState&) 249 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID u nresolvedProperty, const String& value, bool important, ExceptionState&)
250 { 250 {
251 StyleAttributeMutationScope mutationScope(this); 251 StyleAttributeMutationScope mutationScope(this);
252 willMutate(); 252 willMutate();
253 253
254 bool changed = propertySet().setProperty(unresolvedProperty, value, importan t, contextStyleSheet()); 254 bool changed = propertySet().setProperty(unresolvedProperty, value, importan t, contextStyleSheet());
255 255
256 didMutate(changed ? PropertyChanged : NoChanges); 256 didMutate(changed ? PropertyChanged : NoChanges);
257 257
258 if (changed) 258 if (changed)
259 mutationScope.enqueueMutationRecord(); 259 mutationScope.enqueueMutationRecord();
260 } 260 }
261 261
262 StyleSheetContents* AbstractPropertySetCSSStyleDeclaration::contextStyleSheet() const 262 StyleSheetContents* AbstractPropertySetCSSStyleDeclaration::contextStyleSheet() const
263 { 263 {
264 CSSStyleSheet* cssStyleSheet = parentStyleSheet(); 264 CSSStyleSheet* cssStyleSheet = parentStyleSheet();
265 return cssStyleSheet ? cssStyleSheet->contents() : 0; 265 return cssStyleSheet ? cssStyleSheet->contents() : 0;
266 } 266 }
267 267
268 bool AbstractPropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID pr opertyID, const CSSValue* propertyValue) const 268 bool AbstractPropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID pr opertyID, const CSSValue propertyValue) const
269 { 269 {
270 return propertySet().propertyMatches(propertyID, propertyValue); 270 return propertySet().propertyMatches(propertyID, propertyValue);
271 } 271 }
272 272
273 DEFINE_TRACE(AbstractPropertySetCSSStyleDeclaration) 273 DEFINE_TRACE(AbstractPropertySetCSSStyleDeclaration)
274 { 274 {
275 CSSStyleDeclaration::trace(visitor); 275 CSSStyleDeclaration::trace(visitor);
276 } 276 }
277 277
278 StyleRuleCSSStyleDeclaration::StyleRuleCSSStyleDeclaration(MutableStylePropertyS et& propertySetArg, CSSRule* parentRule) 278 StyleRuleCSSStyleDeclaration::StyleRuleCSSStyleDeclaration(MutableStylePropertyS et& propertySetArg, CSSRule* parentRule)
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 #endif 380 #endif
381 381
382 DEFINE_TRACE(InlineCSSStyleDeclaration) 382 DEFINE_TRACE(InlineCSSStyleDeclaration)
383 { 383 {
384 visitor->trace(m_parentElement); 384 visitor->trace(m_parentElement);
385 AbstractPropertySetCSSStyleDeclaration::trace(visitor); 385 AbstractPropertySetCSSStyleDeclaration::trace(visitor);
386 } 386 }
387 387
388 } // namespace blink 388 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698