Bug 123743

Summary: [CSS Shapes] image valued shape element margin can cause an ASSERT fail
Product: WebKit Reporter: Hans Muller <giles_joplin>
Component: CSSAssignee: Hans Muller <giles_joplin>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kling, kondapallykalyan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 116348    
Attachments:
Description Flags
Test case.
none
Patch none

Description Hans Muller 2013-11-04 09:24:41 PST
Specifying a non-zero shape-margin value for an image with an above shape-image-threshold pixels  0,0 (for example) will cause an assertion failure.
Comment 1 Hans Muller 2013-11-04 11:02:43 PST
Created attachment 215932 [details]
Test case.

The attached test case demonstrates that the problem is due to specifying a non-zero margin (not shape-margin) for the shape-outside element.
Comment 2 Hans Muller 2013-11-04 12:16:44 PST
Created attachment 215940 [details]
Patch

When margin-top is specified for a shape's element, the Y coordinates passed to RasterShapeIntervals::getExcludedIntervals() may be negative. This is because the incoming logical coordinates are relative to the content or padding box, depending on the box-sizing property. The RasterShape::getExcludedIntervals() method now clips the incoming Y coordinates to the shape's bounds.
Comment 3 WebKit Commit Bot 2013-11-04 14:37:51 PST
Comment on attachment 215940 [details]
Patch

Clearing flags on attachment: 215940

Committed r158596: <http://trac.webkit.org/changeset/158596>
Comment 4 WebKit Commit Bot 2013-11-04 14:37:53 PST
All reviewed patches have been landed.  Closing bug.