Open Bug 1070742 Opened 5 years ago Updated 8 months ago

text-overflow paints ellipsis when text-indent is more than width


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

32 Branch




(Reporter: hello, Assigned: mats)


(Blocks 1 open bug)


(Keywords: reproducible, testcase)


(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36 OPR/24.0.1558.53

Steps to reproduce:

div {
    width: 50px;
    text-indent: 51px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;

There are some historical bugs in this area - not sure if this is a regression:

Actual results:

Ellipsis displays, although the whole text is "outside" of the visible area

Expected results:

Ellipsis should not display.
It doesn't when text-indent is exactly equal to width (it seems that it also isn't painted when it wouldn't fit, e.g. when text-indent is just slightly lower than width).
Component: Untriaged → Layout: Text
Ever confirmed: true
Product: Firefox → Core
Attached file Testcase
I agree it's inconsistent to show an ellipsis in that case.
IE and Chrome doesn't do that, fwiw.
Assignee: nobody → mats
Blocks: 312156
Severity: normal → minor
OS: Mac OS X → All
Priority: -- → P4
Hardware: x86 → All
Actually, the current rendering is intentional.
We should wait until bug 944200 is resolved though.  It changes the area to consider
for ellipsing from "block's content area" to "line-box area", which would solve
the reported case.
Depends on: 944200
Mats, is this a quick fix now that bug 944200 is resolved?
Flags: needinfo?(mats)

No, it appears that our line-box metrics aren't affected by the text-indent.

Flags: needinfo?(mats)
You need to log in before you can comment on or make changes to this bug.