Bug 1298588 part 15, gecko piece. Rip out the initial() methods on style structs in stylo. r=bholley

This commit is contained in:
Boris Zbarsky 2017-01-04 14:52:27 -05:00
parent 85a6ca2630
commit e95482db38
4 changed files with 14 additions and 7 deletions

View File

@ -1074,12 +1074,6 @@ NS_IMPL_THREADSAFE_FFI_REFCOUNTING(nsCSSValueSharedList, CSSValueSharedList);
#define STYLE_STRUCT(name, checkdata_cb) \
\
void \
Gecko_Construct_nsStyle##name(nsStyle##name* ptr) \
{ \
new (ptr) nsStyle##name(StyleStructContext::ServoContext()); \
} \
\
void \
Gecko_Construct_Default_nsStyle##name(nsStyle##name* ptr, \
const nsPresContext* pres_context) \
{ \
@ -1099,6 +1093,12 @@ Gecko_Destroy_nsStyle##name(nsStyle##name* ptr) \
ptr->~nsStyle##name(); \
}
void
Gecko_Construct_nsStyleVariables(nsStyleVariables* ptr)
{
new (ptr) nsStyleVariables();
}
#include "nsStyleStructList.h"
#undef STYLE_STRUCT

View File

@ -292,7 +292,6 @@ NS_DECL_THREADSAFE_FFI_REFCOUNTING(nsCSSValueSharedList, CSSValueSharedList);
// Style-struct management.
#define STYLE_STRUCT(name, checkdata_cb) \
void Gecko_Construct_nsStyle##name(nsStyle##name* ptr); \
void Gecko_Construct_Default_nsStyle##name( \
nsStyle##name* ptr, \
RawGeckoPresContextBorrowed pres_context); \
@ -302,6 +301,8 @@ NS_DECL_THREADSAFE_FFI_REFCOUNTING(nsCSSValueSharedList, CSSValueSharedList);
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
void Gecko_Construct_nsStyleVariables(nsStyleVariables* ptr);
#define SERVO_BINDING_FUNC(name_, return_, ...) return_ name_(__VA_ARGS__);
#include "mozilla/ServoBindingList.h"
#undef SERVO_BINDING_FUNC

View File

@ -4134,6 +4134,11 @@ nsStyleUIReset::CalcDifference(const nsStyleUIReset& aNewData) const
// nsStyleVariables
//
nsStyleVariables::nsStyleVariables()
{
MOZ_COUNT_CTOR(nsStyleVariables);
}
nsStyleVariables::nsStyleVariables(StyleStructContext aContext)
{
MOZ_COUNT_CTOR(nsStyleVariables);

View File

@ -3825,6 +3825,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVGReset
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleVariables
{
nsStyleVariables();
explicit nsStyleVariables(StyleStructContext aContext);
nsStyleVariables(const nsStyleVariables& aSource);
~nsStyleVariables();