Closed Bug 28213 Opened 26 years ago Closed 26 years ago

Whitespace related layout issues on linux.com {compat}

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 28526

People

(Reporter: garrett, Assigned: pierre)

References

()

Details

(Whiteboard: needs minimized test cases)

Attachments

(1 file)

From Bug Helper: User-Agent: Mozilla/4.7 [en] (X11; U; Linux 2.2.13 i686) BuildID: 2000021708 Mozilla fonts are now huge on Linux. Mozilla is also having problems with respect to table rendering (adding in a lot of space within the tables, not doing a paragraph break when a <p> is in front of a table, etc). It used to work correctly in older builds (about a week or two ago, iirc), but over the past week or so, the builds have been displaying this layout problem. http://linuxart.com/mozilla-compare.png shows a comparison of an older Mozilla build on the right and a newer one on the left. The problem still exists on the current Mozilla nightly builds. Reproducible: Always Steps to Reproduce: 1.Start Mozilla 2.View sites like http://linux.com/, http://slashdot.org/, or nearly any other site that has tables in use for the layout. Actual Results: Fonts are huge in Mozilla and tables do not seem to be rendered correctly in many instances.
Default font size for Linux was recently increased to obsolete the "Small fonts on Linux" problem. If you have previously set your screen_resolution pref or the GECKO_FONT_SIZE_FACTOR environment variable, try resetting these and see if it makes a difference.
Well, there are two issues here. Let's start with the font size first. Reassigning to Style System for that problem, then let's go back to layout for the other issues
Assignee: troy → pierre
Component: Layout → Style System
QA Contact: petersen → chrisd
I've done a little researching since I have first reported this bug. The fonts do appear large, and I thought that the fonts themselves could possibly be causing the layout problems, but I've looked into it a bit by playing w/ html and I have come to a conclusion in regards to the layout error. From what I can tell, Mozilla's interpretation of <p>s are now opposite of Netscape and other browsers with respect to tables (it was not this way a short while ago). Essentially, Mozilla is not repsecting paragraph tags before tables, and within tables, it is hyper-sensitive. If a <p> is inside of a table before the content, it is treated as though there should be a second new paragraph break. From every other browser (and even Mozilla about a week or two ago) I have seen, adding in a <p> inside a table does not add extra space. Adding a <p> in certain tables allows one to develop a web page that works under browsers that support tables, and also makes it so the formatting of html under browsers like lynx (which does not really support tables) still jives and gives a person a pleasurable viewing experience no matter what browser he or she chooses. It seems as though someone accidently reversed ignoring of paragraph tags within Mozilla, making those before a table invisible to the layout and those tags inside of tables (well, the first ones at least), no longer ignored. Anyway, that's just my $0.02 about the layout. (Which, to me, is much more severe than large fonts).
The site contains this markup: <p>&nbsp;<br> <table ...> We are correctly putting a 1em margin between the paragraph and the table, and there is already the 1em gap caused by the "&nbsp;<br>" content. Thus we are actually putting _two_ lines' worth of gap while legacy browsers only but _one_ line's worth. Similar things occur all the way through the page. Some of it may be fixed by bug 24036, "Residual style solution not fully backwards compatible". There are also problems with the table layout. In particular, the width of the first cell (the one containing the LINUX.COM logo) seems to be ignored. This bug needs some minimized test cases, and probably needs to be split into separate bugs for each issue.
Severity: major → normal
OS: Linux → All
Hardware: PC → All
Summary: Mozilla font & table layout problems → Whitespace related layout issues on linux.com {compat}
Whiteboard: needs minimized test cases
The problem is that in Mozilla's style sheet, for P, margin-top is set to 1em. So Mozilla will add this space between the border of the table cell and the start of the paragraph's content. It also happens with other kinds of block level elements, such as H[1-6] etc. FIX: add td > *:first-note { margin-top: 0 ] th > *:first-note { margin-top: 0 ] to html.css.
Unfortunatly, there's no such fix for the space added at the bottom of table cells. It also looks like the margins are not collapsing correctly.
*** Bug 28526 has been marked as a duplicate of this bug. ***
Marking as DUP of bug 28526. I have a fix for this in my tree and I'll check it in post-beta 1. The issue with this bug is that I recently fixed it so that table cells are considered margin roots (i.e., we don't collapse vertical margins into a table cell). That fixed bug 27043, but then this problem occured. Turns out this problem is because there is a rule in the ua style sheet that I didn't know about the suppresses the top margin for the first child of the body. I need to add the same rule for the first child of a td, and that fixes the problem *** This bug has been marked as a duplicate of 28526 ***
Status: UNCONFIRMED → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Cool that you've got a fix, Troy. Could you attach it to the bug so people can test it and play with it? (Maybe review it and get it checked in on the tip sooner that way, too.)
Just a note. I see that this seems to be marked as "resolved", but the bug still exists. I redid Linux.com to work around 1/2 of the bug (the space inside the tables when a <p> is added), by removing the paragraph tags. The second half (related) of this bug is something I could not work around w/o breaking all other browsers... you can see that there should be space under the [more] on the featured article on Linux.com's front page, but it is not there. It would be great if these bugs got fixed soon, as this affects many websites still (although some are more subtle than others). Thanks.
Verified duplicate.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: