Closed
Bug 292089
Opened 20 years ago
Closed 20 years ago
MIP properties are not applied on repeat content
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allan, Assigned: allan)
References
()
Details
Attachments
(2 files, 2 obsolete files)
|
1.74 KB,
application/xhtml+xml
|
Details | |
|
25.07 KB,
patch
|
doronr
:
review+
|
Details | Diff | Splinter Review |
relevant, constraint, etc. are not shown on repeat content. I know why (events are sent before the repeat content is created), and also think I have a solution. The solution could depend on bug 271720 though.
| Assignee | ||
Comment 1•20 years ago
|
||
Testcase
| Assignee | ||
Updated•20 years ago
|
| Assignee | ||
Comment 2•20 years ago
|
||
Fixes the bug by adding a nsIModelElementPrivate::SetStates() call that is called by the control when it has a model and a bound node, that is in Bind(). I've moved the state setting (through attributes for now, until bug 271720 is fixed) from the control to the model. That saves us a ton of string comparisons, as we do not need to check for the events on the control to set the states. I've also added some more return value checking in nsXFormsModelElement. I've also fixed output, which had a couple of bugs as a result of bug 284469 and bug 289534. It now uses nsXFormsControlStub::ResetBoundNode() too, so the correct member variables are cleared and set.
Attachment #182053 -
Flags: review?(smaug)
| Assignee | ||
Updated•20 years ago
|
Summary: MIP properties are not shown on repeat content → MIP properties are not applied on repeat content
Comment 3•20 years ago
|
||
Comment on attachment 182053 [details] [diff] [review] Patch Looks ok (except kStateAttributes, which is temporary) >+nsXFormsModelElement::SetSingleState(nsIDOMElement *aElement, >+ PRBool aState, >+ nsXFormsEvent aOnEvent, >+ PRUint32 aAttributePos) Please, add big XXX to all the places where you're using this hacky attribute position thing. >+ if (aAllStates || ns->ShouldDispatchValid()) { >+ SetSingleState(element, ns->IsValid(), eEvent_Valid, 0); >+ } >+ if (aAllStates || ns->ShouldDispatchReadonly()) { >+ SetSingleState(element, ns->IsReadonly(), eEvent_Readonly, 2); >+ } >+ if (aAllStates || ns->ShouldDispatchRequired()) { >+ SetSingleState(element, ns->IsRequired(), eEvent_Required, 4); > } >- if (aInitialize || ns->ShouldDispatchValueChanged()) { >+ if (aAllStates || ns->ShouldDispatchRelevant()) { >+ SetSingleState(element, ns->IsRelevant(), eEvent_Enabled, 6); Add XXX about 0, 2, 4, 6 > >+const nsString kStateAttributes[8] = { NS_LITERAL_STRING("valid"), >+ NS_LITERAL_STRING("invalid"), >+ NS_LITERAL_STRING("read-only"), >+ NS_LITERAL_STRING("read-write"), >+ NS_LITERAL_STRING("required"), >+ NS_LITERAL_STRING("optional"), >+ NS_LITERAL_STRING("enabled"), >+ NS_LITERAL_STRING("disabled") }; >+ XXX here too ;) > > /** >+ * The attribute names used on the elements to reflect the pseudo class state >+ * until bug 271720 is landed. >+ */ >+extern const nsString kStateAttributes[8]; >+ Add XXX and @todo
Attachment #182053 -
Flags: review?(smaug)
Attachment #182053 -
Flags: review?(doronr)
Attachment #182053 -
Flags: review+
| Assignee | ||
Updated•20 years ago
|
Attachment #182053 -
Flags: review?(doronr)
| Assignee | ||
Comment 4•20 years ago
|
||
Attachment #182053 -
Attachment is obsolete: true
Attachment #182565 -
Flags: review?(doronr)
| Assignee | ||
Comment 5•20 years ago
|
||
somebody *ahem* :), checked something in
| Assignee | ||
Updated•20 years ago
|
Attachment #182565 -
Attachment is obsolete: true
Attachment #182570 -
Flags: review?(doronr)
| Assignee | ||
Updated•20 years ago
|
Attachment #182565 -
Flags: review?(doronr)
Updated•20 years ago
|
Attachment #182570 -
Flags: review?(doronr) → review+
| Assignee | ||
Comment 6•20 years ago
|
||
Chcked 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
•