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

Side by Side Diff: Source/core/animation/css/CSSAnimatableValueFactory.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: Some small fixes to (hopefully) fix some broken tests Created 5 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthSize(const LengthSize& lengthSize, const ComputedStyle& style) 171 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthSize(const LengthSize& lengthSize, const ComputedStyle& style)
172 { 172 {
173 return AnimatableLengthSize::create( 173 return AnimatableLengthSize::create(
174 createFromLength(lengthSize.width(), style), 174 createFromLength(lengthSize.width(), style),
175 createFromLength(lengthSize.height(), style)); 175 createFromLength(lengthSize.height(), style));
176 } 176 }
177 177
178 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromStyleImage(Style Image* image) 178 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromStyleImage(Style Image* image)
179 { 179 {
180 if (image) { 180 if (image) {
181 if (RefPtrWillBeRawPtr<CSSValue> cssValue = image->cssValue()) 181 return AnimatableImage::create(CSSValue(image->cssValue()));
182 return AnimatableImage::create(cssValue.release());
183 } 182 }
184 return AnimatableUnknown::create(CSSValueNone); 183 return AnimatableUnknown::create(CSSValueNone);
185 } 184 }
186 185
187 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillSize(const F illSize& fillSize, const ComputedStyle& style) 186 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillSize(const F illSize& fillSize, const ComputedStyle& style)
188 { 187 {
189 switch (fillSize.type) { 188 switch (fillSize.type) {
190 case SizeLength: 189 case SizeLength:
191 return createFromLengthSize(fillSize.size, style); 190 return createFromLengthSize(fillSize.size, style);
192 case Contain: 191 case Contain:
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 return createFromLength(style.svgStyle().ry(), style); 562 return createFromLength(style.svgStyle().ry(), style);
564 case CSSPropertyZIndex: 563 case CSSPropertyZIndex:
565 return createFromDouble(style.zIndex()); 564 return createFromDouble(style.zIndex());
566 default: 565 default:
567 ASSERT_NOT_REACHED(); 566 ASSERT_NOT_REACHED();
568 return nullptr; 567 return nullptr;
569 } 568 }
570 } 569 }
571 570
572 } // namespace blink 571 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698