Closed
Bug 263705
Opened 21 years ago
Closed 21 years ago
support multiple instances per model
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
Details
Attachments
(1 file)
55.96 KB,
patch
|
bryner
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
We should support multiple instance elements per model. Instances other than
the first one can be selected via the instance() xpath extension or by the
getInstanceDocument() method on the model element.
Assignee | ||
Comment 1•21 years ago
|
||
Implement multi-instance support. Each instance now has its own
InstanceElement, which handles waiting for the load event. So
GetInstanceDocument works now, though the instance() xpath function remains
unimplemented.
The other thing this patch does is moves us away from using unfrozen Gecko
API's. In a lot of ways XForms is the first real test of extending the layout
engine using XTF, and if we really want that to be a viable option we're going
to have to support frozen API's for doing so. In this patch I've gotten rid of
_almost_ all of our usage of nsIContent and replaced it with DOM interfaces.
It's a little less performant in spots, but overall I don't think it'll be too
much of a killer. Here are some things I discovered while making that change:
- We may want to freeze a parallel version of the DOM API that deals with
nsIAtoms instead of strings. This of course means that we would have to freeze
nsIAtom.
- We also need to figure out what to do about properties on content nodes and
documents.
There's a lot more that's not frozen yet, of course, but this is a start.
Assignee | ||
Updated•21 years ago
|
Attachment #161654 -
Flags: superreview?(darin)
Attachment #161654 -
Flags: review?(allan)
Comment 2•21 years ago
|
||
Comment on attachment 161654 [details] [diff] [review]
patch
couple nits:
- might be nice to #define the xforms namespace and other namespaces in a
common header file (e.g., nsXForms.h).
- you might be able to use nsIWebNavigation::currentURI to access the URI of
the document. nsIWebNavigation is going to be frozen shortly, so that would be
a good option. we just need to freeze a way to access it from a DOM document.
- can nsXFormsInstanceElement.cpp use NS_IMPL_ISUPPORTSX?
Attachment #161654 -
Flags: superreview?(darin) → superreview+
Comment 3•21 years ago
|
||
Also just nits from me.
- nsXFormsModel::GetSubmissionFormat(nsIDOMElement *content)
content -> aElement
- nsXFormsModelElement.h:
IsComplete() and AddPendingInstance() code should be moved to .cpp IMHO.
Great work Brian.
Comment 4•21 years ago
|
||
Oh, I do have one more thing: Could you add a small JavaDoc-style comment for
the new nsXFormsInstanceElement?
Assignee | ||
Comment 5•21 years ago
|
||
Comment on attachment 161654 [details] [diff] [review]
patch
marking + per allan's comments
Attachment #161654 -
Flags: review?(allan) → review+
Assignee | ||
Comment 6•21 years ago
|
||
(In reply to comment #3)
> - nsXFormsModelElement.h:
> IsComplete() and AddPendingInstance() code should be moved to .cpp IMHO.
I disagree, for the sake of efficiency.
Assignee | ||
Comment 7•21 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•