Closed
Bug 280017
Opened 20 years ago
Closed 20 years ago
Let remaining controls implement nsIContextControl
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allan, Assigned: allan)
References
()
Details
Attachments
(1 file, 2 obsolete files)
29.49 KB,
patch
|
bryner
:
superreview+
|
Details | Diff | Splinter Review |
Right now, only repeat, group and switch set their context through. All elements that have a node binding should set context, coincidently :) that should be the same elements that inherit from nsXFormsControl so it should be possible to put in nsXFormsControlStub.
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•20 years ago
|
||
This patch makes nsIXFormsControl inherit nsIXFormsContextControl, and implements it in nsXFormsControlStub, thus setting up the context for all nsIXFormsControl-controls. I believe it is rather crucial to have in the beta, as wrong contexts could break a lot of forms.
Attachment #172814 -
Flags: review?(aaronr)
Assignee | ||
Updated•20 years ago
|
Attachment #172814 -
Flags: review?(aaronr) → review?(smaug)
Comment 2•20 years ago
|
||
Comment on attachment 172814 [details] [diff] [review] Patch v1 >+NS_IMPL_ISUPPORTS_INHERITED2(nsXFormsControlStub, >+ nsXFormsXMLVisualStub, >+ nsIXFormsContextControl, >+ nsIXFormsControl); Remove ';' >+ nsXFormsSwitchElement() : mAddingChildren(PR_FALSE) {}; And here >+NS_IMPL_ISUPPORTS_INHERITED1(nsXFormsSwitchElement, >+ nsXFormsControlStub, >+ nsIXFormsSwitchElement); And here > + * @bug If a control has a model attribute, but no binding attributes we fail > + * to set this as the context for children. We need to return the contextnode > + * from EvaluateNodeBinding in that case, and return that in GetContext(). (XXX) Would it be difficult to fix this now? The changes to Switch element (mAddingChildren) look right though they are not related to this bug.
Attachment #172814 -
Flags: review?(smaug) → review+
Assignee | ||
Comment 3•20 years ago
|
||
(In reply to comment #2) > > + * @bug If a control has a model attribute, but no binding attributes we fail > > + * to set this as the context for children. We need to return the contextnode > > + * from EvaluateNodeBinding in that case, and return that in GetContext(). (XXX) > Would it be difficult to fix this now? You never know before you attack it, and I've learned my lesson with "the patch from hell" :) So, I'd rather do a new bug on that. I'll create a new one, and include a ref to it in the code.
Assignee | ||
Comment 4•20 years ago
|
||
* removed the ';''s * added a ref. to the bug with the "lone model" attribute bug 280366 * updated to current CVS
Attachment #172814 -
Attachment is obsolete: true
Attachment #172827 -
Flags: superreview?(bryner)
Assignee | ||
Updated•20 years ago
|
Attachment #172827 -
Flags: superreview?(bryner)
Assignee | ||
Comment 5•20 years ago
|
||
Attachment #172827 -
Attachment is obsolete: true
Attachment #173067 -
Flags: superreview?(bryner)
Comment 6•20 years ago
|
||
Comment on attachment 173067 [details] [diff] [review] Updated to current CVS >--- xforms/nsXFormsControlStub.cpp 2005-02-01 09:47:24.204850760 +0100 >+++ xforms.contextcontrol/nsXFormsControlStub.cpp 2005-02-01 11:08:56.882741648 +0100 >+NS_IMETHODIMP >+nsXFormsControlStub::GetContext(nsAString &aModelID, >+ nsIDOMNode **aContextNode, >+ PRInt32 *aContextPosition, >+ PRInt32 *aContextSize) >+{ >+ NS_ENSURE_ARG(aContextSize); >+ NS_ENSURE_ARG(aContextPosition); >+ >+ *aContextPosition = 1; >+ *aContextSize = 1; >+ >+ if (mBoundNode && aContextNode) >+ CallQueryInterface(mBoundNode, aContextNode); // addrefs I would return the error code if this QI fails. Or, if it should never fail, add an NS_ASSERTION(*aContextNode). Looks fine otherwise.
Attachment #173067 -
Flags: superreview?(bryner) → superreview+
Assignee | ||
Comment 7•20 years ago
|
||
Fixed Brian's comment and checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 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
•