Open Bug 750917 Opened 13 years ago Updated 3 years ago

[quirks mode] CSS text-decoration:underline on a block and vertical-align:top lead to a line above the text in quirks mode

Categories

(Core :: Layout, defect)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: daniel, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: regression, Whiteboard: DUPEME)

Attachments

(4 files, 1 obsolete file)

when text-decoration:underline is applied to an element twice, and vertical-align is also defined, the underline renders twice. vertical-align dictates whether the line appears above the text (looking like an overline) or below the other underline.
Attachment #620083 - Attachment mime type: text/plain → text/html
Works(under-line appears): http://hg.mozilla.org/mozilla-central/rev/be4b064f1159 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110804 Firefox/8.0a1 ID:20110804030732 Fails(over-line only appears): http://hg.mozilla.org/mozilla-central/rev/5d742d2e4304 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110803 Firefox/8.0a1 ID:20110804022245 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=be4b064f1159&tochange=5d742d2e4304 Suspected: Bug 403524 Fails(over-line only appears): http://hg.mozilla.org/mozilla-central/rev/42f7ed136034 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110810 Firefox/8.0a1 ID:20110811033415 Fails(over-line and under-line appear both) http://hg.mozilla.org/mozilla-central/rev/10915aa17365 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110811 Firefox/8.0a1 ID:20110811041229 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=42f7ed136034&tochange=10915aa17365 Suspected: Bug 676538
Blocks: 676538, 403524
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: untriaged → layout
This testcase is in quirks mode. I believe the behavior is in fact correct given the quirks inline box model, as far as it goes... And of course in standards mode the behavior disappears completely, as expected.
Summary: CSS text-decoration and vertical-align conflicts → CSS text-decoration:underline on a block and vertical-align:top lead to a line above the text in quirks mode
Whiteboard: DUPEME
This seems pretty similar to bug 714519; worth considering why the fix to that bug didn't fix this case.
Confirmed this issue occurs on the latest trunk in Linux as well.
Issue still exists on version 22 and 23 of x86 Firefox. Also, the issue does occur in standards mode and is not quirks specific.
The problem on occurs when the following is true: 1) text-decoration: underline is applied to :hover and none is applied to non-pseudo 2) vertical-align is inside the text-decoration (e.g. span inside a) 3) parent elemetn (a) is of display block type
Attachment #790713 - Attachment mime type: text/plain → text/html
I don't have time to look closely right now, but that might be a sign that it's actually a different bug.
comment 6 is bug 727125 and *not* this bug. (It's worth considering whether this bug is the same as bug 712875.)
Here's a test that demonstrates this with underline, overline, and line-through being set on the parent of spans with various vertical-align values. The "[vertical-align:]baseline" examples render correctly, as you'd expect, but the rest are broken. In particular, the overline/vertical-align:top example produces a line that's floating ~1em above the top of the div.
Here's the same testcase, now in standards mode. This makes it render correctly, AFAICT. (underlines/overlines all in the right place)
(In reply to Boris Zbarsky [:bz] from comment #2) > This testcase is in quirks mode. I believe the behavior [on orig. testcase] is in fact correct > given the quirks inline box model, as far as it goes... bz, do you know if the quirks inline box model is documented anywhere? And does our rendering of testcase 2 (attachment 8433553 [details]) make sense to you, in that model?
Flags: needinfo?(bzbarsky)
I don't know, and I don't know. Maybe dbaron does?
Flags: needinfo?(bzbarsky)
See Also: → 1019910
This may or may not be the same underlying bug. Just attaching it here so it's not lost.
Summary: CSS text-decoration:underline on a block and vertical-align:top lead to a line above the text in quirks mode → [quirks mode] CSS text-decoration:underline on a block and vertical-align:top lead to a line above the text in quirks mode
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: