зеркало из https://github.com/mozilla/pjs.git
Bug 589436 patch 1: Make a number of methods take const arguments, to support this bug's main patch. r=jst a=blocking-b8+
This commit is contained in:
Родитель
e9ce65670e
Коммит
e0d5427c27
|
@ -340,7 +340,7 @@ public:
|
|||
/**
|
||||
* Similar to above, but to be used if one already has an atom for the ID
|
||||
*/
|
||||
static Element* MatchElementId(nsIContent *aContent, nsIAtom* aId);
|
||||
static Element* MatchElementId(nsIContent *aContent, const nsIAtom* aId);
|
||||
|
||||
/**
|
||||
* Given a URI containing an element reference (#whatever),
|
||||
|
@ -530,7 +530,7 @@ public:
|
|||
}
|
||||
|
||||
static nsresult GenerateStateKey(nsIContent* aContent,
|
||||
nsIDocument* aDocument,
|
||||
const nsIDocument* aDocument,
|
||||
nsIStatefulFrame::SpecialStateID aID,
|
||||
nsACString& aKey);
|
||||
|
||||
|
@ -580,14 +580,10 @@ public:
|
|||
static nsresult CheckQName(const nsAString& aQualifiedName,
|
||||
PRBool aNamespaceAware = PR_TRUE);
|
||||
|
||||
static nsresult SplitQName(nsIContent* aNamespaceResolver,
|
||||
static nsresult SplitQName(const nsIContent* aNamespaceResolver,
|
||||
const nsAFlatString& aQName,
|
||||
PRInt32 *aNamespace, nsIAtom **aLocalName);
|
||||
|
||||
static nsresult LookupNamespaceURI(nsIContent* aNamespaceResolver,
|
||||
const nsAString& aNamespacePrefix,
|
||||
nsAString& aNamespaceURI);
|
||||
|
||||
static nsresult GetNodeInfoFromQName(const nsAString& aNamespaceURI,
|
||||
const nsAString& aQualifiedName,
|
||||
nsNodeInfoManager* aNodeInfoManager,
|
||||
|
@ -648,7 +644,7 @@ public:
|
|||
* @return PR_TRUE if aContent has an attribute aName in namespace aNameSpaceID,
|
||||
* and the attribute value is non-empty.
|
||||
*/
|
||||
static PRBool HasNonEmptyAttr(nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
static PRBool HasNonEmptyAttr(const nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aName);
|
||||
|
||||
/**
|
||||
|
@ -658,7 +654,7 @@ public:
|
|||
* @return the presContext, or nsnull if the content is not in a document
|
||||
* (if GetCurrentDoc returns nsnull)
|
||||
*/
|
||||
static nsPresContext* GetContextForContent(nsIContent* aContent);
|
||||
static nsPresContext* GetContextForContent(const nsIContent* aContent);
|
||||
|
||||
/**
|
||||
* Method to do security and content policy checks on the image URI
|
||||
|
@ -743,7 +739,7 @@ public:
|
|||
* @param aContent The content node to test.
|
||||
* @return whether it's a draggable link
|
||||
*/
|
||||
static PRBool IsDraggableLink(nsIContent* aContent);
|
||||
static PRBool IsDraggableLink(const nsIContent* aContent);
|
||||
|
||||
/**
|
||||
* Convenience method to create a new nodeinfo that differs only by name
|
||||
|
@ -796,7 +792,7 @@ public:
|
|||
*
|
||||
* Both arguments to this method must be non-null.
|
||||
*/
|
||||
static PRBool IsInSameAnonymousTree(nsINode* aNode, nsIContent* aContent);
|
||||
static PRBool IsInSameAnonymousTree(const nsINode* aNode, const nsIContent* aContent);
|
||||
|
||||
/**
|
||||
* Return the nsIXPConnect service.
|
||||
|
@ -1692,7 +1688,7 @@ public:
|
|||
* @param aContent the content node to check
|
||||
* @return true if the content node is focused, false otherwise.
|
||||
*/
|
||||
static PRBool IsFocusedContent(nsIContent *aContent);
|
||||
static PRBool IsFocusedContent(const nsIContent *aContent);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -2005,7 +2005,7 @@ static inline void KeyAppendAtom(nsIAtom* aAtom, nsACString& aKey)
|
|||
KeyAppendString(nsAtomCString(aAtom), aKey);
|
||||
}
|
||||
|
||||
static inline PRBool IsAutocompleteOff(nsIContent* aElement)
|
||||
static inline PRBool IsAutocompleteOff(const nsIContent* aElement)
|
||||
{
|
||||
return aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::autocomplete,
|
||||
NS_LITERAL_STRING("off"), eIgnoreCase);
|
||||
|
@ -2013,7 +2013,7 @@ static inline PRBool IsAutocompleteOff(nsIContent* aElement)
|
|||
|
||||
/*static*/ nsresult
|
||||
nsContentUtils::GenerateStateKey(nsIContent* aContent,
|
||||
nsIDocument* aDocument,
|
||||
const nsIDocument* aDocument,
|
||||
nsIStatefulFrame::SpecialStateID aID,
|
||||
nsACString& aKey)
|
||||
{
|
||||
|
@ -2261,7 +2261,7 @@ nsContentUtils::CheckQName(const nsAString& aQualifiedName,
|
|||
|
||||
//static
|
||||
nsresult
|
||||
nsContentUtils::SplitQName(nsIContent* aNamespaceResolver,
|
||||
nsContentUtils::SplitQName(const nsIContent* aNamespaceResolver,
|
||||
const nsAFlatString& aQName,
|
||||
PRInt32 *aNamespace, nsIAtom **aLocalName)
|
||||
{
|
||||
|
@ -2393,7 +2393,7 @@ nsContentUtils::SplitExpatName(const PRUnichar *aExpatName, nsIAtom **aPrefix,
|
|||
|
||||
// static
|
||||
nsPresContext*
|
||||
nsContentUtils::GetContextForContent(nsIContent* aContent)
|
||||
nsContentUtils::GetContextForContent(const nsIContent* aContent)
|
||||
{
|
||||
nsIDocument* doc = aContent->GetCurrentDoc();
|
||||
if (doc) {
|
||||
|
@ -2628,7 +2628,7 @@ nsContentUtils::IsDraggableImage(nsIContent* aContent)
|
|||
|
||||
// static
|
||||
PRBool
|
||||
nsContentUtils::IsDraggableLink(nsIContent* aContent) {
|
||||
nsContentUtils::IsDraggableLink(const nsIContent* aContent) {
|
||||
nsCOMPtr<nsIURI> absURI;
|
||||
return aContent->IsLink(getter_AddRefs(absURI));
|
||||
}
|
||||
|
@ -3474,7 +3474,7 @@ nsContentUtils::DispatchChromeEvent(nsIDocument *aDoc,
|
|||
|
||||
/* static */
|
||||
Element*
|
||||
nsContentUtils::MatchElementId(nsIContent *aContent, nsIAtom* aId)
|
||||
nsContentUtils::MatchElementId(nsIContent *aContent, const nsIAtom* aId)
|
||||
{
|
||||
for (nsIContent* cur = aContent;
|
||||
cur;
|
||||
|
@ -3634,7 +3634,7 @@ nsContentUtils::UnregisterShutdownObserver(nsIObserver* aObserver)
|
|||
|
||||
/* static */
|
||||
PRBool
|
||||
nsContentUtils::HasNonEmptyAttr(nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
nsContentUtils::HasNonEmptyAttr(const nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aName)
|
||||
{
|
||||
static nsIContent::AttrValuesArray strings[] = {&nsGkAtoms::_empty, nsnull};
|
||||
|
@ -4184,8 +4184,8 @@ nsContentUtils::HasNonEmptyTextContent(nsINode* aNode)
|
|||
|
||||
/* static */
|
||||
PRBool
|
||||
nsContentUtils::IsInSameAnonymousTree(nsINode* aNode,
|
||||
nsIContent* aContent)
|
||||
nsContentUtils::IsInSameAnonymousTree(const nsINode* aNode,
|
||||
const nsIContent* aContent)
|
||||
{
|
||||
NS_PRECONDITION(aNode,
|
||||
"Must have a node to work with");
|
||||
|
@ -4203,7 +4203,7 @@ nsContentUtils::IsInSameAnonymousTree(nsINode* aNode,
|
|||
return aContent->GetBindingParent() == nsnull;
|
||||
}
|
||||
|
||||
return static_cast<nsIContent*>(aNode)->GetBindingParent() ==
|
||||
return static_cast<const nsIContent*>(aNode)->GetBindingParent() ==
|
||||
aContent->GetBindingParent();
|
||||
|
||||
}
|
||||
|
@ -6243,7 +6243,7 @@ mozAutoRemovableBlockerRemover::~mozAutoRemovableBlockerRemover()
|
|||
|
||||
// static
|
||||
PRBool
|
||||
nsContentUtils::IsFocusedContent(nsIContent* aContent)
|
||||
nsContentUtils::IsFocusedContent(const nsIContent* aContent)
|
||||
{
|
||||
nsFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче