Bug 1427512 - Part 7: Remove nsIDOMCSSFontFaceRule. r=xidorn
MozReview-Commit-ID: H8pl7KhmDaM
--- a/dom/interfaces/css/moz.build
+++ b/dom/interfaces/css/moz.build
@@ -4,17 +4,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files("**"):
BUG_COMPONENT = ("Core", "DOM: CSS Object Model")
XPIDL_SOURCES += [
'nsIDOMCounter.idl',
- 'nsIDOMCSSFontFaceRule.idl',
'nsIDOMCSSFontFeatureValuesRule.idl',
'nsIDOMCSSImportRule.idl',
'nsIDOMCSSKeyframeRule.idl',
'nsIDOMCSSKeyframesRule.idl',
'nsIDOMCSSPageRule.idl',
'nsIDOMCSSPrimitiveValue.idl',
'nsIDOMCSSRule.idl',
'nsIDOMCSSRuleList.idl',
deleted file mode 100644
--- a/dom/interfaces/css/nsIDOMCSSFontFaceRule.idl
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIDOMCSSStyleDeclaration;
-
-[scriptable, uuid(db971017-fe0c-4529-972c-8217f2fee217)]
-interface nsIDOMCSSFontFaceRule : nsISupports
-{
- readonly attribute nsIDOMCSSStyleDeclaration style;
-};
--- a/layout/style/nsCSSFontFaceRule.cpp
+++ b/layout/style/nsCSSFontFaceRule.cpp
@@ -321,19 +321,16 @@ nsCSSFontFaceStyleDecl::WrapObject(JSCon
/* virtual */ already_AddRefed<css::Rule>
nsCSSFontFaceRule::Clone() const
{
RefPtr<css::Rule> clone = new nsCSSFontFaceRule(*this);
return clone.forget();
}
-NS_IMPL_ADDREF_INHERITED(nsCSSFontFaceRule, mozilla::css::Rule)
-NS_IMPL_RELEASE_INHERITED(nsCSSFontFaceRule, mozilla::css::Rule)
-
NS_IMPL_CYCLE_COLLECTION_CLASS(nsCSSFontFaceRule)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(nsCSSFontFaceRule,
mozilla::css::Rule)
// Keep this in sync with IsCCLeaf.
// Trace the wrapper for our declaration. This just expands out
// NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER which we can't use
@@ -361,20 +358,17 @@ nsCSSFontFaceRule::IsCCLeaf() const
{
if (!Rule::IsCCLeaf()) {
return false;
}
return !mDecl.PreservingWrapper();
}
-// QueryInterface implementation for nsCSSFontFaceRule
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsCSSFontFaceRule)
- NS_INTERFACE_MAP_ENTRY(nsIDOMCSSFontFaceRule)
-NS_INTERFACE_MAP_END_INHERITING(Rule)
+NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(nsCSSFontFaceRule, mozilla::css::Rule)
#ifdef DEBUG
void
nsCSSFontFaceRule::List(FILE* out, int32_t aIndent) const
{
nsCString baseInd, descInd;
for (int32_t indent = aIndent; --indent >= 0; ) {
baseInd.AppendLiteral(" ");
@@ -425,23 +419,16 @@ nsCSSFontFaceRule::GetCssTextImpl(nsAStr
}
nsICSSDeclaration*
nsCSSFontFaceRule::Style()
{
return &mDecl;
}
-NS_IMETHODIMP
-nsCSSFontFaceRule::GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
-{
- NS_IF_ADDREF(*aStyle = &mDecl);
- return NS_OK;
-}
-
// Arguably these should forward to nsCSSFontFaceStyleDecl methods.
void
nsCSSFontFaceRule::SetDesc(nsCSSFontDesc aDescID, nsCSSValue const & aValue)
{
NS_PRECONDITION(aDescID > eCSSFontDesc_UNKNOWN &&
aDescID < eCSSFontDesc_COUNT,
"aDescID out of range in nsCSSFontFaceRule::SetDesc");
--- a/layout/style/nsCSSFontFaceRule.h
+++ b/layout/style/nsCSSFontFaceRule.h
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsCSSFontFaceRule_h
#define nsCSSFontFaceRule_h
#include "mozilla/css/Rule.h"
#include "nsCSSValue.h"
#include "nsICSSDeclaration.h"
-#include "nsIDOMCSSFontFaceRule.h"
namespace mozilla {
namespace dom {
class DocGroup;
} // namespace dom
struct CSSFontFaceDescriptors
@@ -70,18 +69,17 @@ protected:
private:
// NOT TO BE IMPLEMENTED
// This object cannot be allocated on its own, only as part of
// nsCSSFontFaceRule.
void* operator new(size_t size) CPP_THROW_NEW;
};
-class nsCSSFontFaceRule final : public mozilla::css::Rule,
- public nsIDOMCSSFontFaceRule
+class nsCSSFontFaceRule final : public mozilla::css::Rule
{
public:
nsCSSFontFaceRule(uint32_t aLineNumber, uint32_t aColumnNumber)
: mozilla::css::Rule(aLineNumber, aColumnNumber)
{
}
nsCSSFontFaceRule(const nsCSSFontFaceRule& aCopy)
@@ -97,19 +95,16 @@ public:
#ifdef DEBUG
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
#endif
virtual int32_t GetType() const override;
using Rule::GetType;
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
- // nsIDOMCSSFontFaceRule interface
- NS_DECL_NSIDOMCSSFONTFACERULE
-
void SetDesc(nsCSSFontDesc aDescID, nsCSSValue const & aValue);
void GetDesc(nsCSSFontDesc aDescID, nsCSSValue & aValue);
// WebIDL interface
uint16_t Type() const override;
void GetCssTextImpl(nsAString& aCssText) const override;
nsICSSDeclaration* Style();