tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 1b41a53e287fc6ddd90a35eb7a64ed4df6c5ecd4
parent 9f253c255864400ce909843b175f76a4cf0d8f0f
Author: Jonathan Kew <jkew@mozilla.com>
Date:   Fri, 31 Oct 2025 22:17:19 +0000

Bug 1997569 - When the decorating frame is an inline, use its content (not border) rect as the basis for text-decoration-inset computation. r=layout-jp-market-reviewers,layout-reviewers,AlaskanEmily

This makes sense because it is the content area within which the text
is positioned and has the decoration drawn.

Fixes the underline on the first few examples in the testcase (but not
the more complex ones; see following patch).

Differential Revision: https://phabricator.services.mozilla.com/D270842

Diffstat:
Mlayout/generic/nsTextFrame.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp @@ -5839,7 +5839,7 @@ static bool ComputeDecorationInset( // text indentation and calculate geometry using line boxes. if (aDecFrame->IsInlineFrame()) { frameRect = nsRect{aFrame->GetOffsetTo(aDecFrame), aFrame->GetSize()}; - inlineRect = nsRect{nsPoint(0, 0), aDecFrame->GetSize()}; + inlineRect = aDecFrame->GetContentRectRelativeToSelf(); } else { nsIFrame* const lineContainer = FindLineContainer(aFrame); nsILineIterator* const iter = lineContainer->GetLineIterator();