Bug 1339629 Part 12: Define UUID for ServoStyleSheet, which is needed for tests. r=heycam

MozReview-Commit-ID: GVUcZ7L0Ro5

--HG--
extra : rebase_source : e198e1d17e3304ff9c8f8b1c91ef0ab6f9720104
This commit is contained in:
Brad Werth 2017-05-18 16:36:44 -07:00
Родитель 47826ded85
Коммит 7e38654ee0
2 изменённых файлов: 18 добавлений и 0 удалений

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

@ -15,7 +15,9 @@
#include "mozilla/dom/CSSRuleList.h"
#include "mozilla/dom/MediaList.h"
#include "mozAutoDocUpdate.h"
#include "nsIDOMCSSStyleSheet.h"
using namespace mozilla::dom;
@ -96,6 +98,10 @@ ServoStyleSheet::~ServoStyleSheet()
// QueryInterface implementation for ServoStyleSheet
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ServoStyleSheet)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCSSStyleSheet)
if (aIID.Equals(NS_GET_IID(ServoStyleSheet)))
foundInterface = reinterpret_cast<nsISupports*>(this);
else
NS_INTERFACE_MAP_END_INHERITING(StyleSheet)
NS_IMPL_ADDREF_INHERITED(ServoStyleSheet, StyleSheet)

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

@ -55,6 +55,14 @@ struct ServoStyleSheetInner : public StyleSheetInfo
/**
* CSS style sheet object that is a wrapper for a Servo Stylesheet.
*/
// CID for the ServoStyleSheet class
// a6f31472-ab69-4beb-860f-c221431ead77
#define NS_SERVO_STYLE_SHEET_IMPL_CID \
{ 0xa6f31472, 0xab69, 0x4beb, \
{ 0x86, 0x0f, 0xc2, 0x21, 0x43, 0x1e, 0xad, 0x77 } }
class ServoStyleSheet : public StyleSheet
{
public:
@ -66,6 +74,8 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoStyleSheet, StyleSheet)
NS_DECLARE_STATIC_IID_ACCESSOR(NS_SERVO_STYLE_SHEET_IMPL_CID)
bool HasRules() const;
MOZ_MUST_USE nsresult ParseSheet(css::Loader* aLoader,
@ -147,6 +157,8 @@ private:
friend class StyleSheet;
};
NS_DEFINE_STATIC_IID_ACCESSOR(ServoStyleSheet, NS_SERVO_STYLE_SHEET_IMPL_CID)
} // namespace mozilla
#endif // mozilla_ServoStyleSheet_h