Bug 1449806: Remove MOZ_STYLO_* macros. r?xidorn
Yay :)
MozReview-Commit-ID: 1XKS5fSQkHs
--- a/layout/style/ServoUtils.h
+++ b/layout/style/ServoUtils.h
@@ -30,62 +30,9 @@ inline bool IsInServoTraversal()
// are generally unprepared to deal with non-Servo-but-also-non-main-thread
// callers, and are likely to take the main-thread codepath if this function
// returns false. So we assert against other non-main-thread callers here.
MOZ_ASSERT(sInServoTraversal || NS_IsMainThread());
return sInServoTraversal;
}
} // namespace mozilla
-#define MOZ_DECL_STYLO_CONVERT_METHODS_SERVO(servotype_) \
- inline servotype_* AsServo(); \
- inline const servotype_* AsServo() const; \
- inline servotype_* GetAsServo(); \
- inline const servotype_* GetAsServo() const;
-
-#define MOZ_DECL_STYLO_CONVERT_METHODS(geckotype_, servotype_) \
- MOZ_DECL_STYLO_CONVERT_METHODS_SERVO(servotype_)
-
-/**
- * Macro used in a base class of |geckotype_| and |servotype_|.
- * The class should define |StyleBackendType mType;| itself.
- */
-#define MOZ_DECL_STYLO_METHODS(geckotype_, servotype_) \
- MOZ_DECL_STYLO_CONVERT_METHODS(geckotype_, servotype_)
-
-#define MOZ_DEFINE_STYLO_METHODS_SERVO(type_, servotype_) \
- servotype_* type_::AsServo() { \
- return static_cast<servotype_*>(this); \
- } \
- const servotype_* type_::AsServo() const { \
- return static_cast<const servotype_*>(this); \
- } \
- servotype_* type_::GetAsServo() { \
- return AsServo(); \
- } \
- const servotype_* type_::GetAsServo() const { \
- return AsServo(); \
- }
-
-
-/**
- * Macro used in inline header of class |type_| with its Gecko and Servo
- * subclasses named |geckotype_| and |servotype_| correspondingly for
- * implementing the inline methods defined by MOZ_DECL_STYLO_METHODS.
- */
-#define MOZ_DEFINE_STYLO_METHODS(type_, geckotype_, servotype_) \
- MOZ_DEFINE_STYLO_METHODS_SERVO(type_, servotype_)
-
-#define MOZ_STYLO_THIS_TYPE mozilla::RemovePointer<decltype(this)>::Type
-#define MOZ_STYLO_SERVO_TYPE mozilla::RemovePointer<decltype(AsServo())>::Type
-
-/**
- * Macro used to forward a method call to the concrete method defined by
- * the Servo or Gecko implementation. The class of the method using it
- * should use MOZ_DECL_STYLO_METHODS to define basic stylo methods.
- */
-#define MOZ_STYLO_FORWARD_CONCRETE(method_, geckoargs_, servoargs_) \
- return AsServo()->method_ servoargs_;
-
-#define MOZ_STYLO_FORWARD(method_, args_) \
- MOZ_STYLO_FORWARD_CONCRETE(method_, args_, args_)
-
#endif // mozilla_ServoUtils_h