Closed Bug 1164 Opened 26 years ago Closed 24 years ago

ALIGN=MIDDLE and ALIGN=ABSMIDDLE values are not being supported

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mcobbley, Assigned: buster)

Details

(Keywords: testcase, Whiteboard: [TESTCASE] klein_sh@inter.net.il [fix in hand][rtm++])

Attachments

(2 files)

This tag works fine in 4.0x and 4.5 but is not supported now. <HTML> <head> <!-- testcase: table_abs.htm --> <!-- Author: Michael Cobbley, Date: 10/19/98 --> <!-- CONFIDENTIAL AND PROPRIETARY TEST SCRIPT OF NETSCAPE COMMUNICATIONS CORPORATION Copyright © 1998 Netscape Communications Corporation. All Rights Reserved. Use of this Test Script is subject to the terms of the applicable license agreement from Netscape Communications Corporation. --> <!-- Purpose: HTML 3.2 and HTML 4.0 To test the alignment of objects. --> <!-- Expected result: The ABS middle tag should center the nested table in the middle of cell one. This tag will not work in IE 4--> <meta name="Author" content="Mike Cobbley"> <meta name="GENERATOR" content="Mozilla/4.5 [en]C-NSCP (WinNT; I) [Netscape]"> </head> <body> &nbsp; <table BORDER COLS=2 WIDTH="50%" > <tr> <td><table ALIGN="ABSMIDDLE" BORDER COLS=2 WIDTH="5%" > <tr> <td>hello</td> <td>hello</td> </tr> <tr> <td>hello</td> <td>hello</td> </tr> </table></td> <td>hello</td> </tr> <tr> <td>hello</td> <td>hello</td> </tr> </table> </body> </html>
Status: NEW → ASSIGNED
Summary: the ABSMIDDLE tag is not being supported → the ABSMIDDLE attribtue is not being supported
Just for clarity, "tag" is the thing immediately following the less than sign, so, for example: <img width=100 src="foo.gif"> is an image "tag," and there is a width "attribute." In this case, it's the ABSMIDDLE "attribute" that we're failing to support, not tag. Changing summary accordingly.
Assignee: buster → kipp
Status: ASSIGNED → NEW
Summary: the ABSMIDDLE attribtue is not being supported → ALIGN=MIDDLE and ALIGN=ABSMIDDLE values are not being supported
changing summary to show that align=middle doesn't work either, and assigning to Kipp. We don't seem to support either MIDDLE or ABSMIDDLE for tables. note: actually, it's "align" that's the attribute, and "ABSMIDDLE" is the attribute's value.
Priority: P1 → P2
P1 is reserved for crashers. This isn't a crasher.
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I fixed the table code: (1) I added in absmiddle to the list of attribute values for table horizontal align values. (2) I updated the table MapAttributes code to map align=center into auto side margins
Status: RESOLVED → VERIFIED
While the table in this test case doesn't properly lay out on the 2.9.99 builds of Viewer (the right-hand column of the non-nested, outside table is empty), both the ALIGN=ABSMIDDLE and ALIGN=MIDDLE tag attribute pairs now result in the nested table centering. (checked 2.9.99 builds on Win32, Linux & Mac OS.)
[side issue raised in previous comment broken out into bug #3105.]
Status: VERIFIED → REOPENED
Kipp, this seems to have regressed. I ran html/tests/table/bugs/bug1164.html on the latest build (before a big checkin I'm planning) and the nested table is not centered.
Resolution: FIXED → ---
Clearing Fixed resolution due to reopen.
Whiteboard: [TESTCASE] klein_sh@inter.net.il
Attached file Testcase for bug 1164 (deleted) —
Status: REOPENED → ASSIGNED
Target Milestone: M10
Status: ASSIGNED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
Fixed. We had to recompute auto side margins for tables when the table ends up being wider than it's "width" style property would otherwise indicate.
I just checked out the testcase in the Win98 2000-02-17-15 build, and the nested table is still not centered. Reopening bug.
Status: RESOLVED → REOPENED
QA Contact: andyb
Resolution: FIXED → ---
was set to M10, moved from past into the future M15
Target Milestone: M10 → M15
mine! mine mine mine! all mine! whoo-hoo!
Assignee: kipp → buster
Status: REOPENED → NEW
Status: NEW → ASSIGNED
Target Milestone: M15 → M17
Keywords: testcase
Adding the following to quirk.css seems to fix the problem: table[align=absmiddle], table[align=middle] { margin-left: auto; margin-right: auto; }
Keywords: patch
Mats: your solution works, but since there's already a compatibility mechanism in the source code, I think it's better to just use it. I'll attach a patch momentarily. Karnaze, please review. Waterson, please super-duper-double-review. Fix took about 1 minute, mostly recompiling time :) It's worth getting into rtm. Reuses existing code path by trivially expanding a data table in the source code. The cost is at most 2 extra string compares per table with an align attribute, and they are only done if the author doesn't provide a legal value for align.
Keywords: 4xp, rtm
Attached patch trivial fix (deleted) — Splinter Review
r=karnaze
benefit of fix: 4xp for navigator-only values of "absmiddle" and "middle" for align attribute. If we fail to support these, some pages that are written specifically for Nav will fail to lay out correctly. Table cell content wil be left aligned (the default) instead of center-aligned. Sometimes, the difference is trivial. But since tables are frequently used as the foundation for page layout, sometimes the difference is very significant.
sr=waterson
Whiteboard: [TESTCASE] klein_sh@inter.net.il → [TESTCASE] klein_sh@inter.net.il [fix in hand]
Adding rtm+.
Whiteboard: [TESTCASE] klein_sh@inter.net.il [fix in hand] → [TESTCASE] klein_sh@inter.net.il [fix in hand][rtm+]
PDT marking [rtm++]
Whiteboard: [TESTCASE] klein_sh@inter.net.il [fix in hand][rtm+] → [TESTCASE] klein_sh@inter.net.il [fix in hand][rtm++]
fix checked into branch
fix now checked into trunk as well.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago24 years ago
Resolution: --- → FIXED
andyb@rconnect.com - will you be able to verify this on the trunk Mozilla builds? cc: gerardok to assign someone to verify this fix on the branch builds.
Status: RESOLVED → VERIFIED
Looks good in 2000-10-27 on Windows, at least. Marking verified.
Using various testcases, verified fixed on branch builds across platform.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: