Support display:contents on ::before/::after
Reported by
r...@opera.com,
Aug 16 2017
|
|||||||
Issue description
This code should create a block box for the div, no box for the pseudo element, but text boxes for the generated content:
<style>
div::before {
display:contents;
content:"PASS";
}
</style>
<div></div>
,
Oct 19 2017
The assigned owner "rune@opera.com" is not able to receive e-mails, please re-triage. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 19 2017
,
Oct 30 2017
,
Nov 8 2017
,
Nov 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/34d4fb086793b586a9b1ce18f83a234b3b40cd71 commit 34d4fb086793b586a9b1ce18f83a234b3b40cd71 Author: Rune Lillesveen <futhark@chromium.org> Date: Mon Nov 20 20:56:00 2017 Added tests for flex items inside display:contents. Test that a flex container with generated text content for ::before and ::after elements with display:contents end up in the same flex item. Works as expected in WebKit, not in Gecko nor Blink. Bug: 755956 Change-Id: I1db2769be8704f2a6ef540b115e99fe2929dc02f Reviewed-on: https://chromium-review.googlesource.com/776659 Commit-Queue: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#517921} [modify] https://crrev.com/34d4fb086793b586a9b1ce18f83a234b3b40cd71/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/34d4fb086793b586a9b1ce18f83a234b3b40cd71/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-before-after-003.html
,
Nov 21 2017
,
Nov 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f64ab7d95f9ab111613d17cfca40c46e750ae87e commit f64ab7d95f9ab111613d17cfca40c46e750ae87e Author: Rune Lillesveen <futhark@chromium.org> Date: Wed Nov 22 05:47:25 2017 Support display:contents on ::before/::after pseudo elements. These pseudo elements should behave like normal elements for display:contents and not generate a box. However, the generated content is rendered using anonymous LayoutObjects which are not connected to the pseudo element or the real DOM element by any means. Therefore, we generate a inline box for the pseudo element instead to be able to detach the correct LayoutObjects when the generated content goes away. In order to return the correct ComputedStyle for getComputedStyle for the pseudo elements, we store a NonLayoutObjectComputedStyle for the real computed style in addition to the ComputedStyle on the fictional inline box. The assumption here is that the fact that we generate an inline box for the pseudo element here should not be observable. FWIW, this is also the way WebKit support display:contents on ::before and ::after elements. Bug: 755956 Change-Id: I60d79d463fb25def0ee96fc4231a8615cae049b0 Reviewed-on: https://chromium-review.googlesource.com/781863 Reviewed-by: nainar <nainar@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#518546} [modify] https://crrev.com/f64ab7d95f9ab111613d17cfca40c46e750ae87e/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/f64ab7d95f9ab111613d17cfca40c46e750ae87e/third_party/WebKit/Source/core/dom/Element.cpp [modify] https://crrev.com/f64ab7d95f9ab111613d17cfca40c46e750ae87e/third_party/WebKit/Source/core/dom/PseudoElement.cpp [modify] https://crrev.com/f64ab7d95f9ab111613d17cfca40c46e750ae87e/third_party/WebKit/Source/core/dom/PseudoElement.h
,
Nov 22 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by rjwright@chromium.org
, Aug 16 2017