Last Comment Bug 428599 - text-decorations are drawn through descendant frames where the decoration is inappropriate
: text-decorations are drawn through descendant frames where the decoration is ...
Product: Core
Classification: Components
Component: Layout: Block and Inline (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla8
Assigned To: Nobody; OK to take it and work on it
: Jet Villegas (:jet)
: 477548 (view as bug list)
Depends on: 403526
Blocks: 403524
  Show dependency treegraph
Reported: 2008-04-11 15:55 PDT by Zack Weinberg (:zwol)
Modified: 2014-10-11 15:26 PDT (History)
15 users (show)
roc: blocking1.9.1-
roc: wanted1.9.1-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

test case (681 bytes, text/html)
2008-07-03 10:24 PDT, Zack Weinberg (:zwol)
no flags Details

Description User image Zack Weinberg (:zwol) 2008-04-11 15:55:43 PDT

<!DOCTYPE HTML><html><body>
<p style="text-decoration:underline">Lorem ipsum <span style="display:inline-block">dolor<br>sit<br>amet</span> consectetur adipisicing elit</p>

Present trunk propagates the text-decoration from the P to the SPAN, contrary to CSS2.1, and thus the words "dolor", "sit", and "amet" are all underlined.  This is bug 403526.  However, fixing that bug only suppresses the underlines on "dolor" and "sit", because the P tag still draws its underline across the bottom of the SPAN's outermost box.  This is incorrect, because the SPAN's outermost box counts as "an element which contains no text" for purposes of section 16.3.1 of the CSS spec.  The correct rendering would stop the line at the beginning of the SPAN and continue it afterward, so "amet" would not be underlined either.  Note that this means that the spaces on either side of "amet" _should_ be underlined.

This is the remaining issue with the reftest text-decoration/underline-block-propagation-standards.html after bug 403526 is fixed.
Comment 1 User image Zack Weinberg (:zwol) 2008-04-11 16:06:35 PDT
Marking as suspected duplicate per dbaron.  If found to be a duplicate, the most recent patch to 403526 will need an embedded bug number adjusted.
Comment 2 User image Zack Weinberg (:zwol) 2008-06-04 14:42:36 PDT
1.9.1?  Note that on reflection, I'm not 100% comfortable with defining the SPAN in question as "an element which contains no text".  Descendant boxes do contain text and it seems like an awfully fine hair to split.
Comment 3 User image Zack Weinberg (:zwol) 2008-07-03 10:24:04 PDT
Created attachment 327987 [details]
test case

adding a self-contained test case.  it's clear that the green and pink boxes should not be crossed out, but what about the word "all"?
Comment 4 User image fantasai 2008-07-29 14:50:49 PDT
I think you just asked about this issue: ?
Comment 5 User image Zack Weinberg (:zwol) 2008-07-29 16:06:58 PDT
we spoke face to face, but - yes, that's the spec issue that's blocking me; however, there are some hairs to split about which bugs are which.

CSS2.1 issue 56 is actually filed as bug 202930, and the pending patch that would resolve it according to your proposal is in bug 403526.

This bug is something else; we talked about it in the thread that starts at and you convinced me the line's not supposed to cross a descendant element that transitively, but not directly, contains text.
Comment 6 User image Zack Weinberg (:zwol) 2008-07-29 16:07:44 PDT
also, this bug is not going to be fixed by the patch in bug 403526, but I expect to be able to fix it pretty quickly once I get unblocked on that bug.
Comment 7 User image Zack Weinberg (:zwol) 2010-03-17 11:22:09 PDT
I finally landed bug 403526, but I am not likely to get to this bug soon, I'm afraid.
Comment 8 User image David Baron :dbaron: ⌚️UTC-8 2010-08-18 09:20:09 PDT
Since it may be relevant here:  the CSS WG just accepted the proposal in
Comment 9 User image David Baron :dbaron: ⌚️UTC-8 2010-11-19 14:14:02 PST
See my notes in bug 403524 comment 65 about fixing this.
Comment 10 User image Vitor Menezes 2011-08-05 16:34:02 PDT
Patch for 4035254 addresses this bug as well.
Comment 11 User image Daniel.S 2011-10-07 13:30:28 PDT
*** Bug 477548 has been marked as a duplicate of this bug. ***
Comment 12 User image Joshua Mitchell (Inactive) 2014-10-11 15:26:23 PDT
Issue is Resolved - removing QA-Wanted Keywords - QA-Wanted query clean-up task

Note You need to log in before you can comment on or make changes to this bug.