Bug 123769 - [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
Summary: [CSS Shapes] Image valued shape-outside that extends vertically into the marg...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hans Muller
Depends on:
Blocks: 116348
  Show dependency treegraph
Reported: 2013-11-04 16:52 PST by Hans Muller
Modified: 2013-11-08 15:45 PST (History)
7 users (show)

See Also:

Test case. (1.27 KB, text/html)
2013-11-04 16:52 PST, Hans Muller
no flags Details
Patch (12.94 KB, patch)
2013-11-07 11:03 PST, Hans Muller
krit: review+
Details | Formatted Diff | Diff
Patch (13.00 KB, patch)
2013-11-08 15:28 PST, Hans Muller
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Muller 2013-11-04 16:52:26 PST
Created attachment 215972 [details]
Test case.

If shape-margin is specified it can cause the shape to extend outside the content-box on all four sides. Currently, the part of the shape-margin boundary that extends above the content-box is clipped.

The attached test case demonstrates this. The layout of the lines of text above the rectangle should mirror the layout of the lines below the rectangle.

Note also: despite the apparent similarities, this bug doesn't haven anything to do with the patch for https://bugs.webkit.org/show_bug.cgi?id=123743.
Comment 1 Hans Muller 2013-11-07 11:03:13 PST
Created attachment 216315 [details]

Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals() method now generates intervals with Y coordinates that begin at the image shape's bounds.y - shape-margin, which may be less than 0.

The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter by the shape-margin. A non-const overload of the method was added to centralize all access to m_intervalLists.
Comment 2 Dirk Schulze 2013-11-08 13:57:48 PST
Comment on attachment 216315 [details]

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

r=me Looks like the patch does not apply anymore though.

> LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004-expected.html:6
> +        font: 25px/1 Ahem, sans-serif;

Snippet , but it looks weird to have 25px/1, could you add spaces please? :) Ditto for the others.
Comment 3 Hans Muller 2013-11-08 15:28:08 PST
Created attachment 216452 [details]

Made the requested changes.
Comment 4 WebKit Commit Bot 2013-11-08 15:44:59 PST
Comment on attachment 216452 [details]

Clearing flags on attachment: 216452

Committed r158967: <http://trac.webkit.org/changeset/158967>
Comment 5 WebKit Commit Bot 2013-11-08 15:45:00 PST
All reviewed patches have been landed.  Closing bug.