Closed Bug 338735 Opened 14 years ago Closed 11 years ago

toggling a table cell with display: block gives distorted result

Categories

(Core :: Layout: Tables, defect)

x86
All
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: sander.vandemoortel, Assigned: bzbarsky)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

Cell rendered incorrectly after changing a property with javascript and then using javascript again to give it back its original property.

Reproducible: Always

Steps to Reproduce:
1. surf to the URL
2. click a few times on the small arrow in the pink bar
3. you'll notice the login div appears and disappears correctly, but the bar below does not reappear correctly.
Actual Results:  
bar appears on the right of the actual table cell, too tall, too narrow

Expected Results:  
bar should reassume its original form
I can confirm this with latest trunk.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060521 Minefield/3.0a1
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → Trunk
Table cells should be display: table-cell for the behavior you want, not display: block. For compatibility with IE, try toggling between "none" and "" instead of "" and "block".

Suggest INVALID.
Attached file Testcase #1
The first click and the third should result in the same layout...
Component: Layout → Layout: Tables
Keywords: testcase
OS: Windows XP → All
QA Contact: layout → layout.tables
Whiteboard: DUPEME
Depends on: 162063
(In reply to comment #4)
> The first click and the third should result in the same layout...

Are you accounting for the anonymous content generated when setting a child of a display: table-row element to something other than display: table-cell?

http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes
Attached file Frame dumps
The <td id="nieuwsbalk"> element have the following (computed) display values:
initial: none
1 click: block
2 clicks: none
3 clicks: block

It never has table-row or table-cell as computed value.

There are pseudo frames generated around it though as can be seen in
this frame dump. After click 2 the table-cell pseudo frame (marked red)
should be removed I think, so we get back to the initial state.
I think this is what bug 162063 is about.
Blocks: 335435
No longer blocks: 335435
Blocks: 417644
I have the same result when toggling between display:none and display:inline. My cell works as expected the first time, but after being hidden and then shown again. Should I open a new bug or is adding this comment sufficient?
Duplicate of this bug: 417644
Fixed by checkin for bug 162063.  Added test.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee: nobody → bzbarsky
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.