зеркало из https://github.com/mozilla/pjs.git
Bug 576044 (9/12): Add an AddLonghandProperty method to nsCSSExpandedDataBlock. r=dbaron a2.0=dbaron
This commit is contained in:
Родитель
c4b5ae902a
Коммит
453392bf0d
|
@ -491,6 +491,16 @@ nsCSSExpandedDataBlock::Compress(nsCSSCompressedDataBlock **aNormalBlock,
|
|||
*aImportantBlock = result_important.forget();
|
||||
}
|
||||
|
||||
void
|
||||
nsCSSExpandedDataBlock::AddLonghandProperty(nsCSSProperty aProperty,
|
||||
const nsCSSValue& aValue)
|
||||
{
|
||||
NS_ASSERTION(!nsCSSProps::IsShorthand(aProperty), "property out of range");
|
||||
nsCSSValue& storage = *static_cast<nsCSSValue*>(PropertyAt(aProperty));
|
||||
storage = aValue;
|
||||
SetPropertyBit(aProperty);
|
||||
}
|
||||
|
||||
void
|
||||
nsCSSExpandedDataBlock::Clear()
|
||||
{
|
||||
|
|
|
@ -189,6 +189,12 @@ public:
|
|||
void Compress(nsCSSCompressedDataBlock **aNormalBlock,
|
||||
nsCSSCompressedDataBlock **aImportantBlock);
|
||||
|
||||
/**
|
||||
* Copy a value into this expanded block. This does NOT destroy
|
||||
* the source value object. |aProperty| cannot be a shorthand.
|
||||
*/
|
||||
void AddLonghandProperty(nsCSSProperty aProperty, const nsCSSValue& aValue);
|
||||
|
||||
/**
|
||||
* Clear the state of this expanded block.
|
||||
*/
|
||||
|
|
|
@ -4993,12 +4993,7 @@ CSSParserImpl::ParseChoice(nsCSSValue aValues[],
|
|||
void
|
||||
CSSParserImpl::AppendValue(nsCSSProperty aPropID, const nsCSSValue& aValue)
|
||||
{
|
||||
NS_ASSERTION(0 <= aPropID && aPropID < eCSSProperty_COUNT_no_shorthands,
|
||||
"property out of range");
|
||||
nsCSSValue& storage =
|
||||
*static_cast<nsCSSValue*>(mTempData.PropertyAt(aPropID));
|
||||
storage = aValue;
|
||||
mTempData.SetPropertyBit(aPropID);
|
||||
mTempData.AddLonghandProperty(aPropID, aValue);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче