OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
9 * distribution. | 9 * distribution. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 float spread = item.spread ? item.spread->computeLength<float>(state.css
ToLengthConversionData()) : 0; | 786 float spread = item.spread ? item.spread->computeLength<float>(state.css
ToLengthConversionData()) : 0; |
787 ShadowStyle shadowStyle = item.style && item.style->getValueID() == CSSV
alueInset ? Inset : Normal; | 787 ShadowStyle shadowStyle = item.style && item.style->getValueID() == CSSV
alueInset ? Inset : Normal; |
788 StyleColor color = StyleColor::currentColor(); | 788 StyleColor color = StyleColor::currentColor(); |
789 if (item.color) | 789 if (item.color) |
790 color = convertStyleColor(state, *item.color); | 790 color = convertStyleColor(state, *item.color); |
791 shadows.append(ShadowData(FloatPoint(x, y), blur, spread, shadowStyle, c
olor)); | 791 shadows.append(ShadowData(FloatPoint(x, y), blur, spread, shadowStyle, c
olor)); |
792 } | 792 } |
793 return ShadowList::adopt(shadows); | 793 return ShadowList::adopt(shadows); |
794 } | 794 } |
795 | 795 |
796 RawPtr<ShapeValue> StyleBuilderConverter::convertShapeValue(StyleResolverState&
state, const CSSValue& value) | 796 ShapeValue* StyleBuilderConverter::convertShapeValue(StyleResolverState& state,
const CSSValue& value) |
797 { | 797 { |
798 if (value.isPrimitiveValue()) { | 798 if (value.isPrimitiveValue()) { |
799 ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueNone); | 799 ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueNone); |
800 return nullptr; | 800 return nullptr; |
801 } | 801 } |
802 | 802 |
803 if (value.isImageValue() || value.isImageGeneratorValue() || value.isImageSe
tValue()) | 803 if (value.isImageValue() || value.isImageGeneratorValue() || value.isImageSe
tValue()) |
804 return ShapeValue::createImageValue(state.styleImage(CSSPropertyShapeOut
side, value)); | 804 return ShapeValue::createImageValue(state.styleImage(CSSPropertyShapeOut
side, value)); |
805 | 805 |
806 RefPtr<BasicShape> shape; | 806 RefPtr<BasicShape> shape; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 | 972 |
973 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) | 973 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) |
974 { | 974 { |
975 if (value.isPathValue()) | 975 if (value.isPathValue()) |
976 return toCSSPathValue(value).stylePath(); | 976 return toCSSPathValue(value).stylePath(); |
977 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 977 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
978 return nullptr; | 978 return nullptr; |
979 } | 979 } |
980 | 980 |
981 } // namespace blink | 981 } // namespace blink |
OLD | NEW |