Changeset 106415 in webkit
- Timestamp:
- Jan 31, 2012 5:21:32 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106414 r106415 1 2012-01-31 Matthew Delaney <mdelaney@apple.com> 2 3 Failing 2d.shadow.enable.off.2.html on Lion 4 https://bugs.webkit.org/show_bug.cgi?id=77489 5 6 Reviewed by Dan Bernstein. 7 8 * platform/mac-lion/Skipped: We can unskip this test now that this patch has us passing this test. 9 1 10 2012-01-31 Oliver Hunt <oliver@apple.com> 2 11 -
trunk/LayoutTests/platform/mac-lion/Skipped
r106310 r106415 1 1 # --- Canvas --- 2 3 # <rdar://problem/9121810>4 canvas/philip/tests/2d.shadow.enable.off.2.html5 2 6 3 # This test incorrectly checks the shadow blur's distance and needs to be fixed -
trunk/Source/WebCore/ChangeLog
r106411 r106415 1 2012-01-31 Matthew Delaney <mdelaney@apple.com> 2 3 Failing 2d.shadow.enable.off.2.html on Lion 4 https://bugs.webkit.org/show_bug.cgi?id=77489 5 6 Reviewed by Dan Bernstein. 7 8 The canvas spec requires that shadows not be drawn under certain 9 circumstances outlined here: http://www.whatwg.org/specs/web-apps/current-work/#shadows 10 This patch adds in those checks which allows us to pass now (on Lion) 11 the philip canvas test that was checking that constraint. 12 13 No new tests. Unskipping the test on Lion that this patch fixes. 14 15 * html/canvas/CanvasRenderingContext2D.cpp: 16 (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault): 17 (WebCore::CanvasRenderingContext2D::setShadow): 18 (WebCore::CanvasRenderingContext2D::applyShadow): 19 (WebCore::CanvasRenderingContext2D::shouldDrawShadows): 20 * html/canvas/CanvasRenderingContext2D.h: 21 (CanvasRenderingContext2D): 22 1 23 2012-01-31 Anders Carlsson <andersca@apple.com> 2 24 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r106247 r106415 316 316 return; 317 317 318 context->setLegacyShadow(FloatSize(), 0, Color::transparent, ColorSpaceDeviceRGB);318 applyShadow(); 319 319 context->setAlpha(1); 320 320 context->setCompositeOperation(CompositeSourceOver); … … 1151 1151 return; 1152 1152 1153 c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);1153 applyShadow(); 1154 1154 } 1155 1155 … … 1169 1169 return; 1170 1170 1171 c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);1171 applyShadow(); 1172 1172 } 1173 1173 … … 1182 1182 return; 1183 1183 1184 c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);1184 applyShadow(); 1185 1185 } 1186 1186 … … 1195 1195 return; 1196 1196 1197 c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);1197 applyShadow(); 1198 1198 } 1199 1199 … … 1215 1215 CGColorRelease(shadowColor); 1216 1216 #else 1217 dc->setLegacyShadow(FloatSize(width, -height), blur, state().m_shadowColor, ColorSpaceDeviceRGB);1217 applyShadow(); 1218 1218 #endif 1219 1219 } … … 1233 1233 return; 1234 1234 1235 float width = state().m_shadowOffset.width(); 1236 float height = state().m_shadowOffset.height(); 1237 c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB); 1235 if (shouldDrawShadows()) { 1236 float width = state().m_shadowOffset.width(); 1237 float height = state().m_shadowOffset.height(); 1238 c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB); 1239 } else 1240 c->setLegacyShadow(FloatSize(), 0, Color::transparent, ColorSpaceDeviceRGB); 1241 } 1242 1243 bool CanvasRenderingContext2D::shouldDrawShadows() const 1244 { 1245 return alphaChannel(state().m_shadowColor) && (state().m_shadowBlur || !state().m_shadowOffset.isZero()); 1238 1246 } 1239 1247 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h
r99349 r106415 279 279 280 280 void applyShadow(); 281 bool shouldDrawShadows() const; 281 282 282 283 void didDraw(const FloatRect&, unsigned options = CanvasDidDrawApplyAll);
Note: See TracChangeset
for help on using the changeset viewer.