Changeset 160541 in webkit
- Timestamp:
- Dec 13, 2013 2:32:05 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r160539 r160541 1 2013-12-13 Andreas Kling <akling@apple.com> 2 3 CSSFilterImageValue constructor should require both image and filter. 4 <https://webkit.org/b/125056> 5 6 Make the CSSFilterImageValue::create() helper take both the image and 7 filter CSSValues by PassRef since they should never be null. 8 9 Tweaked ComputedStyleExtractor::valueForFilter() to return a PassRef 10 for this to work. 11 12 Reviewed by Anders Carlsson. 13 1 14 2013-12-12 Andreas Kling <akling@apple.com> 2 15 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r160299 r160541 941 941 942 942 #if ENABLE(CSS_FILTERS) 943 PassRef Ptr<CSSValue> ComputedStyleExtractor::valueForFilter(const RenderObject* renderer, const RenderStyle* style, const FilterOperations& filterOperations, AdjustPixelValuesForComputedStyle adjust)943 PassRef<CSSValue> ComputedStyleExtractor::valueForFilter(const RenderObject* renderer, const RenderStyle* style, const FilterOperations& filterOperations, AdjustPixelValuesForComputedStyle adjust) 944 944 { 945 945 #if !ENABLE(CSS_SHADERS) … … 949 949 return cssValuePool().createIdentifierValue(CSSValueNone); 950 950 951 RefPtr<CSSValueList>list = CSSValueList::createSpaceSeparated();951 auto list = CSSValueList::createSpaceSeparated(); 952 952 953 953 RefPtr<WebKitCSSFilterValue> filterValue; … … 1093 1093 break; 1094 1094 } 1095 list ->append(filterValue.release());1096 } 1097 1098 return list.release();1095 list.get().append(filterValue.release()); 1096 } 1097 1098 return std::move(list); 1099 1099 } 1100 1100 #endif -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h
r159856 r160541 65 65 66 66 #if ENABLE(CSS_FILTERS) 67 static PassRef Ptr<CSSValue> valueForFilter(const RenderObject*, const RenderStyle*, const FilterOperations&, AdjustPixelValuesForComputedStyle = AdjustPixelValues);67 static PassRef<CSSValue> valueForFilter(const RenderObject*, const RenderStyle*, const FilterOperations&, AdjustPixelValuesForComputedStyle = AdjustPixelValues); 68 68 #endif 69 69 -
trunk/Source/WebCore/css/CSSFilterImageValue.h
r160224 r160541 49 49 friend class FilterSubimageObserverProxy; 50 50 public: 51 static PassRef<CSSFilterImageValue> create(PassRef Ptr<CSSValue> imageValue, PassRefPtr<CSSValue> filterValue)51 static PassRef<CSSFilterImageValue> create(PassRef<CSSValue> imageValue, PassRef<CSSValue> filterValue) 52 52 { 53 return adoptRef(*new CSSFilterImageValue( imageValue, filterValue));53 return adoptRef(*new CSSFilterImageValue(std::move(imageValue), std::move(filterValue))); 54 54 } 55 55 -
trunk/Source/WebCore/css/CSSParser.cpp
r160535 r160541 8530 8530 value = args->next(); 8531 8531 8532 result = CSSFilterImageValue::create(imageValue , filterValue);8532 result = CSSFilterImageValue::create(imageValue.releaseNonNull(), filterValue.releaseNonNull()); 8533 8533 8534 8534 filter = result; -
trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
r160528 r160541 218 218 RefPtr<StyleCachedImage> styledImage = StyleCachedImage::create(image); 219 219 auto imageValue = CSSImageValue::create(image->url(), styledImage.get()); 220 RefPtr<CSSValue>filterValue = ComputedStyleExtractor::valueForFilter(anim->renderer(), &anim->renderer()->style(), filterResult, DoNotAdjustPixelValues);221 RefPtr<CSSFilterImageValue> result = CSSFilterImageValue::create(std::move(imageValue), filterValue); 222 result->setFilterOperations(filterResult);223 224 return StyleGeneratedImage::create( *result);220 auto filterValue = ComputedStyleExtractor::valueForFilter(anim->renderer(), &anim->renderer()->style(), filterResult, DoNotAdjustPixelValues); 221 222 auto result = CSSFilterImageValue::create(std::move(imageValue), std::move(filterValue)); 223 result.get().setFilterOperations(filterResult); 224 return StyleGeneratedImage::create(std::move(result)); 225 225 } 226 226 #endif // ENABLE(CSS_FILTERS) … … 285 285 auto fromImageValue = CSSImageValue::create(fromStyleImage->cachedImage()->url(), fromStyleImage); 286 286 auto toImageValue = CSSImageValue::create(toStyleImage->cachedImage()->url(), toStyleImage); 287 RefPtr<CSSCrossfadeValue> crossfadeValue = CSSCrossfadeValue::create(std::move(fromImageValue), std::move(toImageValue)); 288 289 crossfadeValue->setPercentage(CSSPrimitiveValue::create(progress, CSSPrimitiveValue::CSS_NUMBER)); 290 291 return StyleGeneratedImage::create(*crossfadeValue); 287 288 auto crossfadeValue = CSSCrossfadeValue::create(std::move(fromImageValue), std::move(toImageValue)); 289 crossfadeValue.get().setPercentage(CSSPrimitiveValue::create(progress, CSSPrimitiveValue::CSS_NUMBER)); 290 return StyleGeneratedImage::create(std::move(crossfadeValue)); 292 291 } 293 292
Note: See TracChangeset
for help on using the changeset viewer.