Closed Bug 253781 Opened 20 years ago Closed 20 years ago

dynamic style.visibility toggle cause table caption to appear only after a screen refresh

Categories

(Core :: Layout: Tables, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: philip-dev, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9

---Example code can be found @ the bottom:---
When using javascript to dynamicly toggle the visibility style of an entire
table which is equipped with a <caption> tag, the caption text is not displayed
at first.
The table with all cells appear instantaneously, but the caption text itself
remains hidden.
It is the classic example of not during a proper area refresh after drawing on
the canvas. The text is there, but you値l need some other window to overlap the
physical screen area before the caption-text is drawn.

[CODE]
<html><body>
<table border="1" width="100%" id="mytable" style="visibility: hidden">
	<caption>table caption</caption>
	<tr>
		<td>cell data</td>
	</tr>
</table>
<script type="text/javascript">
function displayIt() {
	var s=document.getElementById('mytable');
	s.style.visibility='visible';
}
</script>
<p><a href="javascript:displayIt();">activate</a></p>
</body></html>
[/CODE]
Hit "activate" to display the table.. You'll notice the caption is missing..
pull any other open window/application in front of the caption and away again
and the text is revealed :)

Reproducible: Always
Steps to Reproduce:
1.By using the little example in the "details" section.
Actual Results:  
No caption-text drawn

Expected Results:  
Caption-text drawn
Assignee: bugs → nobody
Component: Web Site → Layout: Tables
Product: Firefox → Browser
QA Contact: core.layout.tables
Version: unspecified → 1.7 Branch
Load and wait 5 seconds (this was to eliminate damage from clicking the link)
The problem is that the damage area doesn't include the caption:

PresShell::Paint 0 255 9150 330
nsContainerFrame::PaintChild 0 255 9150 330  Area(html)(-1)@0x853a17c
nsContainerFrame::PaintChild 0 255 9150 315  Block(body)(2)@0x853a3b0
nsContainerFrame::PaintChild 0 255 9150 315  TableOuter(table)(1)@0x853d288
nsTableOuterFrame::Paint 0 255 9150 315
   caption BACKGROUND
nsContainerFrame::PaintChild 0 255 9150 315  Block(caption)(1)@0x853d57c
    NOTHING TO DO: IntersectRect is empty
   child 0x853d3e4 BACKGROUND
nsContainerFrame::PaintChild 0 255 9150 315  Table(table)(1)@0x853d3e4
nsContainerFrame::PaintChild 0 0 9150 315  TableRowGroup(tbody)(3)@0x853d780
...
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows XP → All
Version: 1.7 Branch → Trunk
The bug does not occurr in Mozilla 1.3.1 and earlier.
Odd.... setting inline style should go through ApplyRenderingChangeToTree, which
should invalidate the entire area starting at the primary frame (which is the
table outer frame).
*** Bug 267495 has been marked as a duplicate of this bug. ***
Hmm, probably not.

Actually I don't see this bug on GTK2, probably due to the way it coalesces paints.
Actually, this did get fixed by the patch for bug 219444.  It worksforme in
2005-01-25-07 and later GTK1 builds, but not in builds before that.

It makes sense; we were only invalidating the table-inner area (since that's
what the change hint was for), which doesn't include the caption.
Status: NEW → RESOLVED
Closed: 20 years ago
Depends on: 219444
Resolution: --- → FIXED
Hello again,

I hate to be the bringer of bad news, but I cannot mark this bug as being
Verified. As of version 1.0.2 (Windows) the problem still exist. Attached is a
capture of the problem. Notepad was used as the invalidator-tool.
Copy-pasted from the about dialog of Firefox: "Mozilla/5.0 (Windows; U; Windows
NT 5.1; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2".
I am using no extensions or themes.. just plain firefox 1.0.2 out-of-the-box.

Perhaps the bug has been fixed but is yet to be implemented in a stable
release?

Anyhows; Excelent browser :)
Best regards Philip S.
> As of version 1.0.2 (Windows

That's using a layout engine from April 2004; this bug was fixed in January 2005.

> Perhaps the bug has been fixed but is yet to be implemented in a stable
> release?

Exactly.  The fix will be in Firefox 1.1.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: