Backed out changeset eec3076f3bab (Bug 474655, Warn when nsIDOMCSSStyleDeclaration::GetPropertyCSSValue is called) because we trigger the warning too much ourselves (Bug 475311)

This commit is contained in:
L. David Baron 2009-02-04 13:22:45 -08:00
parent ec7dae4083
commit 1f32659f3e
7 changed files with 1 additions and 53 deletions

View File

@ -37,8 +37,6 @@
MimeNotCss=The stylesheet %1$S was not loaded because its MIME type, "%2$S", is not "text/css".
MimeNotCssWarn=The stylesheet %1$S was loaded as CSS even though its MIME type, "%2$S", is not "text/css".
UseOfGetPropertyCSSValueWarning=Use of getPropertyCSSValue() is deprecated. To upgrade your code, use getPropertyValue() instead.
PEUnexpEOF2=Unexpected end of file while searching for %1$S.
PEParseRuleWSOnly=Whitespace-only string given to be parsed as rule.
PEDeclDropped=Declaration dropped.

View File

@ -1670,14 +1670,6 @@ NS_IMETHODIMP
nsCSSFontFaceStyleDecl::GetPropertyCSSValue(const nsAString & propertyName,
nsIDOMCSSValue **aResult NS_OUTPARAM)
{
nsCOMPtr<nsIURI> sheetURI;
nsIStyleSheet *sheet = ContainingRule()->mSheet;
if (sheet) {
sheet->GetSheetURI(getter_AddRefs(sheetURI));
}
nsStyleUtil::ReportUseOfDeprecatedMethod(sheetURI,
"UseOfGetPropertyCSSValueWarning");
// ??? nsDOMCSSDeclaration returns null/NS_OK, but that seems wrong.
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@ -296,7 +296,7 @@ nsComputedDOMStyle::GetPropertyValue(const nsAString& aPropertyName,
aReturn.Truncate();
nsresult rv = GetPropertyCSSValueInternal(aPropertyName, getter_AddRefs(val));
nsresult rv = GetPropertyCSSValue(aPropertyName, getter_AddRefs(val));
NS_ENSURE_SUCCESS(rv, rv);
if (val) {
@ -310,18 +310,6 @@ nsComputedDOMStyle::GetPropertyValue(const nsAString& aPropertyName,
NS_IMETHODIMP
nsComputedDOMStyle::GetPropertyCSSValue(const nsAString& aPropertyName,
nsIDOMCSSValue** aReturn)
{
nsCOMPtr<nsIDocument> document = do_QueryReferent(mDocumentWeak);
nsStyleUtil::
ReportUseOfDeprecatedMethod(document ? document->GetDocumentURI() : nsnull,
"UseOfGetPropertyCSSValueWarning");
return GetPropertyCSSValueInternal(aPropertyName, aReturn);
}
nsresult
nsComputedDOMStyle::GetPropertyCSSValueInternal(const nsAString& aPropertyName,
nsIDOMCSSValue** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;

View File

@ -76,8 +76,6 @@ public:
static void Shutdown();
private:
nsresult GetPropertyCSSValueInternal(const nsAString& aPropertyName,
nsIDOMCSSValue** aReturn);
void FlushPendingReflows();
#define STYLE_STRUCT(name_, checkdata_cb_, ctor_args_) \

View File

@ -51,7 +51,6 @@
#include "nsIPrincipal.h"
#include "nsContentUtils.h"
#include "nsStyleUtil.h"
nsDOMCSSDeclaration::nsDOMCSSDeclaration()
@ -147,21 +146,6 @@ nsDOMCSSDeclaration::GetPropertyCSSValue(const nsAString& aPropertyName,
{
NS_ENSURE_ARG_POINTER(aReturn);
nsCOMPtr<nsICSSLoader> cssLoader;
nsCOMPtr<nsICSSParser> cssParser;
nsCOMPtr<nsIURI> baseURI, sheetURI;
nsCOMPtr<nsIPrincipal> sheetPrincipal;
nsresult result = GetCSSParsingEnvironment(getter_AddRefs(sheetURI),
getter_AddRefs(baseURI),
getter_AddRefs(sheetPrincipal),
getter_AddRefs(cssLoader),
getter_AddRefs(cssParser));
if (NS_SUCCEEDED(result)) {
nsStyleUtil::ReportUseOfDeprecatedMethod(sheetURI,
"UseOfGetPropertyCSSValueWarning");
}
// We don't support CSSValue yet so we'll just return null...
*aReturn = nsnull;

View File

@ -51,7 +51,6 @@
#include "nsReadableUtils.h"
#include "nsContentUtils.h"
#include "nsTextFormatter.h"
#include "nsIScriptError.h"
// XXX This is here because nsCachedStyleData is accessed outside of
// the content module; e.g., by nsCSSFrameConstructor.
@ -607,12 +606,3 @@ nsStyleUtil::IsSignificantChild(nsIContent* aChild, PRBool aTextIsSignificant,
!aChild->TextIsOnlyWhitespace());
}
/* static */ void
nsStyleUtil::ReportUseOfDeprecatedMethod(nsIURI* aURI, const char* aWarning)
{
nsContentUtils::ReportToConsole(nsContentUtils::eCSS_PROPERTIES,
aWarning, nsnull, 0, aURI,
EmptyString(), 0, 0,
nsIScriptError::warningFlag,
"CSS Object Model");
}

View File

@ -109,8 +109,6 @@ public:
static PRBool IsSignificantChild(nsIContent* aChild,
PRBool aTextIsSignificant,
PRBool aWhitespaceIsSignificant);
static void ReportUseOfDeprecatedMethod(nsIURI* aURI, const char* aWarning);
};