Closed
Bug 1122897
Opened 10 years ago
Closed 10 years ago
text-decoration is propagated to absolutely positioned and floated descendants in quirks mode
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: bugzilla, Assigned: dbaron)
Details
(Keywords: testcase)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20150108202552
Steps to reproduce:
i have 2 nested spans
the outer defines text-decoration:underline
the inner specifies no text-decoration or may specify text-decoration:none
the inner span is also position:absolute;
Actual results:
text-decoration:underline is applied to the inner span
Expected results:
text-decoration:underline should neither be applied nor propagated to the inner span
see http://www.w3.org/TR/CSS21/text.html#decoration
see Google Chrome
Comment 1•10 years ago
|
||
I don't see any text underlined in the attached testcase, with either Firefox 35 or a current nightly.
Reporter, do you see the problem in safe mode?
Flags: needinfo?(bugzilla)
click on the blue Z80 to make the inner span visible, hover over the inner span.
yes, also with -safe-mode.
Flags: needinfo?(bugzilla)
Assignee | ||
Comment 3•10 years ago
|
||
This is because the page is in quirks mode. In quirks mode, we propagate text-decoration to absolutely-positioned and floating descendants, which we do not to in standards mode.
If other browsers don't have that quirks mode behavior, we could probably remove it. (The code is at the very end of nsTextFrame::GetTextDecorations.)
Assignee | ||
Updated•10 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
Summary: text-decoration:underline is propagated to absolutely positioned inner span → text-decoration is propagated to absolutely positioned descendants in quirks mode
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
Assignee | ||
Comment 6•10 years ago
|
||
Chrome and WebKit don't have the quirk; we do. It might be worth testing IE.
Assignee | ||
Updated•10 years ago
|
Summary: text-decoration is propagated to absolutely positioned descendants in quirks mode → text-decoration is propagated to absolutely positioned and floated descendants in quirks mode
thanks for the quick examination.
what makes my test case fall into "quirks mode"? I'd like to fix this then.
the test case and the original page are validated html401 / css3.
Assignee | ||
Comment 8•10 years ago
|
||
Thanks for the hint. ;-)
I check my pages with http://validator.w3.org/check but it didn't complain about the non-compliant doctype.
Assignee | ||
Comment 10•10 years ago
|
||
IE11 doesn't have the quirk either, so we should just remove it.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Assignee | ||
Comment 11•10 years ago
|
||
Assignee | ||
Comment 12•10 years ago
|
||
Note that the style element addition to
underline-block-propagation-2-quirks.html and its reference is making a
change already made in the -standards version, and the other change is
reflecting a quirk that is not removed, and that is interoperable.
Attachment #8552114 -
Flags: review?(dholbert)
Comment 13•10 years ago
|
||
Comment on attachment 8552114 [details] [diff] [review]
Remove quirk that text-decoration propagates to floats and absolutely positioned elements in quirks mode
IIUC, all the changes to underline-block-propagation-2* (mentioned in comment 12) are orthogonal to the actual code-change here, so it might be clearer to make those changes (and the reftest.list tweak for that testcase) in a separate "part 2" / "followup" commit, to avoid the implication that that test is changing to accommodate for the code-change here.
r=me either way though
Attachment #8552114 -
Flags: review?(dholbert) → review+
Assignee | ||
Comment 14•10 years ago
|
||
Comment 15•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b1d867ee91b2
https://hg.mozilla.org/mozilla-central/rev/753f41d0775f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•