blocks with negative text-indent overlap at certain sizes

RESOLVED FIXED

Status

()

Core
Layout: Block and Inline
RESOLVED FIXED
13 years ago
10 years ago

People

(Reporter: Rob Marshall [tH], Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---
Bug Flags:
blocking1.9 -
wanted1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050829 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050829 Firefox/1.0+

Using the font and text indent that I used on my website, some list items
overlap. Changing the font size or text indent by 0.01em fixes the problem.

Reproducible: Always

Steps to Reproduce:
1. Open testcase.
Actual Results:  
Some of the list items - April, June, and Tags - overlap the previous one.

Expected Results:  
No overlapping, all list items displayed with the same height.
(Reporter)

Comment 1

13 years ago
Created attachment 194289 [details]
testcase

Updated

13 years ago
Keywords: testcase

Comment 2

13 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051008
Firefox/1.6a1
Confirmed, testcase and URL exhibit the problem on current trunk build.
This happens whenever the negative text-indent is exactly equal to the width of the text in the block.  The code I _think_ is to blame is in nsLineLayout::VerticalAlignFrames :

      if ((psd->mX != psd->mLeftEdge) || preMode || foundLI) {
...
      else {
        // XXX issues:
        // [1] BR's on empty lines stop working
        // [2] May not honor css2's notion of handling empty elements
        // [3] blank lines in a pre-section ("\n") (handled with preMode)
...
        minY = maxY = 0;
      }

In this case, psd->mX != psd->mLeftEdge tests false, since the text-indent exactly cancels out the width of the text...
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Block and Inline
Ever confirmed: true
Flags: blocking1.9a1?
OS: Windows XP → All
QA Contact: layout → layout.block-and-inline
Hardware: PC → All
Summary: List items with negative text-indent overlap at certain sizes → blocks with negative text-indent overlap at certain sizes
Created attachment 205350 [details]
100% reproducible testcase; needs Ahem font
Attachment #194289 - Attachment is obsolete: true
Flags: blocking1.9a1? → blocking1.9-
Whiteboard: [wanted-1.9]

Comment 5

12 years ago
Created attachment 246399 [details]
Reproducible testcase that only needs Arial (ignore other stuff)

Reproducible on latest-trunk (2006.11.23), both Windows and Linux (Cairo on)
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Fixed on trunk, almost certainly by bug 400813.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.