| OLD | NEW |
| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 result.appendLiteral(", "); | 112 result.appendLiteral(", "); |
| 113 result.append(m_toValue->cssText()); | 113 result.append(m_toValue->cssText()); |
| 114 result.appendLiteral(", "); | 114 result.appendLiteral(", "); |
| 115 result.append(m_percentageValue->cssText()); | 115 result.append(m_percentageValue->cssText()); |
| 116 result.append(')'); | 116 result.append(')'); |
| 117 return result.toString(); | 117 return result.toString(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 PassRefPtrWillBeRawPtr<CSSCrossfadeValue> CSSCrossfadeValue::valueWithURLsMadeAb
solute() | 120 PassRefPtrWillBeRawPtr<CSSCrossfadeValue> CSSCrossfadeValue::valueWithURLsMadeAb
solute() |
| 121 { | 121 { |
| 122 RefPtrWillBeRawPtr<CSSValue> fromValue = m_fromValue->isImageValue() ? toCSS
ImageValue(*m_fromValue).valueWithURLMadeAbsolute() : m_fromValue; | 122 RefPtrWillBeRawPtr<CSSValue> fromValue = m_fromValue; |
| 123 RefPtrWillBeRawPtr<CSSValue> toValue = m_toValue->isImageValue() ? toCSSImag
eValue(*m_toValue).valueWithURLMadeAbsolute() : m_toValue; | 123 if (m_fromValue->isImageValue()) |
| 124 fromValue = toCSSImageValue(*m_fromValue).valueWithURLMadeAbsolute(); |
| 125 RefPtrWillBeRawPtr<CSSValue> toValue = m_toValue; |
| 126 if (m_toValue->isImageValue()) |
| 127 toValue = toCSSImageValue(*m_toValue).valueWithURLMadeAbsolute(); |
| 124 return CSSCrossfadeValue::create(fromValue.release(), toValue.release(), m_p
ercentageValue); | 128 return CSSCrossfadeValue::create(fromValue.release(), toValue.release(), m_p
ercentageValue); |
| 125 } | 129 } |
| 126 | 130 |
| 127 IntSize CSSCrossfadeValue::fixedSize(const LayoutObject* layoutObject) | 131 IntSize CSSCrossfadeValue::fixedSize(const LayoutObject* layoutObject) |
| 128 { | 132 { |
| 129 Image* fromImage = renderableImageForCSSValue(m_fromValue.get(), layoutObjec
t); | 133 Image* fromImage = renderableImageForCSSValue(m_fromValue.get(), layoutObjec
t); |
| 130 Image* toImage = renderableImageForCSSValue(m_toValue.get(), layoutObject); | 134 Image* toImage = renderableImageForCSSValue(m_toValue.get(), layoutObject); |
| 131 | 135 |
| 132 if (!fromImage || !toImage) | 136 if (!fromImage || !toImage) |
| 133 return IntSize(); | 137 return IntSize(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue) | 235 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue) |
| 232 { | 236 { |
| 233 visitor->trace(m_fromValue); | 237 visitor->trace(m_fromValue); |
| 234 visitor->trace(m_toValue); | 238 visitor->trace(m_toValue); |
| 235 visitor->trace(m_percentageValue); | 239 visitor->trace(m_percentageValue); |
| 236 visitor->trace(m_crossfadeSubimageObserver); | 240 visitor->trace(m_crossfadeSubimageObserver); |
| 237 CSSImageGeneratorValue::traceAfterDispatch(visitor); | 241 CSSImageGeneratorValue::traceAfterDispatch(visitor); |
| 238 } | 242 } |
| 239 | 243 |
| 240 } // namespace blink | 244 } // namespace blink |
| OLD | NEW |