Closed Bug 286657 Opened 20 years ago Closed 18 years ago

wrong width on <td> , percentage calculated twice.

Categories

(Core :: Layout: Tables, defect)

x86
Windows 98
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hhschwab, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files, 3 obsolete files)

Found URL in Bug 286288, if you right-click on a qoute in this forum, the width shrinks. Will attach minimal testcases. A 90% wide table shows these TDs at different widths, depending on sequence. Seen alone, <body> has a width of 784px, the unstyled <td> a width of 706px, and the styled <td> a width of 637px. .quo { background: #fafafa; display: block; overflow: auto; } <table align="center" border="0" cellpadding="0" cellspacing="0" width="90%"><tbody> <tr><td>right-click below</td></tr> <tr><td class="quo">right-click here</td></tr> So <table> has 100% of width of <body>, and <tbody< has 90% width of <table> <tr> has width of <tbody>, <td> has width of <tr> standing alone, or followed by an unstyled <td> the styled <td> has 90% width of <tr>, i.e. 81% widt of <body> preceded by an unstyled <td> the styled <td> has same (correct) width, but if right-clicked, gets a focus border and drawn smaller, the 90% reduction applied a second time. This regressed between BuildID 2005012405 and BuildID 2005012707 http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-01-24+04%3A00&maxdate=2005-01-27+08%3A00&cvsroot=%2Fcvsroot
Attached file 1 <td> unstyled (obsolete) —
<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%"><tbody> <tr><td>right-click below</td></tr> </tbody></table>
<style type="text/css"> .quo { background: #fafafa; display: block; overflow: auto; } </style> </head> <body> <table align="center" border="0" cellpadding="0" cellspacing="0" width="90%"><tbody> <tr><td class="quo">right-click here</td></tr> </tbody></table>
reduced this one from a validating XHTML testcase to quirksmode. onload the styled <td> has same width as the unstyled one, on right-click it shrinks to 90% of its previous size. Same behaviour in strict mode.
<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%"><tbody> <tr><td class="quo">right-click here</td></tr> <tr><td>right-click above</td></tr> </tbody></table>
Keywords: testcase
One day timeframe for regression: BuildId 2005012606 and BuildID 2005012707 <table> green border, <td> red border bug depends on "alignment=center" for the <table>, and {display: block; overflow: auto;} for the styled <td> There are two issues seen here: 1. incorrect width of <td> by calculating the percentage twice. 2. showing the incorrect width when getting focused (by right-click) issue 2 regressed between BuildId 2005012606 and BuildID 2005012707 seen on Win98 / Win98SE http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-01-26+04%3A00&maxdate=2005-01-27+08%3A00&cvsroot=%2Fcvsroot I don´t have a clue about the checkins, I only found the timeframe for regression yesterday on one machine, and today two more files on another one.
Attachment #177806 - Attachment is obsolete: true
So... the regression range in comment 5 has no checkins that could possible have affected table rendering (and I don't see any changes in rendering on right-click in a current trunk Linux Seamonkey build or a 2005-03-03-05 Linux SeaMonkey nightly).
*** Bug 305897 has been marked as a duplicate of this bug. ***
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20051118 SeaMonkey/1.5a First two attachments WFM Attachment 177803 [details] 1 <td> unstyled Attachment 177804 [details] <td> styled: display: block; overflow: auto;
I increased 1px border and 3px padding tenfold with surprising result. Original testcase from bug 305897: Attachment 193844 [details]
Attachment #177803 - Attachment is obsolete: true
Attachment #177804 - Attachment is obsolete: true
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20051118 SeaMonkey/1.5a Seen on Attachment 203749 [details] testcase from duped Bug 305897, modified: On right-click the four 30px paddings change to 1px, the four border-styles change from -moz-bg-outset to _moz-bg-inset, so you are seeing two borders. Steps to repeat: 1. Load Attachment 203749 [details] 2a. Right-click on "This element moves on right click", observe result 2b. Still right-clicked, click on "Inspect this page Ctrl+Shft+I" 3. in DOM Inspector left pane click on the + preceding HTML > BODY > TABLE > TBODY > 2nd TR > TD 4. click on TD 5. Right Pane: change Object - DOM Node to Object - Computed Style 6. look at 'border-bottom-style' etc., and 'padding-bottom' etc. Now you've seen the values for the shrinked TD, to see the values of the original, you've got to click on 'Inspect' at the end of URL Bar. 7. click on 'Inspect' at the end of URL Bar 8. wait testcase has loaded 9. repeat steps 3 4 5 6 10. see the difference in padding and border-style
Works for me on trunk, reopen if you can still reproduce. (Good luck coming up with an automated test :))
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: