Changeset 95235 in webkit
- Timestamp:
- Sep 15, 2011 2:59:10 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95228 r95235 1 2011-09-15 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Test for: Crash in RenderBox::paintMaskImages due to a mask without an associated image 4 https://bugs.webkit.org/show_bug.cgi?id=50151 5 6 Reviewed by Simon Fraser. 7 8 * fast/css/empty-webkit-mask-crash-expected.png: Added. 9 * fast/css/empty-webkit-mask-crash-expected.txt: Added. 10 * fast/css/empty-webkit-mask-crash.html: Added. 11 1 12 2011-09-15 Andy Estes <aestes@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r95234 r95235 1 2011-09-15 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Crash in RenderBox::paintMaskImages due to a mask without an associated image 4 https://bugs.webkit.org/show_bug.cgi?id=50151 5 6 Reviewed by Simon Fraser. 7 8 Test: fast/css/empty-webkit-mask-crash.html 9 10 The crash stems from the fact that FillLayer::hasImage would walk over the linked list 11 of FillLayers and return true if one had an image. This means that hasImage() is true 12 does not mean that image() is non-NULL on all FillLayers. 13 14 * rendering/RenderBox.cpp: 15 (WebCore::RenderBox::paintMaskImages): Simplify the logic by doing the hasImage() check up-front 16 and properly check image() for each FillLayers. This has the nice benefit of changing the complexity 17 from O(n^2) to O(n), which was what the code expected anyway. 18 1 19 2011-09-15 Eric Seidel <eric@webkit.org> 2 20 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r94912 r95235 950 950 pushTransparencyLayer = true; 951 951 952 if (maskBoxImage && maskLayers->hasImage()) { 952 bool hasMaskLayerWithImage = maskLayers->hasImage(); 953 if (maskBoxImage && hasMaskLayerWithImage) { 953 954 // We have a mask-box-image and mask-image, so need to composite them together before using the result as a mask. 954 955 pushTransparencyLayer = true; 955 } else {956 } else if (hasMaskLayerWithImage) { 956 957 // We have to use an extra image buffer to hold the mask. Multiple mask images need 957 958 // to composite together using source-over so that they can then combine into a single unified mask that … … 962 963 // before pushing the transparency layer. 963 964 for (const FillLayer* fillLayer = maskLayers->next(); fillLayer; fillLayer = fillLayer->next()) { 964 if (fillLayer-> hasImage() && fillLayer->image()->canRender(style()->effectiveZoom())) {965 if (fillLayer->image() && fillLayer->image()->canRender(style()->effectiveZoom())) { 965 966 pushTransparencyLayer = true; 966 967 // We found one image that can be used in rendering, exit the loop
Note: See TracChangeset
for help on using the changeset viewer.