Backout last two commits because of ownership issue.

This commit is contained in:
Mounir Lamouri 2011-09-27 12:18:02 +02:00
parent f6dcc9c4d8
commit 6453ab8669
9 changed files with 6 additions and 38 deletions

View File

@ -71,11 +71,3 @@ DEPRECATED_OPERATION(IsSupported)
DEPRECATED_OPERATION(IsEqualNode)
DEPRECATED_OPERATION(TextContent)
DEPRECATED_OPERATION(EnablePrivilege)
DEPRECATED_OPERATION(IsSameNode)
DEPRECATED_OPERATION(ReplaceWholeText)
DEPRECATED_OPERATION(GlobalStorage)
DEPRECATED_OPERATION(XmlEncoding)
DEPRECATED_OPERATION(XmlVersion)
DEPRECATED_OPERATION(InputEncoding)
DEPRECATED_OPERATION(XmlStandalone)
DEPRECATED_OPERATION(IsElementContentWhitespace)

View File

@ -660,11 +660,6 @@ nsDOMAttribute::SetTextContent(const nsAString& aTextContent)
NS_IMETHODIMP
nsDOMAttribute::IsSameNode(nsIDOMNode *other, PRBool *aResult)
{
nsIDocument* document = GetOwnerDoc();
if (document) {
document->WarnOnceAbout(nsIDocument::eIsSameNode);
}
*aResult = other == this;
return NS_OK;
}

View File

@ -5826,7 +5826,6 @@ nsDocument::SetTextContent(const nsAString & aTextContent)
NS_IMETHODIMP
nsDocument::IsSameNode(nsIDOMNode *other, PRBool *aResult)
{
WarnOnceAbout(eIsSameNode);
*aResult = other == this;
return NS_OK;
}
@ -5878,7 +5877,6 @@ nsDocument::Contains(nsIDOMNode* aOther, PRBool* aReturn)
NS_IMETHODIMP
nsDocument::GetInputEncoding(nsAString& aInputEncoding)
{
WarnOnceAbout(eInputEncoding);
if (mHaveInputEncoding) {
return GetCharacterSet(aInputEncoding);
}
@ -5890,7 +5888,6 @@ nsDocument::GetInputEncoding(nsAString& aInputEncoding)
NS_IMETHODIMP
nsDocument::GetXmlEncoding(nsAString& aXmlEncoding)
{
WarnOnceAbout(eXmlEncoding);
if (!IsHTML() &&
mXMLDeclarationBits & XML_DECLARATION_BITS_DECLARATION_EXISTS &&
mXMLDeclarationBits & XML_DECLARATION_BITS_ENCODING_EXISTS) {
@ -5907,7 +5904,6 @@ nsDocument::GetXmlEncoding(nsAString& aXmlEncoding)
NS_IMETHODIMP
nsDocument::GetXmlStandalone(PRBool *aXmlStandalone)
{
WarnOnceAbout(eXmlStandalone);
*aXmlStandalone =
!IsHTML() &&
mXMLDeclarationBits & XML_DECLARATION_BITS_DECLARATION_EXISTS &&
@ -5933,7 +5929,6 @@ nsDocument::GetMozSyntheticDocument(PRBool *aSyntheticDocument)
NS_IMETHODIMP
nsDocument::GetXmlVersion(nsAString& aXmlVersion)
{
WarnOnceAbout(eXmlVersion);
if (IsHTML()) {
SetDOMStringToNull(aXmlVersion);
return NS_OK;

View File

@ -846,8 +846,6 @@ nsGenericDOMDataNode::ReplaceWholeText(const nsAString& aContent,
{
*aResult = nsnull;
GetOwnerDoc()->WarnOnceAbout(nsIDocument::eReplaceWholeText);
// Handle parent-less nodes
nsCOMPtr<nsIContent> parent = GetParent();
if (!parent) {

View File

@ -334,7 +334,6 @@ protected:
nsresult GetIsElementContentWhitespace(PRBool *aReturn)
{
GetOwnerDoc()->WarnOnceAbout(nsIDocument::eIsElementContentWhitespace);
*aReturn = TextIsOnlyWhitespace();
return NS_OK;
}

View File

@ -4210,10 +4210,6 @@ nsINode::IsEqualNode(nsIDOMNode* aOther, PRBool* aReturn)
nsresult
nsINode::IsSameNode(nsIDOMNode* aOther, PRBool* aReturn)
{
nsIDocument* owner = GetOwnerDoc();
if (owner) {
owner->WarnOnceAbout(nsIDocument::eIsSameNode);
}
nsCOMPtr<nsINode> other = do_QueryInterface(aOther);
*aReturn = other == this;
return NS_OK;

View File

@ -8159,11 +8159,6 @@ nsGlobalWindow::GetGlobalStorage(nsIDOMStorageList ** aGlobalStorage)
{
NS_ENSURE_ARG_POINTER(aGlobalStorage);
nsCOMPtr<nsIDocument> document = do_QueryInterface(GetExtantDocument());
if (document) {
document->WarnOnceAbout(nsIDocument::eGlobalStorage);
}
if (!Preferences::GetBool(kStorageEnabled)) {
*aGlobalStorage = nsnull;
return NS_OK;

View File

@ -111,11 +111,3 @@ EnablePrivilegeWarning=Use of enablePrivilege is deprecated. Please use code th
nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.parse instead.
nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
IsSameNodeWarning=Use of isSameNode is deprecated. Please use A == B to test for equality instead.
ReplaceWholeTextWarning=Use of replaceWholeText is deprecated. Please call normalize() on the parent and set the data attribute, or use textContent instead.
XmlEncodingWarning=Use of xmlEncoding is deprecated.
XmlVersionWarning=Use of xmlVersion is deprecated.
InputEncodingWarning=Use of inputEncoding is deprecated.
XmlStandaloneWarning=Use of xmlStandalone is deprecated.
IsElementContentWhitespaceWarning=Use of isElementContentWhitespaceWarning is deprecated.
GlobalStorageWarning=Use of globalStorage is deprecated. Please use localStorage instead.

View File

@ -817,6 +817,12 @@ customMethodCalls = {
'thisType': 'nsINode',
'canFail': False
},
'nsIDOMNode_IsSameNode': {
'thisType': 'nsINode',
'arg0Type': 'nsINode',
'code': ' PRBool result = self == arg0;',
'canFail': False
},
'nsIDOMNode_LookupPrefix': {
'thisType': 'nsINode',
'canFail': False