Open Bug 2050962 Opened 6 days ago

Fix the incorrect rendering result of text-decoration-inset when using <br>

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

People

(Reporter: boris, Unassigned)

References

Details

We noticed this bug when reviewing https://phabricator.services.mozilla.com/D308886. The test will be added together in that patch.

For example,

<style>
  body { background: white; color: black; font: 20px/2 Ahem; }
  p {
    text-decoration-line: underline;
    text-decoration-color: blue;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    text-decoration-inset: 10px 20%;
    box-decoration-break: slice;
  }
</style>
<p>abcde<br>fghij</p>

If we intentionally break "abcde" and "fghij" into two lines by <br>. the text-decoration-inset doesn't work properly with box-decoration-break: slice. The actual rendering result looks like box-decoration-break:clone.

It seems we don't have the continuation of these two text frames, and so we treat them as independent text frame. We should add some extra handling when computing insets, to make sure we take all the text lines into accounts.

You need to log in before you can comment on or make changes to this bug.