Bug 47554 - An inline element with an absolutely positioned child does not correctly calculate/render padding and margin
Summary: An inline element with an absolutely positioned child does not correctly calc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Robert Hogan
URL:
Keywords:
Depends on: 108226
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-12 13:42 PDT by Chadwick Dahlquist
Modified: 2013-04-15 11:22 PDT (History)
5 users (show)

See Also:


Attachments
HTML page that recreates the issue (1.81 KB, text/html)
2010-10-12 13:42 PDT, Chadwick Dahlquist
no flags Details
Patch (5.33 KB, patch)
2013-04-14 04:42 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chadwick Dahlquist 2010-10-12 13:42:08 PDT
Created attachment 70560 [details]
HTML page that recreates the issue

Given one or more inline elements with padding or margin ("spans") flowing inside a fixed container, adding an absolutely positioned child to the span causes the spans to overflow beyond the bounds of the container.  Removing the absolutely positioned child (or setting 'display: none') results in normal flow.

It appears as if the presence of the absolutely positioned child causes the margin/padding dimensions to not be summed, as the overflow is proportional to the cumulative margin and padding. 

The attached file renders correctly (or as expected) in Mozilla.
Comment 1 Robert Hogan 2013-04-14 04:42:03 PDT
Created attachment 197983 [details]
Patch
Comment 2 Dave Hyatt 2013-04-15 10:48:15 PDT
Comment on attachment 197983 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2013-04-15 11:22:19 PDT
Comment on attachment 197983 [details]
Patch

Clearing flags on attachment: 197983

Committed r148453: <http://trac.webkit.org/changeset/148453>
Comment 4 WebKit Commit Bot 2013-04-15 11:22:20 PDT
All reviewed patches have been landed.  Closing bug.