Bug 193346 - [LFC][BFC][MarginCollapsing] Adjust vertical position when box margin collapses through.
Summary: [LFC][BFC][MarginCollapsing] Adjust vertical position when box margin collaps...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
Keywords: InRadar
Depends on:
Reported: 2019-01-10 21:41 PST by zalan
Modified: 2019-01-11 08:26 PST (History)
6 users (show)

See Also:

Patch (18.09 KB, patch)
2019-01-10 21:53 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (18.41 KB, patch)
2019-01-11 07:45 PST, zalan
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2019-01-10 21:41:37 PST

If the top and bottom margins of a box are adjoining, then it is possible for margins to collapse through it. In this case, the position of the element depends on its relationship with the other elements whose margins are being collapsed.

If the element's margins are collapsed with its parent's top margin, the top border edge of the box is defined to be the same as the parent's.
Otherwise, either the element's parent is not taking part in the margin collapsing, or only the parent's bottom margin is involved. The position of the element's top border edge is the same as it would have been if the element had a non-zero bottom border.
Comment 1 zalan 2019-01-10 21:53:52 PST
Created attachment 358876 [details]
Comment 2 zalan 2019-01-11 07:45:29 PST
Created attachment 358895 [details]
Comment 3 zalan 2019-01-11 08:19:48 PST
Committed r239863: <https://trac.webkit.org/changeset/239863>
Comment 4 Radar WebKit Bug Importer 2019-01-11 08:20:30 PST