зеркало из https://github.com/mozilla/gecko-dev.git
Bug 688190 part b: Add various warnings. r=bz
This commit is contained in:
Родитель
673a8c1f27
Коммит
ac8ccc1efe
|
@ -71,3 +71,10 @@ DEPRECATED_OPERATION(IsSupported)
|
|||
DEPRECATED_OPERATION(IsEqualNode)
|
||||
DEPRECATED_OPERATION(TextContent)
|
||||
DEPRECATED_OPERATION(EnablePrivilege)
|
||||
DEPRECATED_OPERATION(ReplaceWholeText)
|
||||
DEPRECATED_OPERATION(GlobalStorage)
|
||||
DEPRECATED_OPERATION(XmlEncoding)
|
||||
DEPRECATED_OPERATION(XmlVersion)
|
||||
DEPRECATED_OPERATION(InputEncoding)
|
||||
DEPRECATED_OPERATION(XmlStandalone)
|
||||
DEPRECATED_OPERATION(IsElementContentWhitespace)
|
||||
|
|
|
@ -5877,6 +5877,7 @@ nsDocument::Contains(nsIDOMNode* aOther, PRBool* aReturn)
|
|||
NS_IMETHODIMP
|
||||
nsDocument::GetInputEncoding(nsAString& aInputEncoding)
|
||||
{
|
||||
WarnOnceAbout(eInputEncoding);
|
||||
if (mHaveInputEncoding) {
|
||||
return GetCharacterSet(aInputEncoding);
|
||||
}
|
||||
|
@ -5888,6 +5889,7 @@ 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) {
|
||||
|
@ -5904,6 +5906,7 @@ nsDocument::GetXmlEncoding(nsAString& aXmlEncoding)
|
|||
NS_IMETHODIMP
|
||||
nsDocument::GetXmlStandalone(PRBool *aXmlStandalone)
|
||||
{
|
||||
WarnOnceAbout(eXmlStandalone);
|
||||
*aXmlStandalone =
|
||||
!IsHTML() &&
|
||||
mXMLDeclarationBits & XML_DECLARATION_BITS_DECLARATION_EXISTS &&
|
||||
|
@ -5929,6 +5932,7 @@ nsDocument::GetMozSyntheticDocument(PRBool *aSyntheticDocument)
|
|||
NS_IMETHODIMP
|
||||
nsDocument::GetXmlVersion(nsAString& aXmlVersion)
|
||||
{
|
||||
WarnOnceAbout(eXmlVersion);
|
||||
if (IsHTML()) {
|
||||
SetDOMStringToNull(aXmlVersion);
|
||||
return NS_OK;
|
||||
|
|
|
@ -846,6 +846,8 @@ nsGenericDOMDataNode::ReplaceWholeText(const nsAString& aContent,
|
|||
{
|
||||
*aResult = nsnull;
|
||||
|
||||
GetOwnerDoc()->WarnOnceAbout(nsIDocument::eReplaceWholeText);
|
||||
|
||||
// Handle parent-less nodes
|
||||
nsCOMPtr<nsIContent> parent = GetParent();
|
||||
if (!parent) {
|
||||
|
|
|
@ -334,6 +334,7 @@ protected:
|
|||
|
||||
nsresult GetIsElementContentWhitespace(PRBool *aReturn)
|
||||
{
|
||||
GetOwnerDoc()->WarnOnceAbout(nsIDocument::eIsElementContentWhitespace);
|
||||
*aReturn = TextIsOnlyWhitespace();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -8159,6 +8159,11 @@ nsGlobalWindow::GetGlobalStorage(nsIDOMStorageList ** aGlobalStorage)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aGlobalStorage);
|
||||
|
||||
nsIDocument* document = GetExtantDocument();
|
||||
if (document) {
|
||||
document->WarnOnceAbout(nsIDocument::GlobalStorage);
|
||||
}
|
||||
|
||||
if (!Preferences::GetBool(kStorageEnabled)) {
|
||||
*aGlobalStorage = nsnull;
|
||||
return NS_OK;
|
||||
|
|
|
@ -111,3 +111,10 @@ 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.
|
||||
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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче