Bug 1408301: Remove getPropertyCSSValue. r=bz

It's been removed for a while on Nightly without any known regressions. This
gives us a full beta cycle of telemetry and two nightly cycles without the API
before shipping.

This only removes the API, followup work will replace serialization by Servo's,
and remove the remaining DOM interfaces.

MozReview-Commit-ID: 2m1taYg5xEr
This commit is contained in:
Emilio Cobos Álvarez 2018-05-08 06:31:12 +02:00
parent 4753528362
commit 5aab8db970
15 changed files with 1 additions and 71 deletions

View File

@ -46,4 +46,3 @@ DEPRECATED_OPERATION(OrientationEvent)
DEPRECATED_OPERATION(ProximityEvent)
DEPRECATED_OPERATION(AmbientLightEvent)
DEPRECATED_OPERATION(IDBOpenDBOptions_StorageType)
DEPRECATED_OPERATION(GetPropertyCSSValue)

View File

@ -358,5 +358,3 @@ ProximityEventWarning=Use of the proximity sensor is deprecated.
AmbientLightEventWarning=Use of the ambient light sensor is deprecated.
# LOCALIZATION NOTE: Do not translate "storage", "indexedDB.open" and "navigator.storage.persist()".
IDBOpenDBOptions_StorageTypeWarning=The storage attribute in options passed to indexedDB.open is deprecated and will soon be removed. To get persistent storage, please use navigator.storage.persist() instead.
# LOCALIZATION NOTE: Do not translate "getPropertyCSSValue" and "getPropertyValue".
GetPropertyCSSValueWarning=Use of getPropertyCSSValue is deprecated, use getPropertyValue instead.

View File

@ -19,9 +19,6 @@ interface CSSStyleDeclaration {
[Throws]
DOMString getPropertyValue(DOMString property);
// Mozilla extension, sort of
[Throws, Pref="layout.css.getPropertyCSSValue.enabled"]
CSSValue? getPropertyCSSValue(DOMString property);
DOMString getPropertyPriority(DOMString property);
[CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");

View File

@ -641,10 +641,6 @@ CSSEditUtils::GetDefaultLengthUnit(nsAString& aLengthUnit)
}
}
// Unfortunately, CSSStyleDeclaration::GetPropertyCSSValue is not yet
// implemented... We need then a way to determine the number part and the unit
// from aString, aString being the result of a GetPropertyValue query...
// static
void
CSSEditUtils::ParseLength(const nsAString& aString,

View File

@ -273,9 +273,7 @@ public:
bool aSuppressTransaction);
/**
* Parses a "xxxx.xxxxxuuu" string where x is a digit and u an alpha char
* we need such a parser because
* nsIDOMCSSStyleDeclaration::GetPropertyCSSValue() is not implemented.
* Parses a "xxxx.xxxxxuuu" string where x is a digit and u an alpha char.
*
* @param aString [IN] Input string to parse.
* @param aValue [OUT] Numeric part.

View File

@ -183,10 +183,6 @@ ChangeStyleTransaction::DoTransaction()
nsAutoString returnString;
if (multiple) {
// Let's remove only the value we have to remove and not the others
// The two lines below are a workaround because
// nsDOMCSSDeclaration::GetPropertyCSSValue is not yet implemented (bug
// 62682)
RemoveValueFromListOfValues(values, NS_LITERAL_STRING("none"));
RemoveValueFromListOfValues(values, mValue);
if (values.IsEmpty()) {
@ -207,10 +203,6 @@ ChangeStyleTransaction::DoTransaction()
cssDecl->GetPropertyPriority(propertyNameString, priority);
if (multiple) {
// Let's add the value we have to add to the others
// The line below is a workaround because
// nsDOMCSSDeclaration::GetPropertyCSSValue is not yet implemented (bug
// 62682)
AddValueToMultivalueProperty(values, mValue);
} else {
values.Assign(mValue);

View File

@ -66,15 +66,6 @@ ServoFontFaceRuleDecl::GetPropertyValue(const nsAString& aPropName,
return NS_OK;
}
already_AddRefed<dom::CSSValue>
ServoFontFaceRuleDecl::GetPropertyCSSValue(const nsAString& aPropName,
ErrorResult& aRv)
{
// ??? nsDOMCSSDeclaration returns null/NS_OK, but that seems wrong.
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}
NS_IMETHODIMP
ServoFontFaceRuleDecl::RemoveProperty(const nsAString& aPropName,
nsAString& aResult)

View File

@ -21,10 +21,6 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMCSSSTYLEDECLARATION_HELPER
already_AddRefed<dom::CSSValue>
GetPropertyCSSValue(const nsAString& aProp, ErrorResult& aRv) final;
using nsICSSDeclaration::GetPropertyCSSValue;
nsINode* GetParentObject() final;
void IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aPropName) final;

View File

@ -987,16 +987,6 @@ nsComputedDOMStyle::ClearCurrentStyleSources()
mPresShell = nullptr;
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::GetPropertyCSSValue(const nsAString& aPropertyName,
ErrorResult& aRv)
{
if (nsCOMPtr<nsIDocument> document = do_QueryReferent(mDocumentWeak)) {
document->WarnOnceAbout(nsIDocument::eGetPropertyCSSValue);
}
return GetPropertyCSSValueWithoutWarning(aPropertyName, aRv);
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::GetPropertyCSSValueWithoutWarning(
const nsAString& aPropertyName,

View File

@ -74,11 +74,6 @@ public:
const nsAString& aValue,
nsIPrincipal* aSubjectPrincipal) override;
// Do NOT use this, it is deprecated, see bug 474655.
already_AddRefed<CSSValue>
GetPropertyCSSValue(const nsAString& aProp, mozilla::ErrorResult& aRv) final;
using nsICSSDeclaration::GetPropertyCSSValue;
void IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aPropName) final;
enum StyleType {

View File

@ -144,14 +144,6 @@ nsDOMCSSDeclaration::Length()
return 0;
}
already_AddRefed<dom::CSSValue>
nsDOMCSSDeclaration::GetPropertyCSSValue(const nsAString& aPropertyName, ErrorResult& aRv)
{
// We don't support CSSValue yet so we'll just return null...
return nullptr;
}
void
nsDOMCSSDeclaration::IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aPropName)
{

View File

@ -67,10 +67,6 @@ public:
mozilla::ErrorResult& aRv) override;
NS_IMETHOD GetPropertyValue(const nsAString & propertyName,
nsAString & _retval) override;
virtual already_AddRefed<mozilla::dom::CSSValue>
GetPropertyCSSValue(const nsAString & propertyName,
mozilla::ErrorResult& aRv) override;
using nsICSSDeclaration::GetPropertyCSSValue;
NS_IMETHOD RemoveProperty(const nsAString & propertyName,
nsAString & _retval) override;
void GetPropertyPriority(const nsAString & propertyName,

View File

@ -53,9 +53,6 @@ public:
NS_IMETHOD GetPropertyValue(const nsAString& aPropName,
nsAString& aValue) = 0;
virtual already_AddRefed<mozilla::dom::CSSValue>
GetPropertyCSSValue(const nsAString& aPropertyName,
mozilla::ErrorResult& aRv) = 0;
NS_IMETHOD RemoveProperty(const nsAString& aPropertyName,
nsAString& aReturn) = 0;
NS_IMETHOD SetProperty(const nsAString& aPropertyName,

View File

@ -1,7 +1,6 @@
[DEFAULT]
prefs =
dom.animations-api.core.enabled=true
layout.css.getPropertyCSSValue.enabled=true
support-files =
animation_utils.js
ccd-quirks.html

View File

@ -2827,12 +2827,6 @@ pref("layout.selection.caret_style", 0);
// pref to report CSS errors to the error console
pref("layout.css.report_errors", true);
#ifdef NIGHTLY_BUILD
pref("layout.css.getPropertyCSSValue.enabled", false);
#else
pref("layout.css.getPropertyCSSValue.enabled", true);
#endif
// Override DPI. A value of -1 means use the maximum of 96 and the system DPI.
// A value of 0 means use the system DPI. A positive value is used as the DPI.
// This sets the physical size of a device pixel and thus controls the