зеркало из https://github.com/mozilla/gecko-dev.git
Bug 845374 - Part h: Move nsContentUtils::NameChanged out of line; r=khuey
This commit is contained in:
Родитель
eb52584f84
Коммит
a94aa82b0a
|
@ -677,17 +677,8 @@ public:
|
|||
* Convenience method to create a new nodeinfo that differs only by name
|
||||
* from aNodeInfo.
|
||||
*/
|
||||
static nsresult NameChanged(nsINodeInfo *aNodeInfo, nsIAtom *aName,
|
||||
nsINodeInfo** aResult)
|
||||
{
|
||||
nsNodeInfoManager *niMgr = aNodeInfo->NodeInfoManager();
|
||||
|
||||
*aResult = niMgr->GetNodeInfo(aName, aNodeInfo->GetPrefixAtom(),
|
||||
aNodeInfo->NamespaceID(),
|
||||
aNodeInfo->NodeType(),
|
||||
aNodeInfo->GetExtraName()).get();
|
||||
return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
static nsresult NameChanged(nsINodeInfo* aNodeInfo, nsIAtom* aName,
|
||||
nsINodeInfo** aResult);
|
||||
|
||||
/**
|
||||
* Returns the appropriate event argument names for the specified
|
||||
|
|
|
@ -2875,6 +2875,21 @@ nsContentUtils::IsDraggableLink(const nsIContent* aContent) {
|
|||
return aContent->IsLink(getter_AddRefs(absURI));
|
||||
}
|
||||
|
||||
// static
|
||||
nsresult
|
||||
nsContentUtils::NameChanged(nsINodeInfo* aNodeInfo, nsIAtom* aName,
|
||||
nsINodeInfo** aResult)
|
||||
{
|
||||
nsNodeInfoManager *niMgr = aNodeInfo->NodeInfoManager();
|
||||
|
||||
*aResult = niMgr->GetNodeInfo(aName, aNodeInfo->GetPrefixAtom(),
|
||||
aNodeInfo->NamespaceID(),
|
||||
aNodeInfo->NodeType(),
|
||||
aNodeInfo->GetExtraName()).get();
|
||||
return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
TestSitePerm(nsIPrincipal* aPrincipal, const char* aType, uint32_t aPerm, bool aExactHostMatch)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче