[webkit-reviews] review requested: [Bug 89958] REGRESSION(r107836): box shadow not drawn for opaque images with an opaque background : [Attachment 149641] Patch ready for review.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 26 17:40:47 PDT 2012
Simon Fraser (smfr) <simon.fraser at apple.com> has asked for review:
Bug 89958: REGRESSION(r107836): box shadow not drawn for opaque images with an
opaque background
https://bugs.webkit.org/show_bug.cgi?id=89958
Attachment 149641: Patch ready for review.
https://bugs.webkit.org/attachment.cgi?id=149641&action=review
------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=149641&action=review
> Source/WebCore/rendering/RenderImage.cpp:452
> + return !backgroundIsObscured() &&
RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(bleedAvoidance);
Might be cleaner as:
if
(!RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(bleedAvoidance))
return false;
return ! backgroundIsObscured()
> LayoutTests/fast/box-shadow/image-box-shadow.html:28
> +function addTestImage(color, type) {
> + var canvas = document.createElement('canvas');
> + document.body.appendChild(canvas);
> + canvas.width = canvas.height = 1;
> + var ctx = canvas.getContext("2d");
> + ctx.fillStyle = color;
> + ctx.fillRect(0, 0, 1, 1);
> + var div = document.createElement('div');
> + var img = document.createElement('img');
> + img.src = canvas.toDataURL(type);
> + div.appendChild(img);
Why does this test and the reference need a canvas? Can't you just compare an
opaque <img> with a non-opaque one?
More information about the webkit-reviews
mailing list