| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1727 { | 1727 { |
| 1728 PropertyHandler handler = ApplyPropertyDefaultBase<ClipPathOperation*, g
etterFunction, PassRefPtr<ClipPathOperation>, setterFunction, ClipPathOperation*
, initialFunction>::createHandler(); | 1728 PropertyHandler handler = ApplyPropertyDefaultBase<ClipPathOperation*, g
etterFunction, PassRefPtr<ClipPathOperation>, setterFunction, ClipPathOperation*
, initialFunction>::createHandler(); |
| 1729 return PropertyHandler(handler.inheritFunction(), handler.initialFunctio
n(), &applyValue); | 1729 return PropertyHandler(handler.inheritFunction(), handler.initialFunctio
n(), &applyValue); |
| 1730 } | 1730 } |
| 1731 }; | 1731 }; |
| 1732 | 1732 |
| 1733 template <ExclusionShapeValue* (RenderStyle::*getterFunction)() const, void (Ren
derStyle::*setterFunction)(PassRefPtr<ExclusionShapeValue>), ExclusionShapeValue
* (*initialFunction)()> | 1733 template <ExclusionShapeValue* (RenderStyle::*getterFunction)() const, void (Ren
derStyle::*setterFunction)(PassRefPtr<ExclusionShapeValue>), ExclusionShapeValue
* (*initialFunction)()> |
| 1734 class ApplyPropertyExclusionShape { | 1734 class ApplyPropertyExclusionShape { |
| 1735 public: | 1735 public: |
| 1736 static void setValue(RenderStyle* style, PassRefPtr<ExclusionShapeValue> val
ue) { (style->*setterFunction)(value); } | 1736 static void setValue(RenderStyle* style, PassRefPtr<ExclusionShapeValue> val
ue) { (style->*setterFunction)(value); } |
| 1737 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue
* value) | 1737 static void applyValue(CSSPropertyID property, StyleResolver* styleResolver,
CSSValue* value) |
| 1738 { | 1738 { |
| 1739 if (value->isPrimitiveValue()) { | 1739 if (value->isPrimitiveValue()) { |
| 1740 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 1740 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 1741 if (primitiveValue->getIdent() == CSSValueAuto) | 1741 if (primitiveValue->getIdent() == CSSValueAuto) |
| 1742 setValue(styleResolver->style(), 0); | 1742 setValue(styleResolver->style(), 0); |
| 1743 // FIXME Bug 102571: Layout for the value 'outside-shape' is not yet
implemented | 1743 // FIXME Bug 102571: Layout for the value 'outside-shape' is not yet
implemented |
| 1744 else if (primitiveValue->getIdent() == CSSValueOutsideShape) | 1744 else if (primitiveValue->getIdent() == CSSValueOutsideShape) |
| 1745 setValue(styleResolver->style(), ExclusionShapeValue::createOuts
ideValue()); | 1745 setValue(styleResolver->style(), ExclusionShapeValue::createOuts
ideValue()); |
| 1746 else if (primitiveValue->isShape()) { | 1746 else if (primitiveValue->isShape()) { |
| 1747 RefPtr<ExclusionShapeValue> shape = ExclusionShapeValue::createS
hapeValue(basicShapeForValue(styleResolver, primitiveValue->getShapeValue())); | 1747 RefPtr<ExclusionShapeValue> shape = ExclusionShapeValue::createS
hapeValue(basicShapeForValue(styleResolver, primitiveValue->getShapeValue())); |
| 1748 setValue(styleResolver->style(), shape.release()); | 1748 setValue(styleResolver->style(), shape.release()); |
| 1749 } | 1749 } |
| 1750 } else if (value->isImageValue()) { |
| 1751 RefPtr<ExclusionShapeValue> shape = ExclusionShapeValue::createImage
Value(styleResolver->styleImage(property, value)); |
| 1752 setValue(styleResolver->style(), shape.release()); |
| 1750 } | 1753 } |
| 1751 } | 1754 } |
| 1752 static PropertyHandler createHandler() | 1755 static PropertyHandler createHandler() |
| 1753 { | 1756 { |
| 1754 PropertyHandler handler = ApplyPropertyDefaultBase<ExclusionShapeValue*,
getterFunction, PassRefPtr<ExclusionShapeValue>, setterFunction, ExclusionShape
Value*, initialFunction>::createHandler(); | 1757 PropertyHandler handler = ApplyPropertyDefaultBase<ExclusionShapeValue*,
getterFunction, PassRefPtr<ExclusionShapeValue>, setterFunction, ExclusionShape
Value*, initialFunction>::createHandler(); |
| 1755 return PropertyHandler(handler.inheritFunction(), handler.initialFunctio
n(), &applyValue); | 1758 return PropertyHandler(handler.inheritFunction(), handler.initialFunctio
n(), &applyValue); |
| 1756 } | 1759 } |
| 1757 }; | 1760 }; |
| 1758 | 1761 |
| 1759 class ApplyPropertyTextIndent { | 1762 class ApplyPropertyTextIndent { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 setPropertyHandler(CSSPropertyWebkitClipPath, ApplyPropertyClipPath<&RenderS
tyle::clipPath, &RenderStyle::setClipPath, &RenderStyle::initialClipPath>::creat
eHandler()); | 1937 setPropertyHandler(CSSPropertyWebkitClipPath, ApplyPropertyClipPath<&RenderS
tyle::clipPath, &RenderStyle::setClipPath, &RenderStyle::initialClipPath>::creat
eHandler()); |
| 1935 setPropertyHandler(CSSPropertyWebkitShapeInside, ApplyPropertyExclusionShape
<&RenderStyle::shapeInside, &RenderStyle::setShapeInside, &RenderStyle::initialS
hapeInside>::createHandler()); | 1938 setPropertyHandler(CSSPropertyWebkitShapeInside, ApplyPropertyExclusionShape
<&RenderStyle::shapeInside, &RenderStyle::setShapeInside, &RenderStyle::initialS
hapeInside>::createHandler()); |
| 1936 setPropertyHandler(CSSPropertyWebkitShapeOutside, ApplyPropertyExclusionShap
e<&RenderStyle::shapeOutside, &RenderStyle::setShapeOutside, &RenderStyle::initi
alShapeOutside>::createHandler()); | 1939 setPropertyHandler(CSSPropertyWebkitShapeOutside, ApplyPropertyExclusionShap
e<&RenderStyle::shapeOutside, &RenderStyle::setShapeOutside, &RenderStyle::initi
alShapeOutside>::createHandler()); |
| 1937 setPropertyHandler(CSSPropertyWidows, ApplyPropertyAuto<short, &RenderStyle:
:widows, &RenderStyle::setWidows, &RenderStyle::hasAutoWidows, &RenderStyle::set
HasAutoWidows>::createHandler()); | 1940 setPropertyHandler(CSSPropertyWidows, ApplyPropertyAuto<short, &RenderStyle:
:widows, &RenderStyle::setWidows, &RenderStyle::hasAutoWidows, &RenderStyle::set
HasAutoWidows>::createHandler()); |
| 1938 setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength<int, &
RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLet
terWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler
()); | 1941 setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength<int, &
RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLet
terWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler
()); |
| 1939 setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::z
Index, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHa
sAutoZIndex>::createHandler()); | 1942 setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::z
Index, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHa
sAutoZIndex>::createHandler()); |
| 1940 } | 1943 } |
| 1941 | 1944 |
| 1942 | 1945 |
| 1943 } | 1946 } |
| OLD | NEW |