Closed Bug 278433 Opened 20 years ago Closed 20 years ago

setvalue element doesn't use @value as context

Categories

(Core Graveyard :: XForms, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronr, Assigned: aaronr)

Details

Attachments

(2 files, 1 obsolete file)

According to the XForms Errata:
http://www.w3.org/MarkUp/Forms/Group/errata-10.html#2.2.3.E7:%20Evaluation%20Context%20for%20%3Csetvalue%3E%20(section%2010.1.9)|outline

The expression evaluated in the @value of xforms:setvalue is supposed to have
the context node of the node that setvalue is bound to.  We currently do not
follow this behavior.

I will attach testcase that shows this off.
testcase that exhibits the problem.  When you click on the pushbutton, the
value should be changed as noted in the testcase.
Assignee: aaronr → smaug
Attached patch proposed fix (obsolete) — Splinter Review
Note: I changed around HandleAction to be more efficient (I hope) now that we
need to know single node binding before we figure out the value to set when
there is a non-empty value attribute.
Assignee: smaug → aaronr
Status: NEW → ASSIGNED
Attachment #171289 - Flags: superreview?(darin)
Attachment #171289 - Flags: review?(smaug)
Comment on attachment 171289 [details] [diff] [review]
proposed fix

>   nsAutoString value;
...
>+  nsAutoString valueattr;
>+  mElement->GetAttribute(NS_LITERAL_STRING("value"), valueattr);

Could you move these lines to be just before if(!valueattr.IsEmpty())
Attachment #171289 - Flags: review?(smaug) → review+
same patch as before, just accounted for Smaug's comment.
Attachment #171289 - Attachment is obsolete: true
Attachment #171289 - Flags: superreview?(darin)
Attachment #171298 - Flags: superreview?(darin)
Comment on attachment 171298 [details] [diff] [review]
fix with smaug's comments

"valueAttr" over "valueattr" is generally preferred in mozilla code.
Attachment #171298 - Flags: superreview?(darin) → superreview+
fixed on xforms branch

leaving open for merge with trunk
Checked in via bug 278896.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: