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

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

Issue 1756763004: Merge image sizing algorithms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unused variable 'styleImage' in release Created 4 years, 9 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 case LinearGradientClass: 148 case LinearGradientClass:
149 return toCSSLinearGradientValue(this)->isFixedSize(); 149 return toCSSLinearGradientValue(this)->isFixedSize();
150 case RadialGradientClass: 150 case RadialGradientClass:
151 return toCSSRadialGradientValue(this)->isFixedSize(); 151 return toCSSRadialGradientValue(this)->isFixedSize();
152 default: 152 default:
153 ASSERT_NOT_REACHED(); 153 ASSERT_NOT_REACHED();
154 } 154 }
155 return false; 155 return false;
156 } 156 }
157 157
158 IntSize CSSImageGeneratorValue::fixedSize(const LayoutObject* layoutObject) 158 IntSize CSSImageGeneratorValue::fixedSize(const LayoutObject* layoutObject, cons t FloatSize& defaultObjectSize)
159 { 159 {
160 switch (getClassType()) { 160 switch (getClassType()) {
161 case CrossfadeClass: 161 case CrossfadeClass:
162 return toCSSCrossfadeValue(this)->fixedSize(layoutObject); 162 return toCSSCrossfadeValue(this)->fixedSize(layoutObject, defaultObjectS ize);
163 case LinearGradientClass: 163 case LinearGradientClass:
164 return toCSSLinearGradientValue(this)->fixedSize(layoutObject); 164 return toCSSLinearGradientValue(this)->fixedSize(layoutObject);
165 case RadialGradientClass: 165 case RadialGradientClass:
166 return toCSSRadialGradientValue(this)->fixedSize(layoutObject); 166 return toCSSRadialGradientValue(this)->fixedSize(layoutObject);
167 default: 167 default:
168 ASSERT_NOT_REACHED(); 168 ASSERT_NOT_REACHED();
169 } 169 }
170 return IntSize(); 170 return IntSize();
171 } 171 }
172 172
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 break; 211 break;
212 case RadialGradientClass: 212 case RadialGradientClass:
213 toCSSRadialGradientValue(this)->loadSubimages(document); 213 toCSSRadialGradientValue(this)->loadSubimages(document);
214 break; 214 break;
215 default: 215 default:
216 ASSERT_NOT_REACHED(); 216 ASSERT_NOT_REACHED();
217 } 217 }
218 } 218 }
219 219
220 } // namespace blink 220 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698