[css-contain] Blink incorrectly allows "contain:size" elements to be fragmented |
||||
Issue descriptionChrome Version: 69.0.3452.0 (Official Build) dev (64-bit) OS: Ubuntu 18.04 What steps will reproduce the problem? (1) Visit https://jsfiddle.net/zo9masdk/ What is the expected result? You should only see one orange box. (The orange box should not be fragmented.) What happens instead? The orange box is fragmented into three pieces. The orange box has "contain:size" (which, for now, I think Chrome might have the only shipping implementation of). The relevant spec is here: https://drafts.csswg.org/css-contain/#containment-size Particular quote: "Elements with size containment are monolithic" which links to https://www.w3.org/TR/css-break-3/#possible-breaks and says "Some content is not fragmentable [...] Such content is considered *monolithic*: it contains no possible break points" Therefore, per spec, we should not allow this orange box to fragment across the columns of the multicolumn element. (Similarly, we shouldn't allow it to fragment across printed pages; I haven't tested that here but I assume the behavior would be the same.)
,
Jun 29 2018
This can't be implemented in the current multicol architecture (since all we do is slice a single tall strip into columns during painting), but definitely something we will support in LayoutNG.
,
Aug 2
Other test (which will eventually be submitted into W3C wpt) : http://www.gtalbot.org/BrowserBugsSection/CSS3Contain/contain-size-monolithic-001.html Reference file: http://www.gtalbot.org/BrowserBugsSection/CSS3Contain/contain-size-monolithic-001-ref.html Firefox 63.0a1 buildID=20180801223951 passes that test. Chromium 70.0.3509.0 (Canary) fails that test. Basically, if content is not fragmented into 2 column boxes, then the red column-rule will not be displayed "Since column rules are only drawn between two columns that both have content".
,
Sep 10
Test is now in WPT: http://w3c-test.org/css/css-contain/contain-size-monolithic-001.html
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/755f1bce338c8f341a8c91ca495da548a8a4fec0 commit 755f1bce338c8f341a8c91ca495da548a8a4fec0 Author: Manuel Rego Casasnovas <rego@igalia.com> Date: Tue Oct 02 10:22:38 2018 [css-contain] Make size containment elements monolithic Spec text (https://drafts.csswg.org/css-contain/#containment-size): "2. Elements with size containment are monolithic." This patch updates LayoutBox::GetPaginationBreakability() to check if the element has size containment. BUG= 855263 TEST=external/wpt/css/css-contain/contain-size-breaks-001.html TEST=external/wpt/css/css-contain/contain-size-monolithic-001.html Change-Id: I372888eec2e3ab7ca51ad9c9b397ea6b8c89b629 Reviewed-on: https://chromium-review.googlesource.com/1256566 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Manuel Rego <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#595782} [modify] https://crrev.com/755f1bce338c8f341a8c91ca495da548a8a4fec0/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/755f1bce338c8f341a8c91ca495da548a8a4fec0/third_party/blink/renderer/core/layout/layout_box.cc
,
Oct 2
|
||||
►
Sign in to add a comment |
||||
Comment 1 by e...@chromium.org
, Jun 28 2018Status: Available (was: Untriaged)