public bool TransferFromBlock(nsCSSExpandedDataBlock aFromBlock, CssProperty aPropID, bool aIsImportant, bool aOverrideImportant, bool aMustCallValueAppended, CssDeclaration aDeclaration) { if (!nsCSSProps.IsShorthand(aPropID)) return DoTransferFromBlock(aFromBlock, aPropID, aIsImportant, aOverrideImportant, aMustCallValueAppended, aDeclaration); bool changed = false; foreach (CssProperty p in nsCSSProps.SubpropertyEntryFor(aPropID, true)) changed |= DoTransferFromBlock(aFromBlock, p, aIsImportant, aOverrideImportant, aMustCallValueAppended, aDeclaration); return changed; }
public bool TryReplaceValue(CssProperty aProperty, nsCSSExpandedDataBlock aFromBlock, ref bool aChanged) { CssValue newValue = aFromBlock.mValues[(int)aProperty]; int oldValue = IndexFor(aProperty); if (oldValue == -1) { aChanged = false; return false; } aChanged = MoveValue(ref newValue, ref mData[oldValue].mValue); aFromBlock.mPropertiesSet.RemoveProperty(aProperty); return true; }
public bool TransferFromBlock(nsCSSExpandedDataBlock aFromBlock, CssProperty aPropID, bool aIsImportant, bool aOverrideImportant, bool aMustCallValueAppended, CssDeclaration aDeclaration) { if (!nsCSSProps.IsShorthand(aPropID)) { return(DoTransferFromBlock(aFromBlock, aPropID, aIsImportant, aOverrideImportant, aMustCallValueAppended, aDeclaration)); } bool changed = false; foreach (CssProperty p in nsCSSProps.SubpropertyEntryFor(aPropID, true)) { changed |= DoTransferFromBlock(aFromBlock, p, aIsImportant, aOverrideImportant, aMustCallValueAppended, aDeclaration); } return(changed); }
public bool TryReplaceValue(CssProperty aProperty, nsCSSExpandedDataBlock aFromBlock, ref bool aChanged) { CssValue newValue = aFromBlock.mValues[(int)aProperty]; int oldValue = IndexFor(aProperty); if (oldValue == -1) { aChanged = false; return(false); } aChanged = MoveValue(ref newValue, ref mData[oldValue].mValue); aFromBlock.mPropertiesSet.RemoveProperty(aProperty); return(true); }
internal bool TryReplaceValue(CssProperty aProperty, bool aIsImportant, nsCSSExpandedDataBlock aFromBlock, ref bool aChanged) { AssertMutable(); Debug.Assert(mData != null, "called while expanded"); if (nsCSSProps.IsShorthand(aProperty)) { aChanged = false; return(false); } nsCSSCompressedDataBlock block = aIsImportant ? mImportantData : mData; if (block == null) { aChanged = false; return(false); } return(block.TryReplaceValue(aProperty, aFromBlock, ref aChanged)); }
private bool DoTransferFromBlock(nsCSSExpandedDataBlock aFromBlock, CssProperty aPropID, bool aIsImportant, bool aOverrideImportant, bool aMustCallValueAppended, CssDeclaration aDeclaration) { bool changed = false; if (aIsImportant) { if (!mPropertiesImportant.HasProperty(aPropID)) { changed = true; } mPropertiesImportant.AddProperty(aPropID); } else { if (mPropertiesImportant.HasProperty(aPropID)) { if (!aOverrideImportant) { aFromBlock.ClearLonghandProperty(aPropID); return(false); } changed = true; mPropertiesImportant.RemoveProperty(aPropID); } } if (aMustCallValueAppended || !mPropertiesSet.HasProperty(aPropID)) { aDeclaration.ValueAppended(aPropID); } mPropertiesSet.AddProperty(aPropID); aFromBlock.mPropertiesSet.RemoveProperty(aPropID); changed |= MoveValue(ref aFromBlock.mValues[(int)aPropID], ref mValues[(int)aPropID]); return(changed); }
internal void ExpandTo(nsCSSExpandedDataBlock aExpandedData) { AssertMutable(); aExpandedData.AssertInitialState(); aExpandedData.Expand(mData, mImportantData); }
internal void CompressFrom(nsCSSExpandedDataBlock aExpandedData) { aExpandedData.Compress(out mData, out mImportantData); aExpandedData.AssertInitialState(); }
internal void ExpandTo(nsCSSExpandedDataBlock aExpandedData) { AssertMutable(); aExpandedData.AssertInitialState(); aExpandedData.Expand(mData, mImportantData); }
internal void CompressFrom(nsCSSExpandedDataBlock aExpandedData) { aExpandedData.Compress(out mData, out mImportantData); aExpandedData.AssertInitialState(); }
internal bool TryReplaceValue(CssProperty aProperty, bool aIsImportant, nsCSSExpandedDataBlock aFromBlock, ref bool aChanged) { AssertMutable(); Debug.Assert(mData != null, "called while expanded"); if (nsCSSProps.IsShorthand(aProperty)) { aChanged = false; return false; } nsCSSCompressedDataBlock block = aIsImportant ? mImportantData : mData; if (block == null) { aChanged = false; return false; } return block.TryReplaceValue(aProperty, aFromBlock, ref aChanged); }
private bool DoTransferFromBlock(nsCSSExpandedDataBlock aFromBlock, CssProperty aPropID, bool aIsImportant, bool aOverrideImportant, bool aMustCallValueAppended, CssDeclaration aDeclaration) { bool changed = false; if (aIsImportant) { if (!mPropertiesImportant.HasProperty(aPropID)) changed = true; mPropertiesImportant.AddProperty(aPropID); } else { if (mPropertiesImportant.HasProperty(aPropID)) { if (!aOverrideImportant) { aFromBlock.ClearLonghandProperty(aPropID); return false; } changed = true; mPropertiesImportant.RemoveProperty(aPropID); } } if (aMustCallValueAppended || !mPropertiesSet.HasProperty(aPropID)) { aDeclaration.ValueAppended(aPropID); } mPropertiesSet.AddProperty(aPropID); aFromBlock.mPropertiesSet.RemoveProperty(aPropID); changed |= MoveValue(ref aFromBlock.mValues[(int)aPropID], ref mValues[(int)aPropID]); return changed; }