Details
- Reviewers
emilio - Group Reviewers
layout-reviewers - Commits
- rMOZILLACENTRAL8272ad0d7c2d: Bug 1855583: Empty text line should not give line height even with `white-space…
rMOZILLACENTRALf78453d75438: Bug 1855583: Empty text line should not give line height even with `white-space… - Bugzilla Bug ID
- 1855583
Diff Detail
- Repository
- rMOZILLACENTRAL mozilla-central
- Build Status
Buildable 598725 Build 696871: arc lint + arc unit
Event Timeline
I don't think this is right, see incoming test-case on the bug.
| layout/base/nsCSSFrameConstructor.cpp | ||
|---|---|---|
| 1555 ↗ | (On Diff #787670) | Hmm... Are you sure this is how other browsers behave? I don't think it is: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/pseudo_element.cc;l=308;drc=42f0b9c4f60f67676d9096b3e94df9fd47f568f4 Do we behave the same if we just have an empty inline with an empty text-node? You can create it with JS quite easily... |
| testing/web-platform/tests/css/css-pseudo/before-after-empty-content-ref.html | ||
| 15 ↗ | (On Diff #787670) | content does nothing here, so maybe remove for clarity? |
Ok, so I think I changed my mind about this, but the spec isn't super-clear. This seems sensible and should be reasonably close to what other browsers do.
I filed https://github.com/w3c/csswg-drafts/issues/9606 on this. Mind pointing to that issue in the test-case?
Also, probably wait until after the soft-freeze. It is probably also worth looking into making empty text-nodes not export a baseline more generally. I think your test-case should ideally behave the same for content: "" and content: attr(non-existent). Mind filing a follow-up for that at least?
| testing/web-platform/tests/css/css-pseudo/before-after-empty-content.html | ||
|---|---|---|
| 7 ↗ | (On Diff #787670) | Can you also point to https://github.com/w3c/csswg-drafts/issues/9606? |
| testing/web-platform/tests/css/css-pseudo/before-after-empty-content-ref.html | ||
|---|---|---|
| 15 ↗ | (On Diff #787670) | Right, my point is that in this rule there are no pseudo-elements, right? |
This is fine, but we should probably also do your original frame constructor patch while at it. content: "" is common enough to be worth optimizing some frames around.
| testing/web-platform/tests/css/css-pseudo/before-after-empty-content-ref.html | ||
|---|---|---|
| 15 ↗ | (On Diff #787670) | *facepalm* right. |