Closed
Bug 280366
Opened 20 years ago
Closed 19 years ago
Context is not set properly if parent only has model attribute
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allan, Assigned: allan)
References
()
Details
Attachments
(2 files)
The problem is that mBoundNode which is also used as context node, is only set if there are node binding attributes (@ref / @bind).
| Assignee | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 2•19 years ago
|
||
*** Bug 299274 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 3•19 years ago
|
||
* Also triggers ResetBoundNode() routine if there is a model attribute * If a control is not bound but has a model, GetContext() returns the document element of the model's default instance document as the context node.
| Assignee | ||
Updated•19 years ago
|
Attachment #189879 -
Flags: review?(aaronr)
| Assignee | ||
Comment 4•19 years ago
|
||
Have you forgotten this Aaron?
Comment on attachment 189879 [details] [diff] [review] Patch Ooops! I did forget to review this patch. Sorry! >Index: nsXFormsControlStub.cpp >=================================================================== >RCS file: /cvsroot/mozilla/extensions/xforms/nsXFormsControlStub.cpp,v >@@ -647,19 +661,17 @@ > const nsAString &aValue) > { > if (aName == nsXFormsAtoms::model || > aName == nsXFormsAtoms::bind || > aName == nsXFormsAtoms::ref) { > if (mModel) > mModel->RemoveFormControl(this); > >- if (aName != nsXFormsAtoms::model) { >- AddRemoveSNBAttr(aName, aValue); >- } >+ AddRemoveSNBAttr(aName, aValue); > } > } I don't get why you want to increment mBindAttrsCount for an element that only has a model attribute and thus allow it to go through the ProcessNodeBinding() stuff. To assign it a mModel and put the control on the control list for mModel? rest of the patch looks alright.
| Assignee | ||
Comment 6•19 years ago
|
||
(In reply to comment #5) > (From update of attachment 189879 [details] [diff] [review] [edit]) > I don't get why you want to increment mBindAttrsCount for an element that only > has a model attribute and thus allow it to go through the ProcessNodeBinding() > stuff. To assign it a mModel and put the control on the control list for > mModel? Because of bug 299274. "somebody" finds it useful to go through the process of finding the model if there's only a mode attribute.
Status: NEW → ASSIGNED
Comment on attachment 189879 [details] [diff] [review] Patch Ugh, that stinks that we'll have to go through the whole binding process knowing that we'll never have a chance to find a bound node. I guess if this turns out to be a semi common case we'll have to think about optimizing it somehow.
Attachment #189879 -
Flags: review?(aaronr) → review+
| Assignee | ||
Updated•19 years ago
|
Attachment #189879 -
Flags: review?(smaug)
Comment 8•19 years ago
|
||
Comment on attachment 189879 [details] [diff] [review] Patch Could you use -p with diff. But anyway, r=me
Attachment #189879 -
Flags: review?(smaug) → review+
| Assignee | ||
Comment 9•19 years ago
|
||
Checked in on trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•