Closed Bug 428278 Opened 16 years ago Closed 16 years ago

Table outline rect grows when resizing the window

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: regression, testcase)

Attachments

(3 files, 1 obsolete file)

Spawned off from bug 427928

STEPS TO REPRODUCE
1. load the attached testcase
2. resize the window

ACTUAL RESULT
The red square (outline) expands slightly every time I resize
the window in any direction

EXPECTED RESULT
The red square stays the same size when resizing

PLATFORMS AND BUILDS TESTED
Bug occurs in Firefox trunk on Linux and MacOSX.
Bug does not occur in Firefox 2.0.0.13 on Linux.

ADDITIONAL INFORMATION
Running with -layoutdebug and dumping the frames before/after resizing:

before:
Table(table) ... [overflow=-180,-180,360,360]

after:
Table(table) ... [overflow=-4320,-4320,8640,8640]
Attached file Testcase #1
Regression window: 20061207 -- 20061208 (reflow branch landing).
Attached patch reftest.diffSplinter Review
Assignee: nobody → mats.palmgren
Status: NEW → ASSIGNED
Attached patch Patch rev. 1 (obsolete) — Splinter Review
When we skip reflowing the children we use the old overflow rect as if it
were the child overflow rect, the problem is that it also includes the
outline (for example) for the table itself, so we end up accumulating an
outline for each reflow as long as we don't do a full child reflow.

This patch stores the child overflow rect on a frame property, but only
when it's really needed, ie when the table has overflow of its own,
so in most cases it will not be created.
Attachment #330678 - Flags: superreview?(dbaron)
Attachment #330678 - Flags: review?(bernd_mozilla)
I am away for vacation will do after august 1th
This patch will probably need updating for bug 439567.
I do not really see why we need a second overflow rect just for tables the description of the bug seems pretty common. So why does this not happen in other circumstances?
Other frames always rebuild their overflow rect from their descendants when they are reflowed.  Tables could do that as well...
That said, tables normally have a pretty small number of children.  Why not just accumulate the overflow from the children when we skip reflowing them, like we do for other frames?
Having less table specific stuff seems favorable to me. But don't we then need to descend into all children too?
Attached patch Patch rev. 2Splinter Review
As you suggested, this is simpler.
(we should only consider direct children since their overflow areas should
already contain deeper child overflow, or clipped it, as it may be)
Attachment #330678 - Attachment is obsolete: true
Attachment #331993 - Flags: superreview?(dbaron)
Attachment #331993 - Flags: review?(bernd_mozilla)
Attachment #330678 - Flags: superreview?(dbaron)
Attachment #330678 - Flags: review?(bernd_mozilla)
Comment on attachment 331993 [details] [diff] [review]
Patch rev. 2

this seems better to me
Attachment #331993 - Flags: review?(bernd_mozilla) → review+
Comment on attachment 331993 [details] [diff] [review]
Patch rev. 2

sr=dbaron
Attachment #331993 - Flags: superreview?(dbaron) → superreview+
http://hg.mozilla.org/mozilla-central/index.cgi/rev/3a1ac255e78d
http://hg.mozilla.org/mozilla-central/index.cgi/rev/12893191012a

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
Could this have caused the tp regression that was discussed in bug 450401?
Seems unlikely.  I backed it out on the try server just in case and it
didn't seem to make a difference.  Also, the Tp regression bug 450401
appears to affect 1.9 branch too and this patch have not landed there yet.
Attachment #331993 - Flags: approval1.9.0.4?
Comment on attachment 331993 [details] [diff] [review]
Patch rev. 2

This does not appear to meet the branch criteria, we'll fix this minor cosmetic defect in 3.1
Attachment #331993 - Flags: approval1.9.0.4? → approval1.9.0.4-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: