The following shape definition results in at shape-margin: 0px: -webkit-shape-margin: 10%; -webkit-shape-outside: inset(40px 100px 40px 0px); I've attached two ref files to go with the test file - one is with just a simple green square element, the other is with the same shape defined with the shape-margin: 20px, which should be the computed value of the 10% in the test file (containing block is 200px x 200px)
Created attachment 226979 [details] Test case for bug
Created attachment 226980 [details] ref file #1 for test - uses shape-margin in px units on the same exact shape
Created attachment 226981 [details] ref file #2 for test - uses simple green square
Created attachment 228556 [details] Patch
Comment on attachment 228556 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=228556&action=review > Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:163 > + float margin = floatValueForLength(m_renderer.style().shapeMargin(), m_renderer.containingBlock() ? m_renderer.containingBlock()->contentWidth() : LayoutUnit()); I like this change! The floatValueForLength will present only here, not in every shape types. Also, Shape class stores a float, so we won't be passing Length all around! Looks good to me.
Comment on attachment 228556 [details] Patch r=me
Comment on attachment 228556 [details] Patch Clearing flags on attachment: 228556 Committed r166787: <http://trac.webkit.org/changeset/166787>
All reviewed patches have been landed. Closing bug.