Пример #1
0
 private void AppendValues(CssProperty[] aPropIDs, CssValue aValue)
 {
     foreach (CssProperty aPropId in aPropIDs)
     {
         if (aPropId != CssProperty.Unknown)
         {
             AppendValue(aPropId, aValue);
         }
     }
 }
Пример #2
0
 public BackgroundParseState(CssValue mColor, CssValueList mImage, CssValuePairList mRepeat, CssValueList mAttachment, CssValueList mClip, CssValueList mOrigin, CssValueList mPosition, CssValuePairList mSize)
 {
     this.mColor      = mColor;
     this.mImage      = mImage;
     this.mRepeat     = mRepeat;
     this.mAttachment = mAttachment;
     this.mClip       = mClip;
     this.mOrigin     = mOrigin;
     this.mPosition   = mPosition;
     this.mSize       = mSize;
 }
Пример #3
0
        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);
        }
Пример #4
0
        internal void SetValue(nsCSSFontDesc aDescID, CssValue value)
        {
            switch (aDescID)
            {
            case nsCSSFontDesc.Family: mFamily = value; break;

            case nsCSSFontDesc.Style: mStyle = value; break;

            case nsCSSFontDesc.Weight: mWeight = value; break;

            case nsCSSFontDesc.Stretch: mStretch = value; break;

            case nsCSSFontDesc.Src: mSrc = value; break;

            case nsCSSFontDesc.UnicodeRange: mUnicodeRange = value; break;

            case nsCSSFontDesc.FontFeatureSettings: mFontFeatureSettings = value; break;

            case nsCSSFontDesc.FontLanguageOverride: mFontLanguageOverride = value; break;

            default: throw new ArgumentOutOfRangeException("aDescID");
            }
        }
Пример #5
0
        public void SetSide(Side side, CssValue aValue)
        {
            switch (side)
            {
            case Side.Top:
                mTop = aValue;
                break;

            case Side.Right:
                mRight = aValue;
                break;

            case Side.Bottom:
                mBottom = aValue;
                break;

            case Side.Left:
                mLeft = aValue;
                break;

            default:
                throw new ArgumentOutOfRangeException("side");
            }
        }
Пример #6
0
 internal void SetBothValuesTo(CssValue aValue)
 {
     mXValue = mYValue = mZValue = aValue;
 }
Пример #7
0
 public void AddLonghandProperty(CssProperty aPropID, CssValue aValue)
 {
     mValues[(int)aPropID] = aValue;
     mPropertiesSet.AddProperty(aPropID);
 }
 public float ComputeNumber(CssValue aValue)
 {
     Debug.Assert(aValue.GetUnit() == CssUnit.Number, "unexpected unit");
     return(aValue.GetFloatValue());
 }
Пример #9
0
 internal void SetDesc(nsCSSFontDesc aDescId, CssValue aValue)
 {
     mDecl.SetValue(aDescId, aValue);
 }
Пример #10
0
 internal void SetRadiusY(CssValue aValue)
 {
     mRadialValues[1] = aValue;
 }
Пример #11
0
 internal void SetRadiusX(CssValue aValue)
 {
     mRadialValues[0] = aValue;
 }
Пример #12
0
 internal void SetRadialShape(CssValue aValue)
 {
     mRadialValues[0] = aValue;
 }
Пример #13
0
 internal void SetAllSidesTo(CssValue aValue)
 {
     mTop = mRight = mBottom = mLeft = aValue;
 }