Closed Bug 76331 Opened 24 years ago Closed 16 years ago

Cell with some invisible content considered empty

Categories

(Core :: Layout: Tables, defect, P2)

x86
All
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: dierk.bergler, Assigned: bernd_mozilla)

References

Details

(Keywords: testcase, Whiteboard: CSSWG)

Attachments

(4 files, 3 obsolete files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.2-4GB i586; en-US; rv:0.8.1+) Gecko/20010416 BuildID: 20010416 http://www.heise.de/tp/english/inhalt/te/7393/1.html Reproducible: Always Steps to Reproduce: 1. go to http://www.heise.de/tp/english/inhalt/te/7393/1.html 2. scroll down to table with white background beginning with "The safe-deposit is a service... 3. watch the borders of table...are not drawn correctly
Hmm. There is <img width=7 height=0 src="/tp/icons/eck_0.gif" alt=""> and they seem to expect that we scale it to the cell height.
Nav4x and MSIE 5x render table correctly...
This is WONTFIX in my book... If the author explicitly says height="0" then height="0" it is...
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
Whoops, I think the actual problem is that when the image without the height isn't rendered, there's no content in the table cell so that its borders and background isn't displayed... CCing Hixie. Should this cell count as empty or not?
Yes, I was wrong. It is a 7x7 transparent GIF and the cell should inherit the background of its table. IMHO, this cell is not empty. Same problem: <td>&zwnj;</td> and <td>&zwj;</td>. What should we do with <td><hr style="display:none"></td> ? Currently not treated as empty: <td><hr style="visibility:hidden"></td> and <td><br></td>. This is a quirks mode only problem. Reopening. New summary. OS -> all (I see this on Win NT). Related to bug 57498.
Status: RESOLVED → UNCONFIRMED
OS: Linux → All
Resolution: WONTFIX → ---
Summary: table with gif-image borders not displaying correctly → Cell with some invisible content considered empty for quirks mode
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file testcase
I don't see this as quirks-mode only. We also need rules in strict for when cells count as empty and when they don't, e.g. for the empty-cells-property. Take a look at http://www.w3.org/TR/REC-CSS2/tables.html#empty-cells There it says that any entity except from CR, TAB and space count as content. Any stuff which has 'visibility:hidden' does not. I personally think that any stuff which has 'visibility:hidden' set counts as content, or else there wouldn't be any difference to 'display:none' in the case of table cells. (The W3C-spec says I'm wrong, but WTF...)
Yes, can affect strict mode too. Made another testcase. Weird results, especially if you compare both.
Summary: Cell with some invisible content considered empty for quirks mode → Cell with some invisible content considered empty
found another page with described problem: http://www.it-universum.de/index1024x768.htm
Nope, that's not exactly the same problem. On that page, the image which should fill the cell and thus force Mozilla to draw the background doesn't seem to exist. If you reload the page, you'll see that the cells are drawn at first, but then disappear when Necko notifies Layout that the URL of the image doesn't exist. This is correct beahivour IMO.
O.K. you are right, the images are missing but why is that working on Opera 5.x, Netscape 4.x, IE 4x,5x ???
This is really an edge-case. Is a cell empty when there's an image with an invalid source in it? Please note that when you add an "alt"-attribute other than "" to the missing image (like one should anyway), the background is displayed. However, we need a solution for this case, at least in quirks.
Priority: -- → P2
is anyone working on that, at least for 0.9.2?
Moving to m0.9.3.
Target Milestone: --- → mozilla0.9.3
Priority: P2 → P1
please work on that, there are many tables out there looking ugly with Mozilla/Netscape 6.1b1
Severity: normal → major
Do you know of any URLs except the one on www.heise.de where this problem occurs? Finding some Top100 URLs would be the best way to convince Netscape to fix this bug. Please don't change priority or add the nsbeta1+ keyword. Those are adjusted by the developer/Netscape PDT, and this bug is already nominated for nsbeta1 consideration.
Keywords: nsbeta1+nsbeta1
Priority: P1 → P2
Missed 0.9.3.
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Keywords: testcase
reassigning to m0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Blocks: 104166
attinasi, it sounds like this would be fixed if unloaded images were not treated as being empty, but I can't remember the bug number.
Assignee: karnaze → attinasi
Target Milestone: mozilla0.9.6 → ---
Severity: major → normal
Target Milestone: --- → mozilla1.0
Target Milestone: mozilla1.0 → mozilla1.2
Also happens on http://www.csn.ul.ie/~caolan/wingdings/proposal/. The images in one column break and don't have alt text, so the table cells borders in that column disappear.
attinasi will probably not work on those bugs :-(
Assignee: attinasi → table
QA Contact: amar → madhur
Target Milestone: mozilla1.2alpha → ---
Target Milestone: --- → Future
Using Mozilla 1.3: This bug seems to be solved (since months..?..) :-) The table draws correctly. I think we can close it.
Status: NEW → RESOLVED
Closed: 24 years ago22 years ago
Resolution: --- → FIXED
The page displays correctly now, but only because the site has been fixed, not because Mozilla's behaviour has changed. Reopening
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ian, what does the spec actually say about all this gunk?
Keywords: qawanted
QA Contact: madhur → ian
# Empty cells and cells with the 'visibility' property set to 'hidden' are # considered to have no visible content. Visible content includes "&nbsp;" and # other whitespace except ASCII CR ("\0D"), LF ("\0A"), tab ("\09"), and space # ("\20"). I think a child element should be considered visible content, whether it is visible or not.
Ian, that's one of the least clear passages I've seen in the spec. What does "empty cells" mean in that context? Whatever they are, they are considered to have no visible content, no matter what their content actually is. Also, is that "I think" a "Ian thinks" or a "the WG thinks (and will clarify before CSS2.1 exits CR"?
> Ian, that's one of the least clear passages I've seen in the spec. Agreed. > Also, is that "I think" a "Ian thinks" or a "the WG thinks (and will clarify > before CSS2.1 exits CR"? It's an "Ian thinks". I added this to the CSS2.1 CR issues list (issue 29).
Excellent. Thank you.
Whiteboard: CSSWG
So when looking at: http://www.w3.org/TR/CSS21/tables.html#empty-cells "Cells are empty unless they contain one or more of the following: * floating content (including empty elements), * in-flow content (including empty elements) other than whitespace that has been collapsed away by the 'white-space' property handling. " When looking at the testcase, it seems to me that Mozilla is handling all those examples correctly (I'm not sure about the '<img src="http://www.mozilla.org/images/mozilla-banner.gif" height=0 width=600>' case)
Attached patch patch (obsolete) — Splinter Review
Attached patch patch without tabs (obsolete) — Splinter Review
Attachment #335910 - Attachment is obsolete: true
Attached patch patch (obsolete) — Splinter Review
Assignee: layout.tables → bernd_mozilla
Attachment #335912 - Attachment is obsolete: true
Attachment #336173 - Flags: superreview?(roc)
Attachment #336173 - Flags: review?(roc)
+ if (nsGkAtoms::textFrame == frameType) { + if (innerFrame->GetRect().width != 0) + return PR_TRUE; This isn't right, you could have font-size:0 non-whitespace text. Use nsTextFrame::HasNoncollapsedCharacters instead. (Might want to add that to your test.) + nsIFrame *outOfFlowFrame = nsLayoutUtils::GetFloatFromPlaceholder(innerFrame); I'd call that "floatFrame". That's kind of a weird definition for 'empty' --- I'm surprised a cell containing an empty span should be treated as non-empty --- but given that's the definition, I guess this patch is good other than the comments above. Thanks!
Attached patch revised patchSplinter Review
> That's kind of a weird definition for 'empty' AKA- Hixie the include of nsTextFrame.h does not come without a price it pulls in nsBidiUtils.h (thats the makefile change) and triggers a VC++ warning C:\Programme\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530 : C++-Handler verwendet, aber Entladesemantik ist nicht aktiviert. Geben Sie /EH sc an. http://msdn.microsoft.com/en-us/library/2axwkyt4.aspx I do not understand how this can happen
Attachment #336173 - Attachment is obsolete: true
Attachment #336173 - Flags: superreview?(roc)
Attachment #336173 - Flags: review?(roc)
Attachment #336537 - Flags: superreview?(roc)
Attachment #336537 - Flags: review?(roc)
timeless told me to ignore the warning
Comment on attachment 336537 [details] [diff] [review] revised patch + -I$(srcdir)/../../intl/unicharutil/util \ Should be tabs to match the context
Attachment #336537 - Flags: superreview?(roc)
Attachment #336537 - Flags: superreview+
Attachment #336537 - Flags: review?(roc)
Attachment #336537 - Flags: review+
Maybe CellHasVisibleContent should be renamed to reflect what it does? (Also, is it worth having a pointer to the section of the spec that defines what it does so people understand why it does what it does -- since it's a little odd to consider an empty block as making something non-empty.)
I followed to the letter the spec "In the separated borders model, this property controls the rendering of borders and backgrounds around cells that have no visible content." ^^^^^^^^^^^^^^^^ I agree that the definition of empty is not what one expect from the wording but I would not call a function CellHasVisibleContentAccordingToCSS21 I am not a native English speaker and will change this function to whatever name you or roc think is sensible. My ugly proposal is above.
attachement 338430 got checked in but I will keep the bug open till the naming is solved
I guess it's ok as it is, then.
I will add a reference to the corresponding CSS2.1 section with my next checkin
Status: REOPENED → RESOLVED
Closed: 22 years ago16 years ago
Resolution: --- → FIXED
done
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: