Bug 824592 part 2. Give nsStyledElement an IID. r=peterv

This commit is contained in:
Boris Zbarsky 2016-08-02 11:05:38 -07:00
Родитель edcfc0d83d
Коммит e427482452
2 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -25,6 +25,10 @@
using namespace mozilla; using namespace mozilla;
using namespace mozilla::dom; using namespace mozilla::dom;
NS_IMPL_QUERY_INTERFACE_INHERITED(nsStyledElement,
nsStyledElementBase,
nsStyledElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIContent methods // nsIContent methods

Просмотреть файл

@ -23,6 +23,11 @@ class Declaration;
} // namespace css } // namespace css
} // namespace mozilla } // namespace mozilla
// IID for nsStyledElement interface
#define NS_STYLED_ELEMENT_IID \
{ 0xacbd9ea6, 0x15aa, 0x4f37, \
{ 0x8c, 0xe0, 0x35, 0x1e, 0xd7, 0x21, 0xca, 0xe9 } }
typedef mozilla::dom::Element nsStyledElementBase; typedef mozilla::dom::Element nsStyledElementBase;
class nsStyledElement : public nsStyledElementBase class nsStyledElement : public nsStyledElementBase
@ -35,6 +40,11 @@ protected:
{} {}
public: public:
// We don't want to implement AddRef/Release because that would add an extra
// function call for those on pretty much all elements. But we do need QI, so
// we can QI to nsStyledElement.
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override;
// Element interface methods // Element interface methods
virtual mozilla::css::Declaration* GetInlineStyleDeclaration() override; virtual mozilla::css::Declaration* GetInlineStyleDeclaration() override;
virtual nsresult SetInlineStyleDeclaration(mozilla::css::Declaration* aDeclaration, virtual nsresult SetInlineStyleDeclaration(mozilla::css::Declaration* aDeclaration,
@ -43,6 +53,8 @@ public:
nsICSSDeclaration* Style(); nsICSSDeclaration* Style();
NS_DECLARE_STATIC_IID_ACCESSOR(NS_STYLED_ELEMENT_IID)
protected: protected:
/** /**
@ -70,4 +82,5 @@ protected:
nsresult ReparseStyleAttribute(bool aForceInDataDoc); nsresult ReparseStyleAttribute(bool aForceInDataDoc);
}; };
NS_DEFINE_STATIC_IID_ACCESSOR(nsStyledElement, NS_STYLED_ELEMENT_IID)
#endif // __NS_STYLEDELEMENT_H_ #endif // __NS_STYLEDELEMENT_H_