Update WPTs under `editing/` to assume the other browsers' like white-space sequence
Categories
(Core :: DOM: Editor, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
We use <br>
(ASCII white-space and a padding <br>
) before a block boundary to make the last white-space visible. However, the other browsers use
without <br>
. This makes sense because it guarantees that the white-space is always visible even if the following visible content is removed by the web apps. And also we can reduce the mutations managing the padding <br>
s once we follow their behavior. Therefore, we should do that in bug 1940377.
On the other hand, some WPTs expect the Gecko's behavior, and we need more tests to check the compatibility with Chrome. So, we need to update WPTs under editing/
.
Assignee | ||
Comment 1•23 days ago
|
||
According to the test results, Chrome normalizes collapsible white-spaces with
the following rules:
- a collapsible white-space at start or end of a
Text
is always an NBSP. - a collapsible white-space immediately before or after a preformatted line
break is always an NBSP. - a collapsible white-space followed by a non-collapsible chars is always an
ASCII white-space. - repeat the pair of an ASCII white-space and an NBSP between the first and
the last white-spaces considered by the above rules.
For avoiding to update the tests when we change the behavior, this patch updates
some expectations in the WPTs.
Additionally, this stops checking "auto link" behavior when you type a
white-space after URL since no browser implements such behavior and it must
break web apps in the wild a lot.
Finally, this adds new WPTs to check the compatibility with Chrome and groups
such tests into editing/whitespaces/chrome-compat
directory.
Updated•21 days ago
|
Comment 4•17 days ago
|
||
bugherder |
Comment 5•17 days ago
|
||
bugherder |
Description
•