Closed Bug 358257 Opened 18 years ago Closed 11 years ago

Add support for XTF attributes

Categories

(Core Graveyard :: XTF, enhancement)

x86
All
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(3 files, 1 obsolete file)

XForms needs xtf attributes, so that bindings to non-xforms xml languages can be implemented.
Summary: Add support for XTF attribute → Add support for XTF attributes
Attached patch like thisSplinter Review
Comment on attachment 243698 [details] [diff] [review]
like this

I hope this doesn't get slammed because it adds some new code. The size of XTF was just decreased in Bug 355100.
Attachment #243698 - Flags: review?(bugmail)
If this gets in the trunk, it would be nice to get it on the branches, too.  At least 1.8.1.
So is the only reason for this so that we can move xmlevents into XTF? I sort of like that we support xml events and think that we should keep it.

Are there other reasons for XTF attributes? If not I think we should WONTFIX this bug.
There is also http://www.w3.org/TR/xforms/slice9.html#ui.repeat.via.attrs
There is also http://www.w3.org/TR/xforms/slice7.html#ui-binding-foreign
might make tables more doable in xforms.  Which currently is very difficult to get right for a form author.  But I haven't verified it, yet.
I'd still like to have this, even if not used for XML Events.
smaug: What happens when we have a XTF-based element accepting a XTF-based attribute?  Is it elementWrapper.willSetAttribute() and then nsIXTFAttribute.willChangeOwner, or the other way around, or is it random?  Does it follow a similar order for detaching the attribute?
XTF elements don't handle namespaced attributes, so only the module 
implementing new XTFAttributes sees the change.
Can we get any progress on this? It sounds like unique right way to get a
support of attribute based repeats for XForms.
I ran into this bug today - it's blocking https://bugzilla.mozilla.org/show_bug.cgi?id=340515 - thanks for all your help.
Attachment #243698 - Flags: review?(jonas)
smaug:  I might be willing to update the patch (it has XTFElement code which is already in the tree).  I see three possible use cases:

(1) A XTF attribute node wants to implement additional interfaces.
(2) A XTF attribute node, by its presence, wants to give its ownerElement additional interfaces and properties.  This is comparable to an element whose XBL binding defines additional interfaces and properties.  For XBL, a class attribute (or other method of invoking a CSS selector and -xbl-binding rule) is how this is done.  (<implementation implements="nsIFoo"/>)
(3) A XTF attribute node wants to give its owner element additional (anonymous? native anonymous?) content.  This is what bug 340515 requests, and is comparable to XBL 1's <content/> element.

I don't see any use cases for (1).  (2) is personally appealing to me for the capabilities it might offer, but could be non-trivial.  (3) is something I think would be tougher, and would need a clearer specification.
Olli, Jonas. What blocks this patch? How can we get it?
Someone (I?) needs to update the patch.

XBL2 doesn't cover namespaced attribute, so we could perhaps take this.
(And XTF is anyway quite simple and small code.)
Attached patch patch for xtf attributes (obsolete) — Splinter Review
i updated the patch for last version of mozilla
Attachment #408323 - Flags: review-
Attachment #408323 - Flags: review- → review?
Olli, how can I test it? I made component from https://bugzilla.mozilla.org/attachment.cgi?id=243701 and made simple JS for instantiate class nsIXTFAttribute. Is it enough?
Is that automatic? IIRC mochitests or at least chrome tests can add
new components and test them.
No, it's manual. Unfortunatly I can't understand how can I test it. And is it enough to create object of XTFAttribute?
Attachment #408323 - Flags: review?
patch for mozilla (tested on 3.6 and trunc). 
also it contains simple test that creates factory for XTFAttributes (xpcshell-tests)
Attachment #408323 - Attachment is obsolete: true
Attachment #409948 - Flags: review?
Sergey, you should ask someone for review and superreview. Jonas will be probably the best.
btw, use -p option when you make a diff.
Attachment #409948 - Flags: review? → review?(jonas)
Attachment #409948 - Flags: superreview?(jonas)
Attachment #409948 - Flags: review?(jonas)
Attachment #409948 - Flags: review?(jonas)
Attachment #409948 - Flags: review?(Olli.Pettay)
Comment on attachment 409948 [details] [diff] [review]
patch for xtf attributes

Olli can review this, too, he's got a lot of XTF knowledge.
Comment on attachment 409948 [details] [diff] [review]
patch for xtf attributes

Well, this is pretty much my patch updated for trunk, so I shouldn't review it.
Attachment #409948 - Flags: review?(Olli.Pettay) → review?(jonas)
Comment on attachment 409948 [details] [diff] [review]
patch for xtf attributes

I really don't want to do this. Attribute nodes should go away, and so should the XTF code. Attribute nodes will probably go away as soon as we can find someone to update the webcore spec, and XTF can go away once XBL2 exposes the same capabilities.

Neither of this is about to happen very soon, but I'm reluctant to spend time on adding functionality to code that is doomed.

Do feel free to rerequest review if there really is no other way to do this
Attachment #409948 - Flags: superreview?(jonas)
Attachment #409948 - Flags: review?(jonas)
Olli, do you keep in mind any other way? Does it require to reorganize entirely the way how XForms works? If so then I would love to get this patch landed.
XTF has been removed from the tree.  [xtfisdead] for filtering purposes.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: