From a94aa82b0a04e260bd1a53cbfff7ee5c79676d3f Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sun, 17 Mar 2013 08:55:14 +0100 Subject: [PATCH] Bug 845374 - Part h: Move nsContentUtils::NameChanged out of line; r=khuey --- content/base/public/nsContentUtils.h | 13 ++----------- content/base/src/nsContentUtils.cpp | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/content/base/public/nsContentUtils.h b/content/base/public/nsContentUtils.h index 9d1ffed89470..b168a8ebced3 100644 --- a/content/base/public/nsContentUtils.h +++ b/content/base/public/nsContentUtils.h @@ -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 diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 1a47ac5eeca1..98f51affd3a8 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -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) {