Bug 90071

Summary: REGRESSION(r121296): New zero-size background tests asserting on Mac.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, joethomas, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: Unspecified   
Attachments:
Description Flags
Patch
mitz: review+
Latch for panding none

Description Andreas Kling 2012-06-27 06:45:14 PDT
The zero-size background tests added/modified by <http://trac.webkit.org/changeset/121296> (bug 86942) are asserting on the mac bots:

ASSERTION FAILED: patternTransform.isInvertible()
/Volumes/Data/slave/lion-debug/build/Source/WebCore/platform/graphics/cg/ImageCG.cpp(232) : virtual void WebCore::Image::drawPattern(WebCore::GraphicsContext *, const WebCore::FloatRect &, const WebCore::AffineTransform &, const WebCore::FloatPoint &, WebCore::ColorSpace, WebCore::CompositeOperator, const WebCore::FloatRect &)
1   0x107dc5360 WebCore::Image::drawPattern(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::AffineTransform const&, WebCore::FloatPoint const&, WebCore::ColorSpace, WebCore::CompositeOperator, WebCore::FloatRect const&)
2   0x107dbba86 WebCore::Image::drawTiled(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::FloatPoint const&, WebCore::FloatSize const&, WebCore::ColorSpace, WebCore::CompositeOperator)
3   0x107c211b6 WebCore::GraphicsContext::drawTiledImage(WebCore::Image*, WebCore::ColorSpace, WebCore::IntRect const&, WebCore::IntPoint const&, WebCore::IntSize const&, WebCore::CompositeOperator, bool)
4   0x1086b0e11 WebCore::RenderBoxModelObject::paintFillLayerExtended(WebCore::PaintInfo const&, WebCore::Color const&, WebCore::FillLayer const*, WebCore::FractionalLayoutRect const&, WebCore::BackgroundBleedAvoidance, WebCore::InlineFlowBox*, WebCore::FractionalLayoutSize const&, WebCore::CompositeOperator, WebCore::RenderObject*)
5   0x10869247e WebCore::RenderBox::paintFillLayer(WebCore::PaintInfo const&, WebCore::Color const&, WebCore::FillLayer const*, WebCore::FractionalLayoutRect const&, WebCore::BackgroundBleedAvoidance, WebCore::CompositeOperator, WebCore::RenderObject*)
6   0x1086915c0 WebCore::RenderBox::paintFillLayers(WebCore::PaintInfo const&, WebCore::Color const&, WebCore::FillLayer const*, WebCore::FractionalLayoutRect const&, WebCore::BackgroundBleedAvoidance, WebCore::CompositeOperator, WebCore::RenderObject*)
7   0x108691d05 WebCore::RenderBox::paintBackground(WebCore::PaintInfo const&, WebCore::FractionalLayoutRect const&, WebCore::BackgroundBleedAvoidance)
8   0x1086919a1 WebCore::RenderBox::paintBoxDecorations(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
9   0x10862e9e9 WebCore::RenderBlock::paintObject(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
10  0x10862c073 WebCore::RenderBlock::paint(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
11  0x10862e46e WebCore::RenderBlock::paintChildren(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
12  0x10862dff5 WebCore::RenderBlock::paintContents(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
13  0x10862eb62 WebCore::RenderBlock::paintObject(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
14  0x10862c073 WebCore::RenderBlock::paint(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
15  0x10862e46e WebCore::RenderBlock::paintChildren(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
16  0x10862dff5 WebCore::RenderBlock::paintContents(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
17  0x10862eb62 WebCore::RenderBlock::paintObject(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
18  0x10862c073 WebCore::RenderBlock::paint(WebCore::PaintInfo&, WebCore::FractionalLayoutPoint const&)
19  0x10872a969 WebCore::RenderLayer::paintLayerContents(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int)
20  0x108729f77 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int)
21  0x108729619 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int)
22  0x10872b988 WebCore::RenderLayer::paintList(WTF::Vector<WebCore::RenderLayer*, 0ul>*, WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int)
23  0x10872ac79 WebCore::RenderLayer::paintLayerContents(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int)
24  0x108729f77 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int)
25  0x108729619 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int)
26  0x108728fd9 WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::FractionalLayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, unsigned int)
27  0x107bdf824 WebCore::FrameView::paintContents(WebCore::GraphicsContext*, WebCore::IntRect const&)
28  0x10894af8c WebCore::ScrollView::paint(WebCore::GraphicsContext*, WebCore::IntRect const&)
29  0x105b0ef14 WebKit::WebPage::drawRect(WebCore::GraphicsContext&, WebCore::IntRect const&)
30  0x10594e42f WebKit::DrawingAreaImpl::display(WebKit::UpdateInfo&)
31  0x10594d1f4 WebKit::DrawingAreaImpl::display()

Tests in question:

fast/backgrounds/zero-background-size.html (new)
fast/backgrounds/size/zero.html (updated)
Comment 1 Joe Thomas 2012-06-27 08:11:02 PDT
With http://trac.webkit.org/changeset/121296, minimum size of the background-image is set to (0,0) as the spec mandates that. This makes the PatterTransform to be (0,0,0,0) and it hits the assertion. 

We also have a return statement after the assertion for the same condition. So I think we should remove this assertion as this is a valid case now. 

Please let me know your opinion on this. Thanks.
Comment 2 Andreas Kling 2012-06-27 09:35:19 PDT
Created attachment 149763 [details]
Patch
Comment 3 mitz 2012-06-27 09:36:39 PDT
Comment on attachment 149763 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=149763&action=review

> Source/WebCore/platform/graphics/cg/ImageCG.cpp:233
>          // Avoid a hang under CGContextDrawTiledImage on release builds.

This comment needs to be changed or removed, since the return that follows is no longer specific to release builds.
Comment 4 Andreas Kling 2012-06-27 09:48:46 PDT
Created attachment 149765 [details]
Latch for panding
Comment 5 WebKit Review Bot 2012-06-27 10:22:47 PDT
Comment on attachment 149765 [details]
Latch for panding

Clearing flags on attachment: 149765

Committed r121347: <http://trac.webkit.org/changeset/121347>
Comment 6 WebKit Review Bot 2012-06-27 10:22:52 PDT
All reviewed patches have been landed.  Closing bug.