Closed
Bug 270651
Opened 20 years ago
Closed 15 years ago
Multiple insertion points for xtf
Categories
(Core Graveyard :: XTF, defect)
Core Graveyard
XTF
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: bryner, Assigned: alex)
Details
For implementing XForms select, I set up anonymous content like this:
<html:label>
<html:span/>
<html:select/>
</html:label>
Then, suppose you have XForms content like this:
<xforms:select>
<xforms:label>Pick one:</xforms:label>
<xforms:item>
<xforms:label>Item 1</xforms:label>
<xforms:value>val1</xforms:value>
</xforms:item>
</xforms:select>
Since I'm implementing the <xforms:item> using an anonymous <html:option>, I'd
like the insertion point for those to be the <html:select>. However, the label
element for the <xforms:select> needs to go inside the <span> instead.
In XBL, you could solve this as follows:
<html:label>
<html:span>
<xbl:children includes="label"/>
<html:select/>
<xbl:children/>
</html:select>
</html:label>
It would be great if we could work out something similar for XTF.
Comment 1•20 years ago
|
||
Note that XBL insertion points have a _lot_ of issues (including wrong or underdefined behavior). If we're going to copy them for XTF, it'd be good to at least clearly define the behavior....
Comment 2•20 years ago
|
||
Bryner and I were talking about this, and we thought an API like this might make
sense:
nsIXTFVisual {
nsIDOMElement getInsertionPoint(in nsIDOMNode explicitChild);
};
Thoughts?
Comment 3•20 years ago
|
||
What would that actually return? And how would the return value be used? How would various parts of layout that depend on DOM order (eg z-ordering) work? They don't work at all well with XBL right now, and I'm not sure whether we care for XTF.
Comment 4•20 years ago
|
||
bz: I don't have answers to all of your questions, as I really don't know that much about how XTF hooks into the layout engine. But, let me try to answer your first question: The return value would be similar to the return value of nsIXTFVisual::GetInsertionPoint(). That is, it indicates the DOM element that is to be the "parent" of the given explicit child node. The returned DOM element may be part of the XTF visual's anonymous content. Does that make sense?
Comment 5•20 years ago
|
||
OK. Where in the child list of the insertion point does the new content go? Can there be other (anonymous) kids of that node? Is this all documented somewhere, perchance, so I can just read up on it?
| Reporter | ||
Updated•18 years ago
|
Assignee: bryner → alex
QA Contact: xtf
Comment 6•15 years ago
|
||
nsIXTFVisual (and its friends) are long gone. WONTFIX?
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•