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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp

Issue 1555633002: Oilpan: prefinalize CSSCrossfadeValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace Created 4 years, 11 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 | « third_party/WebKit/Source/core/css/CSSCrossfadeValue.h ('k') | no next file » | 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 static Image* renderableImageForCSSValue(CSSValue* value, const LayoutObject* la youtObject) 86 static Image* renderableImageForCSSValue(CSSValue* value, const LayoutObject* la youtObject)
87 { 87 {
88 ImageResource* cachedImage = cachedImageForCSSValue(value, &layoutObject->do cument()); 88 ImageResource* cachedImage = cachedImageForCSSValue(value, &layoutObject->do cument());
89 89
90 if (!cachedImage || !cachedImage->canRender()) 90 if (!cachedImage || !cachedImage->canRender())
91 return nullptr; 91 return nullptr;
92 92
93 return cachedImage->image(); 93 return cachedImage->image();
94 } 94 }
95 95
96 CSSCrossfadeValue::CSSCrossfadeValue(PassRefPtrWillBeRawPtr<CSSValue> fromValue, PassRefPtrWillBeRawPtr<CSSValue> toValue, PassRefPtrWillBeRawPtr<CSSPrimitiveVa lue> percentageValue)
97 : CSSImageGeneratorValue(CrossfadeClass)
98 , m_fromValue(fromValue)
99 , m_toValue(toValue)
100 , m_percentageValue(percentageValue)
101 , m_cachedFromImage(nullptr)
102 , m_cachedToImage(nullptr)
103 , m_crossfadeSubimageObserver(this)
104 {
105 #if ENABLE(OILPAN)
106 ThreadState::current()->registerPreFinalizer(this);
107 #endif
108 }
109
96 CSSCrossfadeValue::~CSSCrossfadeValue() 110 CSSCrossfadeValue::~CSSCrossfadeValue()
97 { 111 {
112 #if !ENABLE(OILPAN)
113 dispose();
114 #endif
115 }
116
117 void CSSCrossfadeValue::dispose()
118 {
98 if (m_cachedFromImage) 119 if (m_cachedFromImage)
99 m_cachedFromImage->removeClient(&m_crossfadeSubimageObserver); 120 m_cachedFromImage->removeClient(&m_crossfadeSubimageObserver);
100 if (m_cachedToImage) 121 if (m_cachedToImage)
101 m_cachedToImage->removeClient(&m_crossfadeSubimageObserver); 122 m_cachedToImage->removeClient(&m_crossfadeSubimageObserver);
102 } 123 }
103 124
104 String CSSCrossfadeValue::customCSSText() const 125 String CSSCrossfadeValue::customCSSText() const
105 { 126 {
106 StringBuilder result; 127 StringBuilder result;
107 result.appendLiteral("-webkit-cross-fade("); 128 result.appendLiteral("-webkit-cross-fade(");
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue) 253 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue)
233 { 254 {
234 visitor->trace(m_fromValue); 255 visitor->trace(m_fromValue);
235 visitor->trace(m_toValue); 256 visitor->trace(m_toValue);
236 visitor->trace(m_percentageValue); 257 visitor->trace(m_percentageValue);
237 visitor->trace(m_crossfadeSubimageObserver); 258 visitor->trace(m_crossfadeSubimageObserver);
238 CSSImageGeneratorValue::traceAfterDispatch(visitor); 259 CSSImageGeneratorValue::traceAfterDispatch(visitor);
239 } 260 }
240 261
241 } // namespace blink 262 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSCrossfadeValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698