{incr} fieldset barfs on content insert

RESOLVED FIXED

Status

()

Core
Layout: Form Controls
--
critical
RESOLVED FIXED
14 years ago
13 years ago

People

(Reporter: realname, Assigned: mats)

Tracking

({testcase})

Trunk
x86
All
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 2 obsolete attachments)

(Reporter)

Description

14 years ago
Here is a simple HTML formular, and you can add more upload fields if you need
more. The first click can be done, but after this I can't click on the link anymore.

<html><head></head><body>
<h1>Example HTML</h1>
<script type="text/javascript">
function adduploadform() {
	var a;
	a = document.getElementById('e_fileupload').innerHTML;
	a = a + "<input type=\"file\" name=\"u_upload[]\"/><br/>";
	document.getElementById('e_fileupload').innerHTML = a;
}
</script>
<fieldset id="e_fileupload"><legend>Attatchment</legend><br/>
	<a href="javascript:adduploadform();">New file</a><br/>
</fieldset>
</form>
</body></html>
(Reporter)

Updated

14 years ago
Severity: normal → minor
This is not a JavaScript Engine bug.  That bugzilla component is for bugs in the
core ECMA-262 language implementation, not in the DOM or HTML engines.

/be
Assignee: general → general
Component: JavaScript Engine → DOM: Level 0
QA Contact: pschwartau → ian
Created attachment 169661 [details]
Testcase from reporter

I'm seeing the bug, using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041224
Firefox/1.0+

Comment 3

14 years ago
Replacing the fieldset with a div fixes the testcase. The incr. reflow for the
fieldset is somehow broken. It does not properly invalidate the upper border
neither does it paint the content at the right place. Please note that one can
click the link just at the lower edge of that link. Loading the testcase into
the DOM inspector reveals where mozilla thinks the parts should be.
Assignee: general → nobody
Status: UNCONFIRMED → NEW
Component: DOM: Level 0 → Layout: Form Controls
Ever confirmed: true
Keywords: testcase
QA Contact: ian → core.layout.form-controls

Updated

14 years ago
Summary: Link cannot be clicked after inserting HTML by javascript → {incr} fieldset barfs on content insert
(Assignee)

Updated

14 years ago
Depends on: 70648, 236071
(Assignee)

Comment 4

14 years ago
This causes a crash using the testcase:
1. load testcase and click on the "New file" link
2. resize the window wildly - make it very narrow and then wider again.

Taking bug - I have a patch that fixes this and it also fixes the assertion
in bug 70648 comment 20.
Assignee: nobody → mats.palmgren
Severity: minor → critical
(Assignee)

Updated

14 years ago
Blocks: 212887
(Assignee)

Updated

14 years ago
Blocks: 276043
(Assignee)

Comment 5

14 years ago
Created attachment 170071 [details]
Testcase #2
(Assignee)

Comment 6

14 years ago
Created attachment 170075 [details] [diff] [review]
Patch rev. 1

There were many bugs in there...
(make sure you have bug 236071 before you run this patch)
(Assignee)

Comment 7

14 years ago
Created attachment 170076 [details] [diff] [review]
Patch rev. 1 (diff -w)
(Assignee)

Updated

14 years ago
Attachment #170075 - Flags: superreview?(dbaron)
Attachment #170075 - Flags: review?(bzbarsky)
Comment on attachment 170075 [details] [diff] [review]
Patch rev. 1

> nsFieldSetFrame::AppendFrames(nsPresContext* aPresContext,

> nsFieldSetFrame::InsertFrames(nsPresContext* aPresContext,

I think the duplicated code here should be factored out somehow.

All the methods operating on mLegendFrame when munging frame lists probably
need to assert that aListName is null, no?

Other than those, looks fine.  r=bzbarsky
Attachment #170075 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 9

14 years ago
Created attachment 171427 [details] [diff] [review]
Patch rev. 2

Addressing Boris' comment 8:
Added new method to share the common legend code in Insert/AppendFrames.
Assert that aListName is null when manipulating 'mFrames'.

Also, return the result of 'mContentFrame->AppendFrames()'.
Attachment #170075 - Attachment is obsolete: true
Attachment #170076 - Attachment is obsolete: true
Attachment #171427 - Flags: superreview?(dbaron)
(Assignee)

Comment 10

14 years ago
Created attachment 171428 [details] [diff] [review]
Patch rev. 2 (diff -w)
(Assignee)

Updated

13 years ago
Attachment #170075 - Flags: superreview?(dbaron)
(Assignee)

Updated

13 years ago
Flags: blocking1.8b?
Comment on attachment 171427 [details] [diff] [review]
Patch rev. 2

rubber-stamp sr=dbaron
Attachment #171427 - Flags: superreview?(dbaron) → superreview+
(Assignee)

Comment 12

13 years ago
Checked in 2005-01-24 16:06 PDT.

-> FIXED
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Flags: blocking1.8b?
Resolution: --- → FIXED
(Assignee)

Comment 13

13 years ago
*** Bug 280020 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.