Home | History | Annotate | Download | only in css

Lines Matching defs:primitiveValue

154 if (primitiveValue) \
155 m_style->set##Prop(*primitiveValue);
159 if (primitiveValue) \
160 m_style->set##Prop(*primitiveValue);
3308 static Length convertToLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, bool toFloat, double multiplier = 1, bool *ok = 0)
3314 if (!primitiveValue) {
3318 int type = primitiveValue->primitiveType();
3325 l = Length(primitiveValue->computeLengthDouble(style, rootStyle, multiplier), Fixed);
3327 l = Length(primitiveValue->computeLengthIntForLength(style, rootStyle, multiplier), Fixed);
3330 l = Length(primitiveValue->getDoubleValue(), Percent);
3332 l = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
3339 static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1, bool *ok = 0)
3341 return convertToLength(primitiveValue, style, rootStyle, false, multiplier, ok);
3344 static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1, bool *ok = 0)
3346 return convertToLength(primitiveValue, style, rootStyle, true, multiplier, ok);
3553 CSSPrimitiveValue* primitiveValue = 0;
3555 primitiveValue = static_cast<CSSPrimitiveValue*>(value);
3594 if (!primitiveValue)
3596 switch (primitiveValue->getIdent()) {
3609 if (primitiveValue) {
3610 if (primitiveValue->getIdent() == CSSValueAuto)
3613 m_style->setOutlineStyle(*primitiveValue);
3625 if (primitiveValue) {
3626 if (primitiveValue->getIdent() == CSSValueWapMarquee) {
3639 m_style->setDisplay(*primitiveValue);
3641 m_style->setDisplay(*primitiveValue);
3659 if (!primitiveValue)
3661 switch (primitiveValue->getIdent()) {
3687 if (!primitiveValue)
3689 int id = primitiveValue->getIdent();
3710 if (!primitiveValue)
3712 if (primitiveValue->getIdent()) {
3713 switch (primitiveValue->getIdent()) {
3774 if (!primitiveValue)
3776 EPageBreak pageBreak = *primitiveValue;
3788 ETableLayout l = *primitiveValue;
3821 if (!primitiveValue)
3823 short spacing = primitiveValue->computeLengthShort(style(), m_rootElementStyle, zoomFactor);
3829 if (!primitiveValue)
3831 short spacing = primitiveValue->computeLengthShort(style(), m_rootElementStyle, zoomFactor);
3854 primitiveValue = static_cast<CSSPrimitiveValue*>(item);
3855 int type = primitiveValue->primitiveType();
3857 if (primitiveValue->isCursorImageValue()) {
3858 CSSCursorImageValue* image = static_cast<CSSCursorImageValue*>(primitiveValue);
3864 m_style->setCursor(*primitiveValue);
3866 } else if (primitiveValue) {
3867 int type = primitiveValue->primitiveType();
3868 if (type == CSSPrimitiveValue::CSS_IDENT && m_style->cursor() != ECursor(*primitiveValue))
3869 m_style->setCursor(*primitiveValue);
3908 if (!primitiveValue)
3911 switch (primitiveValue->getIdent()) {
3922 width = primitiveValue->computeLengthShort(style(), m_rootElementStyle, zoomFactor);
3961 if (!primitiveValue)
3963 int id = primitiveValue->getIdent();
4004 if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal) {
4007 if (!primitiveValue)
4009 width = primitiveValue->computeLengthInt(style(), m_rootElementStyle, useSVGZoomRules(m_element) ? 1.0f : zoomFactor);
4044 if (!primitiveValue->getIdent())
4048 if (primitiveValue->getIdent() == CSSValueAuto) {
4052 r = *primitiveValue;
4061 if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) {
4077 if (primitiveValue && primitiveValue->getIdent() == CSSValueIntrinsic) {
4081 else if (primitiveValue && primitiveValue->getIdent() == CSSValueMinIntrinsic) {
4086 if (id != CSSPropertyMaxWidth && primitiveValue && primitiveValue->getIdent() == CSSValueAuto)
4134 if (primitiveValue && !apply) {
4135 int type = primitiveValue->primitiveType();
4138 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed,
4139 primitiveValue->isQuirkValue());
4141 l = Length(primitiveValue->getDoubleValue(), Percent);
4203 if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) {
4209 if (primitiveValue && primitiveValue->getIdent() == CSSValueIntrinsic) {
4212 } else if (primitiveValue && primitiveValue->getIdent() == CSSValueMinIntrinsic) {
4215 } else if (id != CSSPropertyMaxHeight && primitiveValue && primitiveValue->getIdent() == CSSValueAuto)
4230 if (primitiveValue && !apply) {
4231 unsigned short type = primitiveValue->primitiveType();
4233 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
4235 l = Length(primitiveValue->getDoubleValue(), Percent);
4256 if (!primitiveValue)
4258 if (primitiveValue->getIdent()) {
4261 switch (primitiveValue->getIdent()) {
4286 int type = primitiveValue->primitiveType();
4289 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
4291 l = Length(primitiveValue->getDoubleValue(), Percent);
4318 } else if (primitiveValue->getIdent()) {
4320 switch (primitiveValue->getIdent()) {
4329 size = fontSizeForKeyword(m_checker.m_document, primitiveValue->getIdent(), fontDescription.useFixedDefaultSize());
4330 fontDescription.setKeywordSize(primitiveValue->getIdent() - CSSValueXxSmall + 1);
4343 (primitiveValue->getIdent() == CSSValueLarger ||
4344 primitiveValue->getIdent() == CSSValueSmaller));
4346 int type = primitiveValue->primitiveType();
4353 size = primitiveValue->computeLengthFloat(m_parentStyle, m_rootElementStyle, true);
4355 size = (primitiveValue->getFloatValue() * oldSize) / 100.0f;
4376 } else if (isInitial || primitiveValue->getIdent() == CSSValueAuto) {
4382 m_style->setZIndex(clampToInteger(primitiveValue->getDoubleValue()));
4388 if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
4390 m_style->setWidows(primitiveValue->getIntValue());
4397 if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
4399 m_style->setOrphans(primitiveValue->getIntValue());
4407 if (!primitiveValue)
4410 int type = primitiveValue->primitiveType();
4411 if (primitiveValue->getIdent() == CSSValueNormal)
4419 lineHeight = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, multiplier), Fixed);
4421 lineHeight = Length((m_style->fontSize() * primitiveValue->getIntValue()) / 100, Fixed);
4423 lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
4434 if (!primitiveValue)
4436 if (primitiveValue->getIdent() == CSSValueWebkitMatchParent) {
4445 m_style->setTextAlign(*primitiveValue);
4470 } else if (!primitiveValue) {
4472 } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT) {
4473 Rect* rect = primitiveValue->getRectValue();
4480 } else if (primitiveValue->getIdent() != CSSValueAuto) {
4601 primitiveValue = static_cast<CSSPrimitiveValue*>(item);
4602 ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_STRING);
4603 quotes[i] = primitiveValue->getStringValue();
4606 } else if (primitiveValue) {
4607 ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT);
4608 if (primitiveValue->getIdent() == CSSValueNone)
4727 if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) {
4739 primitiveValue = static_cast<CSSPrimitiveValue*>(item);
4740 switch (primitiveValue->getIdent()) {
4771 int type = primitiveValue->primitiveType();
4772 if (primitiveValue->getIdent() == CSSValueNormal)
4774 else if (primitiveValue->getIdent() == CSSValueReset) {
4777 } else if (primitiveValue->getIdent() == CSSValueDocument) {
4782 if (primitiveValue->getFloatValue())
4783 m_style->setZoom(primitiveValue->getFloatValue() / 100.0f);
4785 if (primitiveValue->getFloatValue())
4786 m_style->setZoom(primitiveValue->getFloatValue());
4943 } else if (primitiveValue) {
4948 RenderTheme::defaultTheme()->systemFont(primitiveValue->getIdent(), fontDescription);
5011 if (!primitiveValue)
5013 m_style->setAppearance(*primitiveValue);
5073 if (!primitiveValue)
5076 Pair* pair = primitiveValue->getPairValue();
5122 m_style->setOutlineOffset(primitiveValue->computeLengthInt(style(), m_rootElementStyle, zoomFactor));
5131 if (!primitiveValue)
5133 fontDescription.setTextRenderingMode(*primitiveValue);
5147 if (isInitial || primitiveValue) // initial | none
5178 if (primitiveValue) {
5205 if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
5208 m_style->setOpacity(min(1.0f, max(0.0f, primitiveValue->getFloatValue())));
5213 if (!primitiveValue)
5215 EBoxAlignment boxAlignment = *primitiveValue;
5226 if (primitiveValue)
5227 m_style->setBackfaceVisibility((primitiveValue->getIdent() == CSSValueVisible) ? BackfaceVisibilityVisible : BackfaceVisibilityHidden);
5241 if (!primitiveValue)
5243 EBoxAlignment boxPack = *primitiveValue;
5250 if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
5252 m_style->setBoxFlex(primitiveValue->getFloatValue());
5256 if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
5258 m_style->setBoxFlexGroup((unsigned int)(primitiveValue->getDoubleValue()));
5262 if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
5264 m_style->setBoxOrdinalGroup((unsigned int)(primitiveValue->getDoubleValue()));
5268 if (!primitiveValue)
5270 if (primitiveValue->getIdent() == CSSValueContentBox)
5282 } else if (isInitial || primitiveValue->getIdent() == CSSValueAuto) {
5286 m_style->setColumnCount(static_cast<unsigned short>(primitiveValue->getDoubleValue()));
5296 } else if (isInitial || primitiveValue->getIdent() == CSSValueNormal) {
5300 m_style->setColumnGap(primitiveValue->computeLengthFloat(style(), m_rootElementStyle, zoomFactor));
5305 m_style->setColumnSpan(primitiveValue->getIdent() == CSSValueAll);
5315 } else if (isInitial || primitiveValue->getIdent() == CSSValueAuto) {
5319 m_style->setColumnWidth(primitiveValue->computeLengthFloat(style(), m_rootElementStyle, zoomFactor));
5333 EPageBreak pb = *primitiveValue;
5372 if (!primitiveValue)
5374 if (primitiveValue->getIdent() == CSSValueInfinite)
5376 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER)
5377 m_style->setMarqueeLoopCount(primitiveValue->getIntValue());
5385 if (!primitiveValue)
5387 if (primitiveValue->getIdent()) {
5388 switch (primitiveValue->getIdent()) {
5400 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_S)
5401 m_style->setMarqueeSpeed(1000 * primitiveValue->getIntValue());
5402 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_MS)
5403 m_style->setMarqueeSpeed(primitiveValue->getIntValue());
5404 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) // For scrollamount support.
5405 m_style->setMarqueeSpeed(primitiveValue->getIntValue());
5410 if (!primitiveValue)
5412 if (primitiveValue->getIdent()) {
5413 switch (primitiveValue->getIdent()) {
5427 Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle, 1, &ok);
5442 if (primitiveValue && primitiveValue->getIdent()) {
5443 switch (primitiveValue->getIdent()) {
5451 m_style->setMarqueeDirection(*primitiveValue);
5474 if (!primitiveValue || !primitiveValue->getIdent())
5476 m_style->setTextOverflow(primitiveValue->getIdent() == CSSValueEllipsis);
5501 if (!primitiveValue)
5503 int type = primitiveValue->primitiveType();
5505 m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), LineClampLineCount));
5507 m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_PERCENTAGE), LineClampPercentage));
5512 if (primitiveValue->getIdent() == CSSValueNone)
5515 m_style->setHighlight(primitiveValue->getStringValue());
5520 m_style->setHyphens(*primitiveValue);
5525 if (primitiveValue->getIdent() == CSSValueAuto)
5528 m_style->setHyphenationString(primitiveValue->getStringValue());
5533 if (primitiveValue->getIdent() == CSSValueAuto)
5536 m_style->setHyphenationLimitAfter(min(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), static_cast<int>(numeric_limits<short>::max())));
5541 if (primitiveValue->getIdent() == CSSValueAuto)
5544 m_style->setHyphenationLimitBefore(min(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), static_cast<int>(numeric_limits<short>::max())));
5549 if (primitiveValue->getIdent() == CSSValueAuto)
5552 m_style->setLocale(primitiveValue->getStringValue());
5557 if (primitiveValue->getIdent() == CSSValueBorder)
5565 if (!primitiveValue || !primitiveValue->getIdent()) return;
5566 m_style->setTextSizeAdjust(primitiveValue->getIdent() == CSSValueAuto);
5577 if (!primitiveValue)
5580 if (primitiveValue->getIdent() == CSSValueNone) {
5585 DashboardRegion *region = primitiveValue->getDashboardRegionValue();
5609 if (!primitiveValue || !primitiveValue->getIdent())
5611 m_style->setVisuallyOrdered(primitiveValue->getIdent() == CSSValueVisual);
5616 switch (primitiveValue->getIdent()) {
5621 if (primitiveValue->getIdent() == CSSValueMedium)
5623 else if (primitiveValue->getIdent() == CSSValueThick)
5629 width = primitiveValue->computeLengthFloat(style(), m_rootElementStyle, zoomFactor);
5649 if (!primitiveValue)
5652 int type = primitiveValue->primitiveType();
5654 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
5656 l = Length(primitiveValue->getDoubleValue(), Percent);
5664 if (!primitiveValue)
5667 int type = primitiveValue->primitiveType();
5669 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
5671 l = Length(primitiveValue->getDoubleValue(), Percent);
5679 if (!primitiveValue)
5682 int type = primitiveValue->primitiveType();
5684 f = static_cast<float>(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle));
5692 if (primitiveValue)
5693 m_style->setTransformStyle3D((primitiveValue->getIdent() == CSSValuePreserve3d) ? TransformStyle3DPreserve3D : TransformStyle3DFlat);
5697 if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) {
5703 int type = primitiveValue->primitiveType();
5705 perspectiveValue = static_cast<float>(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor));
5708 perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLengthFloat(style(), m_rootElementStyle, zoomFactor);
5722 if (!primitiveValue)
5725 int type = primitiveValue->primitiveType();
5727 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
5729 l = Length(primitiveValue->getDoubleValue(), Percent);
5737 if (!primitiveValue)
5740 int type = primitiveValue->primitiveType();
5742 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
5744 l = Length(primitiveValue->getDoubleValue(), Percent);
5808 if (!primitiveValue)
5810 m_style->setPointerEvents(*primitiveValue);
5819 if (!primitiveValue)
5821 m_style->setColorSpace(*primitiveValue);
5830 if (!primitiveValue)
5832 m_style->setSpeak(*primitiveValue);
5896 if (primitiveValue && m_element->hasTagName(WebCore::inputTag)) {
5897 String mask = primitiveValue->getStringValue();
5903 if (primitiveValue && m_element->isFormControlElement()) {
5905 bool required = primitiveValue->getStringValue() == "true";
5958 if (!primitiveValue)
5961 if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_STRING) {
5964 m_style->setTextEmphasisCustomMark(primitiveValue->getStringValue());
5970 if (primitiveValue->getIdent() == CSSValueFilled || primitiveValue->getIdent() == CSSValueOpen) {
5971 m_style->setTextEmphasisFill(*primitiveValue);
5975 m_style->setTextEmphasisMark(*primitiveValue);
5981 if (!isInherit && !isInitial && !primitiveValue)
5990 result = *primitiveValue;
6003 if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) {
6069 if (!primitiveValue)
6072 Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite();
6124 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(valueList->item(0));
6125 int type = primitiveValue->primitiveType();
6129 width = height = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);
6133 switch (primitiveValue->getIdent()) {
6146 if (!pageSizeFromName(primitiveValue, 0, width, height))
6248 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6249 switch (primitiveValue->getIdent()) {
6274 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6275 layer->setClip(*primitiveValue);
6288 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6289 layer->setComposite(*primitiveValue);
6302 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6303 layer->setOrigin(*primitiveValue);
6345 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6346 layer->setRepeatX(*primitiveValue);
6359 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6360 layer->setRepeatY(*primitiveValue);
6370 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6371 if (primitiveValue->getIdent() == CSSValueContain)
6373 else if (primitiveValue->getIdent() == CSSValueCover)
6380 if (value->cssValueType() == CSSValue::CSS_INITIAL || primitiveValue->getIdent() == CSSValueContain
6381 || primitiveValue->getIdent() == CSSValueCover) {
6386 Pair* pair = primitiveValue->getPairValue();
6434 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6436 int type = primitiveValue->primitiveType();
6438 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
6440 l = Length(primitiveValue->getDoubleValue(), Percent);
6458 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6460 int type = primitiveValue->primitiveType();
6462 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
6464 l = Length(primitiveValue->getDoubleValue(), Percent);
6480 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6481 if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_S)
6482 animation->setDelay(primitiveValue->getFloatValue());
6484 animation->setDelay(primitiveValue->getFloatValue()/1000.0f);
6497 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6498 layer->setDirection(primitiveValue->getIdent() == CSSValueAlternate ? Animation::AnimationDirectionAlternate : Animation::AnimationDirectionNormal);
6511 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6512 if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_S)
6513 animation->setDuration(primitiveValue->getFloatValue());
6514 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_MS)
6515 animation->setDuration(primitiveValue->getFloatValue()/1000.0f);
6528 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6529 switch (primitiveValue->getIdent()) {
6555 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6556 if (primitiveValue->getIdent() == CSSValueInfinite)
6559 animation->setIterationCount(int(primitiveValue->getFloatValue()));
6572 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6573 if (primitiveValue->getIdent() == CSSValueNone)
6576 layer->setName(primitiveValue->getStringValue());
6589 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6590 EAnimPlayState playState = (primitiveValue->getIdent() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
6604 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6605 if (primitiveValue->getIdent() == CSSValueAll)
6607 else if (primitiveValue->getIdent() == CSSValueNone)
6610 animation->setProperty(static_cast<CSSPropertyID>(primitiveValue->getIdent()));
6621 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
6622 switch (primitiveValue->getIdent()) {
6994 Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValue* primitiveValue) const
6997 int ident = primitiveValue->getIdent();
7011 } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR)
7012 col.setRGB(primitiveValue->getRGBA32Value());