OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 case SpaceImageRule: | 390 case SpaceImageRule: |
391 return CSSValueSpace; | 391 return CSSValueSpace; |
392 default: | 392 default: |
393 return CSSValueStretch; | 393 return CSSValueStretch; |
394 } | 394 } |
395 } | 395 } |
396 | 396 |
397 static PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> valueForNinePieceImageSl
ice(const NinePieceImage& image) | 397 static PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> valueForNinePieceImageSl
ice(const NinePieceImage& image) |
398 { | 398 { |
399 // Create the slices. | 399 // Create the slices. |
400 RefPtrWillBeRawPtr<CSSPrimitiveValue> top; | 400 RefPtrWillBeRawPtr<CSSPrimitiveValue> top = nullptr; |
401 RefPtrWillBeRawPtr<CSSPrimitiveValue> right; | 401 RefPtrWillBeRawPtr<CSSPrimitiveValue> right = nullptr; |
402 RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom; | 402 RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = nullptr; |
403 RefPtrWillBeRawPtr<CSSPrimitiveValue> left; | 403 RefPtrWillBeRawPtr<CSSPrimitiveValue> left = nullptr; |
404 | 404 |
405 if (image.imageSlices().top().isPercent()) | 405 if (image.imageSlices().top().isPercent()) |
406 top = cssValuePool().createValue(image.imageSlices().top().value(), CSSP
rimitiveValue::CSS_PERCENTAGE); | 406 top = cssValuePool().createValue(image.imageSlices().top().value(), CSSP
rimitiveValue::CSS_PERCENTAGE); |
407 else | 407 else |
408 top = cssValuePool().createValue(image.imageSlices().top().value(), CSSP
rimitiveValue::CSS_NUMBER); | 408 top = cssValuePool().createValue(image.imageSlices().top().value(), CSSP
rimitiveValue::CSS_NUMBER); |
409 | 409 |
410 if (image.imageSlices().right() == image.imageSlices().top() && image.imageS
lices().bottom() == image.imageSlices().top() | 410 if (image.imageSlices().right() == image.imageSlices().top() && image.imageS
lices().bottom() == image.imageSlices().top() |
411 && image.imageSlices().left() == image.imageSlices().top()) { | 411 && image.imageSlices().left() == image.imageSlices().top()) { |
412 right = top; | 412 right = top; |
413 bottom = top; | 413 bottom = top; |
(...skipping 29 matching lines...) Expand all Loading... |
443 quad->setRight(right); | 443 quad->setRight(right); |
444 quad->setBottom(bottom); | 444 quad->setBottom(bottom); |
445 quad->setLeft(left); | 445 quad->setLeft(left); |
446 | 446 |
447 return CSSBorderImageSliceValue::create(cssValuePool().createValue(quad.rele
ase()), image.fill()); | 447 return CSSBorderImageSliceValue::create(cssValuePool().createValue(quad.rele
ase()), image.fill()); |
448 } | 448 } |
449 | 449 |
450 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(cons
t BorderImageLengthBox& box, const RenderStyle& style) | 450 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(cons
t BorderImageLengthBox& box, const RenderStyle& style) |
451 { | 451 { |
452 // Create the slices. | 452 // Create the slices. |
453 RefPtrWillBeRawPtr<CSSPrimitiveValue> top; | 453 RefPtrWillBeRawPtr<CSSPrimitiveValue> top = nullptr; |
454 RefPtrWillBeRawPtr<CSSPrimitiveValue> right; | 454 RefPtrWillBeRawPtr<CSSPrimitiveValue> right = nullptr; |
455 RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom; | 455 RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = nullptr; |
456 RefPtrWillBeRawPtr<CSSPrimitiveValue> left; | 456 RefPtrWillBeRawPtr<CSSPrimitiveValue> left = nullptr; |
457 | 457 |
458 if (box.top().isNumber()) | 458 if (box.top().isNumber()) |
459 top = cssValuePool().createValue(box.top().number(), CSSPrimitiveValue::
CSS_NUMBER); | 459 top = cssValuePool().createValue(box.top().number(), CSSPrimitiveValue::
CSS_NUMBER); |
460 else | 460 else |
461 top = cssValuePool().createValue(box.top().length(), style); | 461 top = cssValuePool().createValue(box.top().length(), style); |
462 | 462 |
463 if (box.right() == box.top() && box.bottom() == box.top() && box.left() == b
ox.top()) { | 463 if (box.right() == box.top() && box.bottom() == box.top() && box.left() == b
ox.top()) { |
464 right = top; | 464 right = top; |
465 bottom = top; | 465 bottom = top; |
466 left = top; | 466 left = top; |
(...skipping 27 matching lines...) Expand all Loading... |
494 quad->setTop(top); | 494 quad->setTop(top); |
495 quad->setRight(right); | 495 quad->setRight(right); |
496 quad->setBottom(bottom); | 496 quad->setBottom(bottom); |
497 quad->setLeft(left); | 497 quad->setLeft(left); |
498 | 498 |
499 return cssValuePool().createValue(quad.release()); | 499 return cssValuePool().createValue(quad.release()); |
500 } | 500 } |
501 | 501 |
502 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImageRepeat(const NineP
ieceImage& image) | 502 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImageRepeat(const NineP
ieceImage& image) |
503 { | 503 { |
504 RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalRepeat; | 504 RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalRepeat = nullptr; |
505 RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalRepeat; | 505 RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalRepeat = nullptr; |
506 | 506 |
507 horizontalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(i
mage.horizontalRule())); | 507 horizontalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(i
mage.horizontalRule())); |
508 if (image.horizontalRule() == image.verticalRule()) | 508 if (image.horizontalRule() == image.verticalRule()) |
509 verticalRepeat = horizontalRepeat; | 509 verticalRepeat = horizontalRepeat; |
510 else | 510 else |
511 verticalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule
(image.verticalRule())); | 511 verticalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule
(image.verticalRule())); |
512 return cssValuePool().createValue(Pair::create(horizontalRepeat.release(), v
erticalRepeat.release(), Pair::DropIdenticalValues)); | 512 return cssValuePool().createValue(Pair::create(horizontalRepeat.release(), v
erticalRepeat.release(), Pair::DropIdenticalValues)); |
513 } | 513 } |
514 | 514 |
515 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImage(const NinePieceIm
age& image, const RenderStyle& style) | 515 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImage(const NinePieceIm
age& image, const RenderStyle& style) |
516 { | 516 { |
517 if (!image.hasImage()) | 517 if (!image.hasImage()) |
518 return cssValuePool().createIdentifierValue(CSSValueNone); | 518 return cssValuePool().createIdentifierValue(CSSValueNone); |
519 | 519 |
520 // Image first. | 520 // Image first. |
521 RefPtrWillBeRawPtr<CSSValue> imageValue; | 521 RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr; |
522 if (image.image()) | 522 if (image.image()) |
523 imageValue = image.image()->cssValue(); | 523 imageValue = image.image()->cssValue(); |
524 | 524 |
525 // Create the image slice. | 525 // Create the image slice. |
526 RefPtrWillBeRawPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePiece
ImageSlice(image); | 526 RefPtrWillBeRawPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePiece
ImageSlice(image); |
527 | 527 |
528 // Create the border area slices. | 528 // Create the border area slices. |
529 RefPtrWillBeRawPtr<CSSValue> borderSlices = valueForNinePieceImageQuad(image
.borderSlices(), style); | 529 RefPtrWillBeRawPtr<CSSValue> borderSlices = valueForNinePieceImageQuad(image
.borderSlices(), style); |
530 | 530 |
531 // Create the border outset. | 531 // Create the border outset. |
(...skipping 20 matching lines...) Expand all Loading... |
552 if (length.isFixed()) | 552 if (length.isFixed()) |
553 return zoomAdjustedPixelValue(length.value(), style); | 553 return zoomAdjustedPixelValue(length.value(), style); |
554 return cssValuePool().createValue(length, style); | 554 return cssValuePool().createValue(length, style); |
555 } | 555 } |
556 | 556 |
557 static PassRefPtrWillBeRawPtr<CSSValue> valueForReflection(const StyleReflection
* reflection, const RenderStyle& style) | 557 static PassRefPtrWillBeRawPtr<CSSValue> valueForReflection(const StyleReflection
* reflection, const RenderStyle& style) |
558 { | 558 { |
559 if (!reflection) | 559 if (!reflection) |
560 return cssValuePool().createIdentifierValue(CSSValueNone); | 560 return cssValuePool().createIdentifierValue(CSSValueNone); |
561 | 561 |
562 RefPtrWillBeRawPtr<CSSPrimitiveValue> offset; | 562 RefPtrWillBeRawPtr<CSSPrimitiveValue> offset = nullptr; |
563 if (reflection->offset().isPercent()) | 563 if (reflection->offset().isPercent()) |
564 offset = cssValuePool().createValue(reflection->offset().percent(), CSSP
rimitiveValue::CSS_PERCENTAGE); | 564 offset = cssValuePool().createValue(reflection->offset().percent(), CSSP
rimitiveValue::CSS_PERCENTAGE); |
565 else | 565 else |
566 offset = zoomAdjustedPixelValue(reflection->offset().value(), style); | 566 offset = zoomAdjustedPixelValue(reflection->offset().value(), style); |
567 | 567 |
568 RefPtrWillBeRawPtr<CSSPrimitiveValue> direction; | 568 RefPtrWillBeRawPtr<CSSPrimitiveValue> direction = nullptr; |
569 switch (reflection->direction()) { | 569 switch (reflection->direction()) { |
570 case ReflectionBelow: | 570 case ReflectionBelow: |
571 direction = cssValuePool().createIdentifierValue(CSSValueBelow); | 571 direction = cssValuePool().createIdentifierValue(CSSValueBelow); |
572 break; | 572 break; |
573 case ReflectionAbove: | 573 case ReflectionAbove: |
574 direction = cssValuePool().createIdentifierValue(CSSValueAbove); | 574 direction = cssValuePool().createIdentifierValue(CSSValueAbove); |
575 break; | 575 break; |
576 case ReflectionLeft: | 576 case ReflectionLeft: |
577 direction = cssValuePool().createIdentifierValue(CSSValueLeft); | 577 direction = cssValuePool().createIdentifierValue(CSSValueLeft); |
578 break; | 578 break; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 { | 711 { |
712 if (!renderer->isBox()) | 712 if (!renderer->isBox()) |
713 return LayoutRect(); | 713 return LayoutRect(); |
714 | 714 |
715 RenderBox* box = toRenderBox(renderer); | 715 RenderBox* box = toRenderBox(renderer); |
716 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); | 716 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); |
717 } | 717 } |
718 | 718 |
719 static PassRefPtrWillBeRawPtr<CSSTransformValue> valueForMatrixTransform(const T
ransformationMatrix& transform, const RenderStyle& style) | 719 static PassRefPtrWillBeRawPtr<CSSTransformValue> valueForMatrixTransform(const T
ransformationMatrix& transform, const RenderStyle& style) |
720 { | 720 { |
721 RefPtrWillBeRawPtr<CSSTransformValue> transformValue; | 721 RefPtrWillBeRawPtr<CSSTransformValue> transformValue = nullptr; |
722 if (transform.isAffine()) { | 722 if (transform.isAffine()) { |
723 transformValue = CSSTransformValue::create(CSSTransformValue::MatrixTran
sformOperation); | 723 transformValue = CSSTransformValue::create(CSSTransformValue::MatrixTran
sformOperation); |
724 | 724 |
725 transformValue->append(cssValuePool().createValue(transform.a(), CSSPrim
itiveValue::CSS_NUMBER)); | 725 transformValue->append(cssValuePool().createValue(transform.a(), CSSPrim
itiveValue::CSS_NUMBER)); |
726 transformValue->append(cssValuePool().createValue(transform.b(), CSSPrim
itiveValue::CSS_NUMBER)); | 726 transformValue->append(cssValuePool().createValue(transform.b(), CSSPrim
itiveValue::CSS_NUMBER)); |
727 transformValue->append(cssValuePool().createValue(transform.c(), CSSPrim
itiveValue::CSS_NUMBER)); | 727 transformValue->append(cssValuePool().createValue(transform.c(), CSSPrim
itiveValue::CSS_NUMBER)); |
728 transformValue->append(cssValuePool().createValue(transform.d(), CSSPrim
itiveValue::CSS_NUMBER)); | 728 transformValue->append(cssValuePool().createValue(transform.d(), CSSPrim
itiveValue::CSS_NUMBER)); |
729 transformValue->append(zoomAdjustedNumberValue(transform.e(), style)); | 729 transformValue->append(zoomAdjustedNumberValue(transform.e(), style)); |
730 transformValue->append(zoomAdjustedNumberValue(transform.f(), style)); | 730 transformValue->append(zoomAdjustedNumberValue(transform.f(), style)); |
731 } else { | 731 } else { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 return list.release(); | 774 return list.release(); |
775 } | 775 } |
776 | 776 |
777 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(con
st RenderObject* renderer, const RenderStyle& style) const | 777 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(con
st RenderObject* renderer, const RenderStyle& style) const |
778 { | 778 { |
779 if (style.filter().operations().isEmpty()) | 779 if (style.filter().operations().isEmpty()) |
780 return cssValuePool().createIdentifierValue(CSSValueNone); | 780 return cssValuePool().createIdentifierValue(CSSValueNone); |
781 | 781 |
782 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 782 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
783 | 783 |
784 RefPtrWillBeRawPtr<CSSFilterValue> filterValue; | 784 RefPtrWillBeRawPtr<CSSFilterValue> filterValue = nullptr; |
785 | 785 |
786 Vector<RefPtr<FilterOperation> >::const_iterator end = style.filter().operat
ions().end(); | 786 Vector<RefPtr<FilterOperation> >::const_iterator end = style.filter().operat
ions().end(); |
787 for (Vector<RefPtr<FilterOperation> >::const_iterator it = style.filter().op
erations().begin(); it != end; ++it) { | 787 for (Vector<RefPtr<FilterOperation> >::const_iterator it = style.filter().op
erations().begin(); it != end; ++it) { |
788 FilterOperation* filterOperation = (*it).get(); | 788 FilterOperation* filterOperation = (*it).get(); |
789 switch (filterOperation->type()) { | 789 switch (filterOperation->type()) { |
790 case FilterOperation::REFERENCE: | 790 case FilterOperation::REFERENCE: |
791 filterValue = CSSFilterValue::create(CSSFilterValue::ReferenceFilter
Operation); | 791 filterValue = CSSFilterValue::create(CSSFilterValue::ReferenceFilter
Operation); |
792 filterValue->append(cssValuePool().createValue(toReferenceFilterOper
ation(filterOperation)->url(), CSSPrimitiveValue::CSS_STRING)); | 792 filterValue->append(cssValuePool().createValue(toReferenceFilterOper
ation(filterOperation)->url(), CSSPrimitiveValue::CSS_STRING)); |
793 break; | 793 break; |
794 case FilterOperation::GRAYSCALE: | 794 case FilterOperation::GRAYSCALE: |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrim
itiveValue::CSS_NUMBER)); | 930 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrim
itiveValue::CSS_NUMBER)); |
931 } else | 931 } else |
932 list->append(cssValuePool().createValue(position.integerPosition(), CSSP
rimitiveValue::CSS_NUMBER)); | 932 list->append(cssValuePool().createValue(position.integerPosition(), CSSP
rimitiveValue::CSS_NUMBER)); |
933 | 933 |
934 if (!position.namedGridLine().isNull()) | 934 if (!position.namedGridLine().isNull()) |
935 list->append(cssValuePool().createValue(position.namedGridLine(), CSSPri
mitiveValue::CSS_STRING)); | 935 list->append(cssValuePool().createValue(position.namedGridLine(), CSSPri
mitiveValue::CSS_STRING)); |
936 return list; | 936 return list; |
937 } | 937 } |
938 static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(const CSSA
nimationData* animation) | 938 static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(const CSSA
nimationData* animation) |
939 { | 939 { |
940 RefPtrWillBeRawPtr<CSSValue> propertyValue; | 940 RefPtrWillBeRawPtr<CSSValue> propertyValue = nullptr; |
941 if (animation->animationMode() == CSSAnimationData::AnimateNone) | 941 if (animation->animationMode() == CSSAnimationData::AnimateNone) |
942 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone); | 942 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone); |
943 else if (animation->animationMode() == CSSAnimationData::AnimateAll) | 943 else if (animation->animationMode() == CSSAnimationData::AnimateAll) |
944 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll); | 944 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll); |
945 else | 945 else |
946 propertyValue = cssValuePool().createValue(getPropertyNameString(animati
on->property()), CSSPrimitiveValue::CSS_STRING); | 946 propertyValue = cssValuePool().createValue(getPropertyNameString(animati
on->property()), CSSPrimitiveValue::CSS_STRING); |
947 return propertyValue.release(); | 947 return propertyValue.release(); |
948 } | 948 } |
949 static PassRefPtrWillBeRawPtr<CSSValue> valueForTransitionProperty(const CSSAnim
ationDataList* animList) | 949 static PassRefPtrWillBeRawPtr<CSSValue> valueForTransitionProperty(const CSSAnim
ationDataList* animList) |
950 { | 950 { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 return false; | 1189 return false; |
1190 | 1190 |
1191 return style->fontDescription().useFixedDefaultSize(); | 1191 return style->fontDescription().useFixedDefaultSize(); |
1192 } | 1192 } |
1193 | 1193 |
1194 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::valueForShadowData
(const ShadowData& shadow, const RenderStyle& style, bool useSpread) const | 1194 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::valueForShadowData
(const ShadowData& shadow, const RenderStyle& style, bool useSpread) const |
1195 { | 1195 { |
1196 RefPtrWillBeRawPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(shadow.x(),
style); | 1196 RefPtrWillBeRawPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(shadow.x(),
style); |
1197 RefPtrWillBeRawPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(shadow.y(),
style); | 1197 RefPtrWillBeRawPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(shadow.y(),
style); |
1198 RefPtrWillBeRawPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(shadow.b
lur(), style); | 1198 RefPtrWillBeRawPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(shadow.b
lur(), style); |
1199 RefPtrWillBeRawPtr<CSSPrimitiveValue> spread = useSpread ? zoomAdjustedPixel
Value(shadow.spread(), style) : PassRefPtrWillBeRawPtr<CSSPrimitiveValue>(); | 1199 RefPtrWillBeRawPtr<CSSPrimitiveValue> spread = useSpread ? zoomAdjustedPixel
Value(shadow.spread(), style) : PassRefPtrWillBeRawPtr<CSSPrimitiveValue>(nullpt
r); |
1200 RefPtrWillBeRawPtr<CSSPrimitiveValue> shadowStyle = shadow.style() == Normal
? PassRefPtrWillBeRawPtr<CSSPrimitiveValue>() : cssValuePool().createIdentifier
Value(CSSValueInset); | 1200 RefPtrWillBeRawPtr<CSSPrimitiveValue> shadowStyle = shadow.style() == Normal
? PassRefPtrWillBeRawPtr<CSSPrimitiveValue>(nullptr) : cssValuePool().createIde
ntifierValue(CSSValueInset); |
1201 RefPtrWillBeRawPtr<CSSPrimitiveValue> color = currentColorOrValidColor(style
, shadow.color()); | 1201 RefPtrWillBeRawPtr<CSSPrimitiveValue> color = currentColorOrValidColor(style
, shadow.color()); |
1202 return CSSShadowValue::create(x.release(), y.release(), blur.release(), spre
ad.release(), shadowStyle.release(), color.release()); | 1202 return CSSShadowValue::create(x.release(), y.release(), blur.release(), spre
ad.release(), shadowStyle.release(), color.release()); |
1203 } | 1203 } |
1204 | 1204 |
1205 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::valueForShadowList
(const ShadowList* shadowList, const RenderStyle& style, bool useSpread) const | 1205 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::valueForShadowList
(const ShadowList* shadowList, const RenderStyle& style, bool useSpread) const |
1206 { | 1206 { |
1207 if (!shadowList) | 1207 if (!shadowList) |
1208 return cssValuePool().createIdentifierValue(CSSValueNone); | 1208 return cssValuePool().createIdentifierValue(CSSValueNone); |
1209 | 1209 |
1210 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; | 1210 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 return cssValuePool().createValue(style->columnBreakBefore()); | 1845 return cssValuePool().createValue(style->columnBreakBefore()); |
1846 case CSSPropertyWebkitColumnBreakInside: | 1846 case CSSPropertyWebkitColumnBreakInside: |
1847 return cssValuePool().createValue(style->columnBreakInside()); | 1847 return cssValuePool().createValue(style->columnBreakInside()); |
1848 case CSSPropertyWebkitColumnWidth: | 1848 case CSSPropertyWebkitColumnWidth: |
1849 if (style->hasAutoColumnWidth()) | 1849 if (style->hasAutoColumnWidth()) |
1850 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1850 return cssValuePool().createIdentifierValue(CSSValueAuto); |
1851 return zoomAdjustedPixelValue(style->columnWidth(), *style); | 1851 return zoomAdjustedPixelValue(style->columnWidth(), *style); |
1852 case CSSPropertyTabSize: | 1852 case CSSPropertyTabSize: |
1853 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu
e::CSS_NUMBER); | 1853 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu
e::CSS_NUMBER); |
1854 case CSSPropertyCursor: { | 1854 case CSSPropertyCursor: { |
1855 RefPtrWillBeRawPtr<CSSValueList> list; | 1855 RefPtrWillBeRawPtr<CSSValueList> list = nullptr; |
1856 CursorList* cursors = style->cursors(); | 1856 CursorList* cursors = style->cursors(); |
1857 if (cursors && cursors->size() > 0) { | 1857 if (cursors && cursors->size() > 0) { |
1858 list = CSSValueList::createCommaSeparated(); | 1858 list = CSSValueList::createCommaSeparated(); |
1859 for (unsigned i = 0; i < cursors->size(); ++i) | 1859 for (unsigned i = 0; i < cursors->size(); ++i) |
1860 if (StyleImage* image = cursors->at(i).image()) | 1860 if (StyleImage* image = cursors->at(i).image()) |
1861 list->append(image->cssValue()); | 1861 list->append(image->cssValue()); |
1862 } | 1862 } |
1863 RefPtrWillBeRawPtr<CSSValue> value = cssValuePool().createValue(styl
e->cursor()); | 1863 RefPtrWillBeRawPtr<CSSValue> value = cssValuePool().createValue(styl
e->cursor()); |
1864 if (list) { | 1864 if (list) { |
1865 list->append(value.release()); | 1865 list->append(value.release()); |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3042 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3042 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3043 CSSPropertyB
ackgroundClip }; | 3043 CSSPropertyB
ackgroundClip }; |
3044 | 3044 |
3045 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated()
; | 3045 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated()
; |
3046 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3046 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
3047 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3047 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
3048 return list.release(); | 3048 return list.release(); |
3049 } | 3049 } |
3050 | 3050 |
3051 } // namespace WebCore | 3051 } // namespace WebCore |
OLD | NEW |