[wpt-sync] Sync PR 19447 - [LayoutNG] Include empty/space-only trailing spans
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 19447 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/19447
Details from upstream follow.
Koji Ishii <kojii@chromium.org> wrote:
[LayoutNG] Include empty/space-only trailing spans
This patch changes |NGLineBreaker| to include empty or space-
only trailing spans into the line.Such spans were thought not observable, but it turned out
that they are in a few cases; e.g.,:
a. The space is wrapped in an inline box with borders; e.g.,
text\<span style="border: 1px solid"> \</span>text
b. When it is not collapsed (e.g.,pre-wrap) and is in an
inline box with background.Open tags are in most cases not-trailable but sometimes they
are. Before this change, |NGLineBreaker| assumed open tags
are not-trailable, and handles exceptional cases separately.
This patch changes open tags to be trailable. Then non-
trailable open tags were removed after the line breaking was
determined. With this chagne, the rare logic runs only once
for each wrapped line.This patch:
- Split over-loaded
kTrailingstate tokOverflowand
kTrailing. This simplifies the conditions when each
state can transit to other states.- Re-implemented negative marginsr674177. The logic became
simpler because open tags are now trailable by default.- Re-implemented hanging trailing space fixr674430. In
addition to the fix, this patch handles trailing spaces in
a span. We do not handle multiple space nodes yet as in
TODO(crbug.com/1009936) comment, but this change moves one
step closer to support it.Bug: 1001241, 1003184
Change-Id: Ife2f8470a510f6e006da9d2397df5c5153e3abd1
Reviewed-on: https://chromium-review.googlesource.com/1826063
WPT-Export-Revision: ba8506ecf67b10017556a0e37703a8c2ce90bfa5
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
| Assignee | ||
Comment 3•6 years ago
|
||
| Assignee | ||
Comment 4•6 years ago
|
||
Comment 6•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b0aea144d2c1
https://hg.mozilla.org/mozilla-central/rev/d030970f67ff
Description
•