Changeset 200889 in webkit
- Timestamp:
- May 13, 2016, 3:40:57 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r200888 r200889 1 2016-05-13 Simon Fraser <simon.fraser@apple.com> 2 3 cross-fade() rendering doesn't match expectation 4 https://bugs.webkit.org/show_bug.cgi?id=157665 5 rdar://problem/17917708 6 7 Reviewed by Dean Jackson. 8 9 Make css3/images/cross-fade-blending.html a ref test. 10 11 * css3/images/cross-fade-blending-expected.html: Added. 12 * css3/images/cross-fade-blending-expected.png: Removed. 13 * css3/images/cross-fade-blending-expected.txt: Removed. 14 * css3/images/cross-fade-blending.html: 15 * platform/mac/css3/images/cross-fade-blending-expected.png: Removed. 16 1 17 2016-05-13 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/LayoutTests/css3/images/cross-fade-blending.html
r100535 r200889 3 3 div 4 4 { 5 6 5 width: 200px; 6 height: 100px; 7 7 } 8 8 9 div.crossfade 9 .crossfade1 10 10 { 11 background-image: -webkit-cross-fade(url(resources/green-10.png), url(resources/green-10.png), 50%); 11 background-image: cross-fade(url(resources/green-10.png), url(resources/green-10.png), 50%); 12 } 13 14 .crossfade2 15 { 16 background-image: cross-fade(url(resources/green-10.png), url(resources/green-10-2.png), 50%); 12 17 } 13 18 </style> 14 <!--The first cross-fade should appear as a 100% green square, 200x200px.--> 15 <div class="crossfade"></div> 16 <div style="background-color: black"><div class="crossfade"></div></div> 19 <!-- All rectangles should look the same--> 20 <div class="crossfade1"></div> 21 <div class="crossfade2"></div> 22 <div style="background-color: black"><div class="crossfade2"></div></div> 17 23 </html> -
trunk/Source/WebCore/ChangeLog
r200888 r200889 1 2016-05-13 Simon Fraser <simon.fraser@apple.com> 2 3 cross-fade() rendering doesn't match expectation 4 https://bugs.webkit.org/show_bug.cgi?id=157665 5 rdar://problem/17917708 6 7 Reviewed by Dean Jackson. 8 9 Cross-fading two opaque images would result in a non-opaque result in between the endpoints, 10 probably because r157045 caused both images to be drawn with srcOver, since drawImage() 11 clobbers the composite operation in the context. 12 13 Fix by passing the composite operation to the drawImage() calls for the non-transparency layer 14 code path. 15 16 Converted css3/images/cross-fade-blending.html into a ref test to test this. 17 18 * platform/graphics/CrossfadeGeneratedImage.cpp: 19 (WebCore::drawCrossfadeSubimage): 20 1 21 2016-05-13 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
r192140 r200889 51 51 52 52 GraphicsContextStateSaver stateSaver(context); 53 54 CompositeOperator drawImageOperation = operation; 53 55 54 context.setCompositeOperation(operation); 55 56 if (useTransparencyLayer) 56 if (useTransparencyLayer) { 57 context.setCompositeOperation(operation); 57 58 context.beginTransparencyLayer(opacity); 58 else 59 drawImageOperation = CompositeSourceOver; 60 } else 59 61 context.setAlpha(opacity); 60 62 61 63 if (targetSize != imageSize) 62 64 context.scale(FloatSize(targetSize.width() / imageSize.width(), targetSize.height() / imageSize.height())); 63 context.drawImage(image, IntPoint()); 65 66 context.drawImage(image, IntPoint(), ImagePaintingOptions(drawImageOperation)); 64 67 65 68 if (useTransparencyLayer)
Note:
See TracChangeset
for help on using the changeset viewer.