Changeset 106973 in webkit
- Timestamp:
- Feb 7, 2012 12:04:23 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106972 r106973 1 2012-02-07 Matthew Delaney <mdelaney@apple.com> 2 3 Remove redundant checks in CanvasRenderingContext2D.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=78000 5 6 Reviewed by Dan Bernstein. 7 8 * html/canvas/CanvasRenderingContext2D.cpp: 9 (WebCore::CanvasRenderingContext2D::setShadowColor): 10 (WebCore::CanvasRenderingContext2D::setShadow): 11 (WebCore::CanvasRenderingContext2D::drawImage): 12 1 13 2012-02-07 Abhishek Arya <inferno@chromium.org> 2 14 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r106836 r106973 497 497 if (!parseColorOrCurrentColor(state().m_shadowColor, color, canvas())) 498 498 return; 499 500 499 applyShadow(); 501 500 } … … 1146 1145 state().m_shadowBlur = blur; 1147 1146 state().m_shadowColor = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, 1.0f); 1148 1149 GraphicsContext* c = drawingContext();1150 if (!c)1151 return;1152 1153 1147 applyShadow(); 1154 1148 } … … 1164 1158 state().m_shadowOffset = FloatSize(width, height); 1165 1159 state().m_shadowBlur = blur; 1166 1167 GraphicsContext* c = drawingContext();1168 if (!c)1169 return;1170 1171 1160 applyShadow(); 1172 1161 } … … 1177 1166 state().m_shadowBlur = blur; 1178 1167 state().m_shadowColor = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, alpha); 1179 1180 GraphicsContext* c = drawingContext();1181 if (!c)1182 return;1183 1184 1168 applyShadow(); 1185 1169 } … … 1190 1174 state().m_shadowBlur = blur; 1191 1175 state().m_shadowColor = makeRGBA32FromFloats(r, g, b, a); 1192 1193 GraphicsContext* c = drawingContext();1194 if (!c)1195 return;1196 1197 1176 applyShadow(); 1198 1177 } … … 1295 1274 float dx, float dy, float dw, float dh, ExceptionCode& ec) 1296 1275 { 1297 if (!image) {1298 ec = TYPE_MISMATCH_ERR;1299 return;1300 }1301 1276 drawImage(image, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), ec); 1302 1277 } … … 1367 1342 void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, float x, float y, ExceptionCode& ec) 1368 1343 { 1369 if (!sourceCanvas) {1370 ec = TYPE_MISMATCH_ERR;1371 return;1372 }1373 1374 1344 drawImage(sourceCanvas, 0, 0, sourceCanvas->width(), sourceCanvas->height(), x, y, sourceCanvas->width(), sourceCanvas->height(), ec); 1375 1345 } … … 1378 1348 float x, float y, float width, float height, ExceptionCode& ec) 1379 1349 { 1380 if (!sourceCanvas) {1381 ec = TYPE_MISMATCH_ERR;1382 return;1383 }1384 1350 drawImage(sourceCanvas, FloatRect(0, 0, sourceCanvas->width(), sourceCanvas->height()), FloatRect(x, y, width, height), ec); 1385 1351 }
Note: See TracChangeset
for help on using the changeset viewer.