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

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

Issue 2847303002: Remove unnecessary zoom argument from GetImage() as its value is always available through the Layou… (Closed)
Patch Set: (rebased) Created 3 years, 7 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return images_.at(size); 107 return images_.at(size);
108 } 108 }
109 109
110 void CSSImageGeneratorValue::PutImage(const IntSize& size, 110 void CSSImageGeneratorValue::PutImage(const IntSize& size,
111 PassRefPtr<Image> image) { 111 PassRefPtr<Image> image) {
112 images_.insert(size, std::move(image)); 112 images_.insert(size, std::move(image));
113 } 113 }
114 114
115 PassRefPtr<Image> CSSImageGeneratorValue::GetImage( 115 PassRefPtr<Image> CSSImageGeneratorValue::GetImage(
116 const LayoutObject& layout_object, 116 const LayoutObject& layout_object,
117 const IntSize& size, 117 const IntSize& size) {
118 float zoom) {
119 switch (GetClassType()) { 118 switch (GetClassType()) {
120 case kCrossfadeClass: 119 case kCrossfadeClass:
121 return ToCSSCrossfadeValue(this)->GetImage(layout_object, size); 120 return ToCSSCrossfadeValue(this)->GetImage(layout_object, size);
122 case kLinearGradientClass: 121 case kLinearGradientClass:
123 return ToCSSLinearGradientValue(this)->GetImage(layout_object, size); 122 return ToCSSLinearGradientValue(this)->GetImage(layout_object, size);
124 case kPaintClass: 123 case kPaintClass:
125 return ToCSSPaintValue(this)->GetImage(layout_object, size, zoom); 124 return ToCSSPaintValue(this)->GetImage(layout_object, size);
126 case kRadialGradientClass: 125 case kRadialGradientClass:
127 return ToCSSRadialGradientValue(this)->GetImage(layout_object, size); 126 return ToCSSRadialGradientValue(this)->GetImage(layout_object, size);
128 case kConicGradientClass: 127 case kConicGradientClass:
129 return ToCSSConicGradientValue(this)->GetImage(layout_object, size); 128 return ToCSSConicGradientValue(this)->GetImage(layout_object, size);
130 default: 129 default:
131 NOTREACHED(); 130 NOTREACHED();
132 } 131 }
133 return nullptr; 132 return nullptr;
134 } 133 }
135 134
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 break; 224 break;
226 case kConicGradientClass: 225 case kConicGradientClass:
227 ToCSSConicGradientValue(this)->LoadSubimages(document); 226 ToCSSConicGradientValue(this)->LoadSubimages(document);
228 break; 227 break;
229 default: 228 default:
230 NOTREACHED(); 229 NOTREACHED();
231 } 230 }
232 } 231 }
233 232
234 } // namespace blink 233 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698