Summary: | [CSS Shapes] shape-margin in percentage units always computes to 0px | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Rebecca Hauck <rhauck> | ||||||||||
Component: | CSS | Assignee: | Bem Jones-Bey <bjonesbe> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | bjonesbe, commit-queue, esprehn+autocc, glenn, gyuyoung.kim, kondapallykalyan, macpherson, menard, zoltan | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 98664 | ||||||||||||
Attachments: |
|
Description
Rebecca Hauck
2014-03-17 16:48:51 PDT
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. |