NEW 104944
[CSS Fragmentation] Implement correct margin truncation at breaks
https://bugs.webkit.org/show_bug.cgi?id=104944
Summary [CSS Fragmentation] Implement correct margin truncation at breaks
Andrei Bucur
Reported 2012-12-13 13:18:38 PST
The paragraph at http://www.w3.org/TR/css3-break/#break-margins states the bottom margins before a forced break get truncated. When an unforced break occurs, both the top/bottom margins are truncated. Use this bug to track the progress for the implementation of this mechanism in regions, columns and pages.
Attachments
A test case with bottom margin not getting truncated after a forced break. (392 bytes, text/html)
2013-01-25 13:55 PST, Andrei Bucur
no flags
WIP Patch (5.82 KB, patch)
2013-01-28 09:58 PST, Andrei Bucur
buildbot: commit-queue-
minimum html / css reproduction (761 bytes, text/html)
2025-05-07 12:20 PDT, jollyjerry
no flags
Andrei Bucur
Comment 1 2013-01-25 13:55:30 PST
Created attachment 184806 [details] A test case with bottom margin not getting truncated after a forced break.
Andrei Bucur
Comment 2 2013-01-28 09:58:10 PST
Created attachment 184999 [details] WIP Patch
WebKit Review Bot
Comment 3 2013-01-28 09:59:38 PST
Attachment 184999 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/fast/block/margin-collapse/webkit-margin-collapse-siblings.html', u'Source/WebCore/rendering/RenderBlock.cpp']" exit_code: 1 Source/WebCore/rendering/RenderBlock.cpp:2030: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andrei Bucur
Comment 4 2013-01-28 10:04:53 PST
(In reply to comment #2) > Created an attachment (id=184999) [details] > Patch Very early version of the patch showing the approach to fix the -webkit-margins-collapse properties. Unfortunately there's little to nothing specified about this property http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/css/property/-webkit-margin-collapse The test is supposed to cover all the possible combinations of that property between siblings. A reference page will pair it in the final patch. I have a feeling all this logic can be somehow simplified. I'll give this idea a spin in the next version.
Build Bot
Comment 5 2013-01-28 10:11:07 PST
Comment on attachment 184999 [details] WIP Patch Attachment 184999 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16152714 New failing tests: compositing/checkerboard.html compositing/geometry/abs-position-inside-opacity.html compositing/geometry/bounds-clipped-composited-child.html compositing/iframes/become-overlapped-iframe.html animations/3d/matrix-transform-type-animation.html compositing/iframes/connect-compositing-iframe-delayed.html compositing/direct-image-compositing.html compositing/iframes/connect-compositing-iframe2.html animations/additive-transform-animations.html compositing/columns/composited-in-paginated.html compositing/layers-inside-overflow-scroll.html compositing/generated-content.html compositing/geometry/composited-in-columns.html compositing/iframes/connect-compositing-iframe3.html accessibility/lists.html compositing/images/direct-image-background-color.html compositing/geometry/ancestor-overflow-change.html compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html compositing/iframes/connect-compositing-iframe.html compositing/iframes/become-composited-nested-iframes.html compositing/geometry/clipping-foreground.html compositing/clip-child-by-non-stacking-ancestor.html compositing/iframes/composited-parent-iframe.html compositing/compositing-visible-descendant.html compositing/overflow-trumps-transform-style.html compositing/iframes/composited-iframe-alignment.html compositing/backing/no-backing-for-clip.html compositing/backing/no-backing-for-clip-overlap.html compositing/backing/no-backing-for-perspective.html compositing/layer-creation/animation-overlap-with-children.html
WebKit Review Bot
Comment 6 2013-01-28 10:16:12 PST
Comment on attachment 184999 [details] WIP Patch Attachment 184999 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16163696 New failing tests: compositing/geometry/abs-position-inside-opacity.html compositing/geometry/bounds-clipped-composited-child.html animations/3d/matrix-transform-type-animation.html compositing/direct-image-compositing.html compositing/backing/no-backing-for-clip-overlap.html animations/additive-transform-animations.html accessibility/svg-remote-element.html compositing/layers-inside-overflow-scroll.html compositing/sibling-positioning.html compositing/backing/no-backing-for-perspective.html compositing/generated-content.html compositing/self-painting-layers.html animations/cross-fade-webkit-mask-box-image.html compositing/flat-with-transformed-child.html compositing/geometry/ancestor-overflow-change.html animations/cross-fade-list-style-image.html compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html animations/cross-fade-background-image.html compositing/columns/composited-in-paginated.html compositing/geometry/clipping-foreground.html animations/cross-fade-border-image-source.html compositing/clip-child-by-non-stacking-ancestor.html compositing/backface-visibility/backface-visibility-image.html compositing/compositing-visible-descendant.html animations/cross-fade-webkit-mask-image.html compositing/overflow-trumps-transform-style.html compositing/backing/no-backing-for-clip.html compositing/backface-visibility/backface-visibility-simple.html accessibility/svg-bounds.html compositing/backface-visibility/backface-visibility-webgl.html
Build Bot
Comment 7 2013-01-29 18:39:07 PST
Comment on attachment 184999 [details] WIP Patch Attachment 184999 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16183410 New failing tests: compositing/checkerboard.html compositing/geometry/abs-position-inside-opacity.html compositing/geometry/bounds-clipped-composited-child.html compositing/iframes/become-overlapped-iframe.html animations/3d/matrix-transform-type-animation.html compositing/iframes/connect-compositing-iframe-delayed.html compositing/direct-image-compositing.html compositing/iframes/connect-compositing-iframe2.html animations/additive-transform-animations.html accessibility/svg-remote-element.html compositing/layers-inside-overflow-scroll.html compositing/generated-content.html compositing/self-painting-layers.html compositing/iframes/connect-compositing-iframe3.html compositing/backing/no-backing-for-clip-overlap.html accessibility/lists.html compositing/tiled-layers-hidpi.html compositing/geometry/ancestor-overflow-change.html compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html compositing/columns/composited-in-paginated.html compositing/iframes/become-composited-nested-iframes.html compositing/geometry/clipping-foreground.html compositing/clip-child-by-non-stacking-ancestor.html compositing/iframes/composited-parent-iframe.html compositing/compositing-visible-descendant.html compositing/overflow-trumps-transform-style.html compositing/iframes/composited-iframe-alignment.html compositing/backing/no-backing-for-clip.html accessibility/svg-bounds.html compositing/backing/no-backing-for-perspective.html
Tim Nguyen (:ntim)
Comment 8 2021-12-24 13:30:55 PST
I've removed -webkit-margin-collapse in: https://github.com/WebKit/WebKit/commit/42888f9d55e6863c9e1a8110cc164f81a63c1158 Hopefully this should be easier.
jollyjerry
Comment 9 2025-05-07 12:20:59 PDT
Created attachment 475160 [details] minimum html / css reproduction Bottom margin is incorrectly rendered on 2nd column. Tested on Version 18.4 (20621.1.15.11.10)
Note You need to log in before you can comment on or make changes to this bug.