Closed Bug 1691839 Opened 3 years ago Closed 3 years ago

Unexpected blank space after open-paren in "(view change)" links, on Confluence wiki "all updates" page (with ::first-letter { text-transform: ...} styling, using uppercase or capitalize

Categories

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

defect

Tracking

()

RESOLVED DUPLICATE of bug 385615

People

(Reporter: dholbert, Unassigned)

Details

Attachments

(5 files)

Attached file testcase 1

STR with original site (with mozilla-internal confluence instance):
(1) View https://mana.mozilla.org/wiki/#all-updates
(2) Look at the various updated 18 minutes ago (view change) statements next to updates.

ACTUAL RESULTS:
There's some weird-looking blank space between the ( and the word view -- like 3-4 character-widths of blank space.

EXPECTED RESULTS:
No such blank space

I'll attach a reduced testcase which demonstrates this, too.

I see this in Nightly 87.0a1 (2021-02-07), as well as Nightly 2020-01-01 (from over a year ago), on my MacBook Pro. So: not a recent regression.

Attached image screenshot from Mana
Attached image screenshot of testcase
Summary: Unexpected blank space between open-paren and "view change" in Confluence wikis → Unexpected blank space between open-paren in "(view change)" links, on Confluence wiki "all updates" page
Summary: Unexpected blank space between open-paren in "(view change)" links, on Confluence wiki "all updates" page → Unexpected blank space after open-paren in "(view change)" links, on Confluence wiki "all updates" page

Here's a frame dump. It shows that we think the div (the inline-block) is 15381 app units wide, and we correctly place the subsequent span ("view change)" is placed at that x-value.

I think that 15381 is too large, though? It doesn't look like 'any of the div's contents occupy that much width.

So the div here has text-transform:uppercase (and the bug happens with capitalize value as well). That is highly relevant.

It looks like we are improperly computing the width of the div as if the whole div had the text-transform styling (instead of just the first letter). If I edit the testcase to actually use that text-transform styling for the whole div, then the span remains in exactly the same place, and the div's textual content expands precisely the right amount to exactly eat up the unexpected space & to reach the span.

Summary: Unexpected blank space after open-paren in "(view change)" links, on Confluence wiki "all updates" page → Unexpected blank space after open-paren in "(view change)" links, on Confluence wiki "all updates" page (with ::first-letter { text-transform: ...} styling, using uppercase or capitalize

(In reply to Daniel Holbert [:dholbert] from comment #4)

It looks like we are improperly computing the width of the div as if the whole div had the text-transform styling

Here's a variant of the original testcase, to visualize this.

This variant renders correctly, and it places the "view change" text at exactly the same x-position as where "testcase 1" places it. Here, there's no weird blank space before that text, because the div's chunk of text is wider (due to being entirely uppercase).

So: when we render testcase 1, I think we're confused about how much of the text is getting the text-transform applied to it.

This is bug 385615.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: