Closed
Bug 224633
Opened 21 years ago
Closed 13 years ago
quirks mode text-decoration "inherits" differently into tables in IE and Mozilla
Categories
(Core :: Layout: Text and Fonts, defect, P4)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
People
(Reporter: sicking, Assigned: dbaron)
References
Details
(Keywords: testcase)
Attachments
(3 files, 1 obsolete file)
350 bytes,
text/html
|
Details | |
768 bytes,
text/html
|
Details | |
9.02 KB,
patch
|
Details | Diff | Splinter Review |
In both IE and Mozilla we don't inherit certain CSS-properties into tables, such as font-weight and font-family. IE similarly blocks text-decoration of parents from affecting text inside tables, however mozilla does not. Will attach a testcase
Reporter | ||
Comment 1•21 years ago
|
||
In mozilla the top table is underlined, in IE not. Neither browser makes the bottom table bold.
Reporter | ||
Comment 2•21 years ago
|
||
This tests all other textdecorations. For the first three textdecorations, underline, overline and line-through, IE does not apply the style inside the tables. IE doesn't support blinking so i guess we can do whatever we want there.
Reporter | ||
Comment 3•21 years ago
|
||
Sorry, the text in the last attachment was wrong.
Attachment #134726 -
Attachment is obsolete: true
Comment 4•21 years ago
|
||
Is this a problem on any real sites to the point that we should be creating a quirk for this?
Comment 5•21 years ago
|
||
This issue came to my team from one of our server products - WebSphere Portal Server. The issue was that when using the rich text editing facility of Mozilla, you get inconsistent results between IE and Mozilla. So for that group, this was rated as an important issue.
Comment 6•20 years ago
|
||
This issue was raised in a forum today, in quirks mode text-decoration is inherited from body to table cells while it is not in NS4/IE/Opera. It is also referenced as a specific mozilla bug in several places like http://www.richinstyle.com/bugs/mozillademo.html
Comment 7•20 years ago
|
||
Please don't even bother bringing Richinstyle up in bug reports. It's notorious for making incorrect claims and has been unmaintained for years now.
Comment 8•17 years ago
|
||
Attached patch fixes this bug by stopping text-decoration from inheriting inside tables in quirks mode. It is right next to the code that sets text color inside a table, in quirks mode, to be the body's text color (nsHTMLStyleSheet::RulesMatching), which is similar in style.
With the test case, attachment 134727 [details], this patch makes the "In Table" text not underlined, not overlined, and not struck out. This matches IE's quirks-mode behavior.
Before this patch, it was possible for text decorations to be a different color than the text inside a table, since the text decoration drawing code would gotten it's color from the "defining" element, which could be (but shouldn't have been) outside the table. Red text with an underline surrounding the table would result in black text with a red underline inside the table. Pretty funky, but not actually desired.
If anyone has suggestions for better approaches to moving this information around (currently an nsCSSValue(eCSSUnit_Initial) is used, in addition to a new NS_STYLE_TEXT_DECORATION_ABORT define), I'd be happy to incorporate a better approach in the patch.
Assignee | ||
Comment 9•17 years ago
|
||
So eCSSUnit_Initial means something else; it happens to not be implemented yet for text-decoration, but it should be. I also don't think the fix should need to be this complicated, but I may not have time to come up with a better one immediately.
Comment 10•17 years ago
|
||
David, you're probably right that the fix for this doesn't need to be so complicated. The first solution I had in mind would have been restricted to nsTextFrame::PaintTextDecorations. If it was possible to determine the responsible element from an nsStyleContext, I would have suggested checking for a table and breaking out of the "while (hasDecorations) { ... }" loop. But I couldn't determine a way to do that. If you could point me in the direction that you have in mind for a simpler approach, I'd be happy to pursue it.
Updated•15 years ago
|
Assignee: layout.fonts-and-text → nobody
QA Contact: ian → layout.fonts-and-text
Assignee | ||
Comment 11•13 years ago
|
||
This was fixed by http://hg.mozilla.org/mozilla-central/rev/4847e1cf6cf4 on bug 572713 , which added this quirk.
You need to log in
before you can comment on or make changes to this bug.
Description
•