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

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

Issue 1306283006: BackgroundImage incorrectly returns empty url() when created on-the-fly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/CSSCrossfadeValue.h ('k') | Source/core/css/CSSImageGeneratorValue.h » ('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 * 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 result.appendLiteral("-webkit-cross-fade("); 110 result.appendLiteral("-webkit-cross-fade(");
111 result.append(m_fromValue->cssText()); 111 result.append(m_fromValue->cssText());
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()
121 {
122 RefPtrWillBeRawPtr<CSSValue> fromValue = m_fromValue->isImageValue() ? toCSS ImageValue(*m_fromValue).valueWithURLMadeAbsolute() : m_fromValue;
123 RefPtrWillBeRawPtr<CSSValue> toValue = m_toValue->isImageValue() ? toCSSImag eValue(*m_toValue).valueWithURLMadeAbsolute() : m_toValue;
124 return CSSCrossfadeValue::create(fromValue.release(), toValue.release(), m_p ercentageValue);
125 }
126
120 IntSize CSSCrossfadeValue::fixedSize(const LayoutObject* layoutObject) 127 IntSize CSSCrossfadeValue::fixedSize(const LayoutObject* layoutObject)
121 { 128 {
122 Image* fromImage = renderableImageForCSSValue(m_fromValue.get(), layoutObjec t); 129 Image* fromImage = renderableImageForCSSValue(m_fromValue.get(), layoutObjec t);
123 Image* toImage = renderableImageForCSSValue(m_toValue.get(), layoutObject); 130 Image* toImage = renderableImageForCSSValue(m_toValue.get(), layoutObject);
124 131
125 if (!fromImage || !toImage) 132 if (!fromImage || !toImage)
126 return IntSize(); 133 return IntSize();
127 134
128 IntSize fromImageSize = fromImage->size(); 135 IntSize fromImageSize = fromImage->size();
129 IntSize toImageSize = toImage->size(); 136 IntSize toImageSize = toImage->size();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue) 231 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue)
225 { 232 {
226 visitor->trace(m_fromValue); 233 visitor->trace(m_fromValue);
227 visitor->trace(m_toValue); 234 visitor->trace(m_toValue);
228 visitor->trace(m_percentageValue); 235 visitor->trace(m_percentageValue);
229 visitor->trace(m_crossfadeSubimageObserver); 236 visitor->trace(m_crossfadeSubimageObserver);
230 CSSImageGeneratorValue::traceAfterDispatch(visitor); 237 CSSImageGeneratorValue::traceAfterDispatch(visitor);
231 } 238 }
232 239
233 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSCrossfadeValue.h ('k') | Source/core/css/CSSImageGeneratorValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698