mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1428610 part 6. Give nsICSSDeclaration::GetPropertyPriority a nicer signature. r=emilio
MozReview-Commit-ID: 4H2zADwdo5L
This commit is contained in:
parent
4278814e5c
commit
c49370b74a
@ -205,13 +205,12 @@ nsCSSFontFaceStyleDecl::RemoveProperty(const nsAString & propertyName,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsCSSFontFaceStyleDecl::GetPropertyPriority(const nsAString & propertyName,
|
||||
nsAString & aResult)
|
||||
{
|
||||
// font descriptors do not have priorities at present
|
||||
aResult.Truncate();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -1189,13 +1189,11 @@ nsComputedDOMStyle::RemoveProperty(const nsAString& aPropertyName,
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsComputedDOMStyle::GetPropertyPriority(const nsAString& aPropertyName,
|
||||
nsAString& aReturn)
|
||||
{
|
||||
aReturn.Truncate();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -201,18 +201,16 @@ nsDOMCSSDeclaration::GetPropertyValue(const nsAString& aPropertyName,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsDOMCSSDeclaration::GetPropertyPriority(const nsAString& aPropertyName,
|
||||
nsAString& aReturn)
|
||||
nsAString& aPriority)
|
||||
{
|
||||
DeclarationBlock* decl = GetCSSDeclaration(eOperation_Read);
|
||||
|
||||
aReturn.Truncate();
|
||||
aPriority.Truncate();
|
||||
if (decl && decl->GetPropertyIsImportant(aPropertyName)) {
|
||||
aReturn.AssignLiteral("important");
|
||||
aPriority.AssignLiteral("important");
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -75,8 +75,8 @@ public:
|
||||
using nsICSSDeclaration::GetPropertyCSSValue;
|
||||
NS_IMETHOD RemoveProperty(const nsAString & propertyName,
|
||||
nsAString & _retval) override;
|
||||
NS_IMETHOD GetPropertyPriority(const nsAString & propertyName,
|
||||
nsAString & _retval) override;
|
||||
void GetPropertyPriority(const nsAString & propertyName,
|
||||
nsAString & aPriority) override;
|
||||
NS_IMETHOD SetProperty(const nsAString& propertyName,
|
||||
const nsAString& value,
|
||||
const nsAString& priority,
|
||||
|
@ -58,8 +58,6 @@ public:
|
||||
mozilla::ErrorResult& aRv) = 0;
|
||||
NS_IMETHOD RemoveProperty(const nsAString& aPropertyName,
|
||||
nsAString& aReturn) = 0;
|
||||
NS_IMETHOD GetPropertyPriority(const nsAString& aPropertyName,
|
||||
nsAString& aReturn) = 0;
|
||||
NS_IMETHOD SetProperty(const nsAString& aPropertyName,
|
||||
const nsAString& aValue,
|
||||
const nsAString& aPriority,
|
||||
@ -95,9 +93,8 @@ public:
|
||||
mozilla::ErrorResult& rv) {
|
||||
rv = GetPropertyValue(aPropName, aValue);
|
||||
}
|
||||
void GetPropertyPriority(const nsAString& aPropName, nsString& aPriority) {
|
||||
GetPropertyPriority(aPropName, static_cast<nsAString&>(aPriority));
|
||||
}
|
||||
virtual void GetPropertyPriority(const nsAString& aPropName,
|
||||
nsAString& aPriority) = 0;
|
||||
void SetProperty(const nsAString& aPropName, const nsAString& aValue,
|
||||
const nsAString& aPriority, nsIPrincipal* aSubjectPrincipal,
|
||||
mozilla::ErrorResult& rv) {
|
||||
@ -119,7 +116,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSDeclaration, NS_ICSSDECLARATION_IID)
|
||||
mozilla::ErrorResult& aRv) override; \
|
||||
NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval) override; \
|
||||
NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval) override; \
|
||||
NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval) override; \
|
||||
void GetPropertyPriority(const nsAString & propertyName, \
|
||||
nsAString & aPriority) override; \
|
||||
NS_IMETHOD SetProperty(const nsAString& propertyName, \
|
||||
const nsAString& value, \
|
||||
const nsAString& priority, \
|
||||
|
Loading…
Reference in New Issue
Block a user