`text-decoration: underline` does not correctly apply to descendant inline elements of a `float: [left|right]` link

RESOLVED DUPLICATE of bug 727125

Status

()

Core
Layout: Block and Inline
RESOLVED DUPLICATE of bug 727125
5 years ago
5 years ago

People

(Reporter: Scott, Unassigned)

Tracking

({regression})

18 Branch
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 715796 [details]
text-decoration.html

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17

Steps to reproduce:

Have markup as follows:

```
<a href="#"><span>Text</span></a>
```

CSS:
```
a {
    float: left;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
a span {
    vertical-align: middle;
}
```

Version: 18.0.2 Platform: Linux Mint 12
Reproduced on Mac OS X Lion, version 19.0


Actual results:

On placing the mouse cursor over the link, the text underline appears at the top of the anchor element. On mouse down, the underline moves to the correct position for the remainder of its existence.

jsFiddle: http://jsfiddle.net/Lum8n/
Test case of the above fiddle also attached.


Expected results:

The underline should always appear in the correct location (below the contained `span` element's text contents). Additionally, when the underline does appear, it appears to be touching the text's baseline (as opposed to the normal offset between text and underline).

Updated

5 years ago
Attachment #715796 - Attachment mime type: text/plain → text/html
Confirmed with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130224 Firefox/22.0 ID:20130224031053 CSet: 195e706140d1 though I see no Difference in Mouse Hover and Mouse Down State (the Underline remains on the Top).

This seems to have regressed within Firefox 4 and 8 Timeframe.
Keywords: regression, regressionwindow-wanted, testcase
OS: Linux → All
Hardware: x86_64 → All

Updated

5 years ago
Component: Untriaged → Style System (CSS)
Product: Firefox → Core

Comment 2

5 years ago
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130225 Firefox/22.0

The underline isn't displayed at all until mouse hover, when it appears at the top of the span. When leaving the span, the underline disappears completely from the page.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 3

5 years ago
Regression range is

Last good nightly: 2011-08-04
First bad nightly: 2011-08-05

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=be4b064f1159&tochange=5684f06138f3

Comment 4

5 years ago
Probably caused by Bug 403524.

Comment 5

5 years ago
Last Good: 144add433e72
First Bad: 225a79ce27bc
Triggered by:
	225a79ce27bc	Vitor Menezes — Fix text-decoration positioning in quirks mode and set overflow areas to match. (Bug 403524) r=dbaron Change the quirks mode text-decoration code (soon to be used for all modes) to follow CSS 2.1's rules for positioning of decoration lines. Decorations are now drawn at a constant vertical position established by the element creating the decoration, and more than one of the same type (underline, overline, line-through) of decoration are supported on the same piece of text. This means that text-decorations can now significantly overflow a text frame, since the vertical-alignment of the element with text-decoration may be substantially different from the vertical alignment of the text. Set overflow areas for text frames with text decorations in nsLineLayout::RelativePositionFrames since it must happen *after* vertical alignment is done, and when relative positioning data are consistent (nsIFrame::GetRelativeOffset matches the offset that has been applied).
Blocks: 403524
Keywords: regressionwindow-wanted, testcase

Updated

5 years ago
Component: Style System (CSS) → Layout: Block and Inline
Flags: needinfo?(dbaron)
The correct rendering here probably involves an underline that is slightly mispositioned due to the offset associated with 'vertical-align: middle'.  But the fact that it ends up as an overline is a duplicate (and related to having vertical-align: something-other-than-baseline on the child of a *block* with text-decoration.)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: needinfo?(dbaron)
Resolution: --- → DUPLICATE
Duplicate of bug: 727125
You need to log in before you can comment on or make changes to this bug.