mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 321175, change nsTemplateRule::GetAction to return nsIContent, r+sr=jonas
This commit is contained in:
parent
016928536d
commit
f5177ae51d
@ -314,14 +314,6 @@ nsTemplateRule::~nsTemplateRule()
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsTemplateRule::GetAction(nsIContent** aAction) const
|
||||
{
|
||||
*aAction = mAction;
|
||||
NS_IF_ADDREF(*aAction);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsTemplateRule::GetRuleNode(nsIDOMNode** aRuleNode) const
|
||||
{
|
||||
|
@ -149,11 +149,8 @@ public:
|
||||
* Return the <action> node that this rule was constructed from, or its
|
||||
* logical equivalent for shorthand syntaxes. That is, the parent node of
|
||||
* the content that should be generated for this rule.
|
||||
* @param aAction an out parameter, which will contain the content node
|
||||
* that this rule uses to generated content
|
||||
* @return NS_OK if no errors occur.
|
||||
*/
|
||||
nsresult GetAction(nsIContent** aAction) const;
|
||||
nsIContent* GetAction() const { return mAction; }
|
||||
|
||||
/**
|
||||
* Return the <rule> content node that this rule was constructed from.
|
||||
|
@ -1233,9 +1233,7 @@ nsXULContentBuilder::CreateContainerContentsForQuerySet(nsIContent* aElement,
|
||||
}
|
||||
|
||||
// Grab the template node
|
||||
nsCOMPtr<nsIContent> action;
|
||||
matchedrule->GetAction(getter_AddRefs(action));
|
||||
|
||||
nsCOMPtr<nsIContent> action = matchedrule->GetAction();
|
||||
BuildContentFromTemplate(action, aElement, aElement, PR_TRUE,
|
||||
mRefVariable == matchedrule->GetMemberVariable(),
|
||||
nextresult, aNotify, newmatch,
|
||||
@ -1707,9 +1705,7 @@ nsXULContentBuilder::ReplaceMatch(nsIXULTemplateResult* aOldResult,
|
||||
}
|
||||
|
||||
if (aNewMatch) {
|
||||
nsCOMPtr<nsIContent> action;
|
||||
aNewMatchRule->GetAction(getter_AddRefs(action));
|
||||
|
||||
nsCOMPtr<nsIContent> action = aNewMatchRule->GetAction();
|
||||
return BuildContentFromTemplate(action, content, content, PR_TRUE,
|
||||
mRefVariable == aNewMatchRule->GetMemberVariable(),
|
||||
aNewMatch->mResult, PR_TRUE, aNewMatch,
|
||||
|
@ -1400,8 +1400,6 @@ nsXULTreeBuilder::GetTemplateActionRowFor(PRInt32 aRow, nsIContent** aResult)
|
||||
// generate text
|
||||
nsTreeRows::Row& row = *(mRows[aRow]);
|
||||
|
||||
nsCOMPtr<nsIContent> action;
|
||||
|
||||
// The match stores the indices of the rule and query to use. Use these
|
||||
// to look up the right nsTemplateRule and use that rule's action to get
|
||||
// the treerow in the template.
|
||||
@ -1410,10 +1408,8 @@ nsXULTreeBuilder::GetTemplateActionRowFor(PRInt32 aRow, nsIContent** aResult)
|
||||
nsTemplateQuerySet* qs = mQuerySets[row.mMatch->QuerySetPriority()];
|
||||
nsTemplateRule* rule = qs->GetRuleAt(ruleindex);
|
||||
if (rule) {
|
||||
rule->GetAction(getter_AddRefs(action));
|
||||
|
||||
nsCOMPtr<nsIContent> children;
|
||||
nsXULContentUtils::FindChildByTag(action, kNameSpaceID_XUL,
|
||||
nsXULContentUtils::FindChildByTag(rule->GetAction(), kNameSpaceID_XUL,
|
||||
nsGkAtoms::treechildren,
|
||||
getter_AddRefs(children));
|
||||
if (children) {
|
||||
|
Loading…
Reference in New Issue
Block a user