mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1161325 - Make nsStyleVariables copy constructor behave more traditionally. r=dbaron
This commit is contained in:
parent
91197585f6
commit
75f1ec8916
@ -2611,7 +2611,12 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex
|
||||
parentdata_ = maybeFakeParentData.ptr(); \
|
||||
} \
|
||||
} \
|
||||
if (aStartStruct) \
|
||||
if (eStyleStruct_##type_ == eStyleStruct_Variables) \
|
||||
/* no need to copy construct an nsStyleVariables, as we will copy */ \
|
||||
/* inherited variables (and set canStoreInRuleTree to false) in */ \
|
||||
/* ComputeVariablesData */ \
|
||||
data_ = new (mPresContext) nsStyle##type_ ctorargs_; \
|
||||
else if (aStartStruct) \
|
||||
/* We only need to compute the delta between this computed data and */ \
|
||||
/* our computed data. */ \
|
||||
data_ = new (mPresContext) \
|
||||
|
@ -3643,6 +3643,7 @@ nsStyleVariables::nsStyleVariables()
|
||||
nsStyleVariables::nsStyleVariables(const nsStyleVariables& aSource)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsStyleVariables);
|
||||
mVariables = aSource.mVariables;
|
||||
}
|
||||
|
||||
nsStyleVariables::~nsStyleVariables(void)
|
||||
|
Loading…
Reference in New Issue
Block a user