Closed
Bug 166752
Opened 23 years ago
Closed 23 years ago
[FIX]A simple page with two forms - PageInfo reports three,
Categories
(Core :: DOM: Core & HTML, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: rrkramer, Assigned: bzbarsky)
References
()
Details
(Keywords: regression)
Attachments
(1 file, 3 obsolete files)
|
2.92 KB,
patch
|
caillon
:
review+
jst
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
On page with two forms the first form is duplicated as reported by View Page
Info. The serious part is that javascript code such as
document.forms[1].whatever fails. The DOM inspector display looks OK.
Comment 1•23 years ago
|
||
Wierd, looks like there is 3 forms document.forms[0],[1],[2]
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: A simple page with two forms - PageInfo reports three, → A simple page with two forms - PageInfo reports three,
Comment 2•23 years ago
|
||
also happens on linux trunk build 20020903
regression between 2002062713 and 2002062904
Keywords: regression
OS: Windows 2000 → All
Comment 3•23 years ago
|
||
hmmm, if i add an input to the first form, everything works corectly. this is
DOM not form submission.
Assignee: alexsavulov → jst
Component: Form Submission → DOM Core
QA Contact: vladimire → stummala
| Reporter | ||
Comment 4•23 years ago
|
||
If that additional input is a button, the problem remains.
Comment 5•23 years ago
|
||
bz, looks like the document.forms content list is out of whack, it puts the
first form in the list twice, thus document.forms.length is 3, and not 2. Ideas?
| Assignee | ||
Comment 6•23 years ago
|
||
| Assignee | ||
Comment 7•23 years ago
|
||
*** Bug 161152 has been marked as a duplicate of this bug. ***
Comment 8•23 years ago
|
||
Comment on attachment 98088 [details] [diff] [review]
fix
Straightforward enough. r=jkeiser
Attachment #98088 -
Flags: review+
| Assignee | ||
Comment 9•23 years ago
|
||
taking
Assignee: jst → bzbarsky
Priority: -- → P1
Summary: A simple page with two forms - PageInfo reports three, → [FIX]A simple page with two forms - PageInfo reports three,
Target Milestone: --- → mozilla1.2alpha
Comment 10•23 years ago
|
||
Comment on attachment 98088 [details] [diff] [review]
fix
Looks fine to me too, but...
>+ * We want to append instead of invalidating if the first one of
>+ * the things that got appended comes after ourLastContent
... "the first one of the things" sounds a bit odd. Nix "one"?
>+ nsCOMPtr<nsIDOM3Node> ourLastDOM3Node(do_QueryInterface(ourLastContent));
>+ nsCOMPtr<nsIContent> firstAppendedContent;
>+ aContainer->ChildAt(aNewIndexInContainer,
>+ *getter_AddRefs(firstAppendedContent));
>+ nsCOMPtr<nsIDOMNode> newNode(do_QueryInterface(firstAppendedContent));
>+ if (ourLastDOM3Node && newNode) {
Getting the DOM3Node is somewhat expensive. Since you don't actually use
ourLastDom3Node just yet, wouldn't it be better to delay getting that until
after we know we have a newNode?
| Assignee | ||
Comment 11•23 years ago
|
||
Attachment #98088 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #98100 -
Attachment is obsolete: true
Comment 12•23 years ago
|
||
Comment on attachment 98100 [details] [diff] [review]
sure thing. More like this?
bz's making a new patch that moves the newNode code into the if.
Attachment #98100 -
Flags: needs-work+
| Assignee | ||
Comment 13•23 years ago
|
||
Comment 14•23 years ago
|
||
Comment on attachment 98103 [details] [diff] [review]
Argh. I am being dense today
r=caillon. :-)
Attachment #98103 -
Flags: review+
Comment 15•23 years ago
|
||
+ * We want to append instead of invalidating if the first thing
+ * that that got appended comes after ourLastContent.
invalidating should be invalidate
that that
Maybe the reviewers are dense today ;-).
Comment 16•23 years ago
|
||
Maybe. I saw the append/invalidating thing but my brain didn't flag it as wrong
since it's not really that wrong. And it's late, 'that that' is just one of
those optical illusions :-)
| Assignee | ||
Comment 17•23 years ago
|
||
Attachment #98103 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #98105 -
Flags: review+
Comment 18•23 years ago
|
||
Comment on attachment 98105 [details] [diff] [review]
fix double "that", keep the correct gerund.
sr=jst
Attachment #98105 -
Flags: superreview+
Comment 19•23 years ago
|
||
Comment on attachment 98105 [details] [diff] [review]
fix double "that", keep the correct gerund.
a=asa (on behalf of drivers) for checkin to 1.2a
Attachment #98105 -
Flags: approval+
| Assignee | ||
Comment 20•23 years ago
|
||
fix is in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•