| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 32 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 37 */ | 37 */ |
| 38 | 38 |
| 39 #include "config.h" | 39 #include "config.h" |
| 40 #include "core/css/resolver/StyleBuilder.h" | 40 #include "core/css/resolver/StyleBuilder.h" |
| 41 | 41 |
| 42 // FIXME: This is way more than we need to include! | |
| 43 #include "CSSPropertyNames.h" | 42 #include "CSSPropertyNames.h" |
| 44 #include "CSSValueKeywords.h" | 43 #include "CSSValueKeywords.h" |
| 45 #include "StyleBuilderFunctions.h" | 44 #include "StyleBuilderFunctions.h" |
| 46 #include "core/animation/AnimatableValue.h" | |
| 47 #include "core/animation/Animation.h" | |
| 48 #include "core/css/BasicShapeFunctions.h" | 45 #include "core/css/BasicShapeFunctions.h" |
| 49 #include "core/css/CSSAspectRatioValue.h" | 46 #include "core/css/CSSAspectRatioValue.h" |
| 50 #include "core/css/CSSCalculationValue.h" | |
| 51 #include "core/css/CSSCursorImageValue.h" | 47 #include "core/css/CSSCursorImageValue.h" |
| 52 #include "core/css/CSSDefaultStyleSheets.h" | 48 #include "core/css/CSSGradientValue.h" |
| 53 #include "core/css/CSSFontSelector.h" | |
| 54 #include "core/css/CSSImageSetValue.h" | 49 #include "core/css/CSSImageSetValue.h" |
| 55 #include "core/css/CSSKeyframeRule.h" | |
| 56 #include "core/css/CSSKeyframesRule.h" | |
| 57 #include "core/css/CSSLineBoxContainValue.h" | 50 #include "core/css/CSSLineBoxContainValue.h" |
| 58 #include "core/css/CSSParser.h" | |
| 59 #include "core/css/CSSPrimitiveValueMappings.h" | 51 #include "core/css/CSSPrimitiveValueMappings.h" |
| 52 #include "core/css/CSSProperty.h" |
| 60 #include "core/css/CSSReflectValue.h" | 53 #include "core/css/CSSReflectValue.h" |
| 61 #include "core/css/CSSSVGDocumentValue.h" | |
| 62 #include "core/css/CSSSelector.h" | |
| 63 #include "core/css/CSSSelectorList.h" | |
| 64 #include "core/css/CSSStyleRule.h" | |
| 65 #include "core/css/CSSValueList.h" | |
| 66 #include "core/css/CSSVariableValue.h" | 54 #include "core/css/CSSVariableValue.h" |
| 67 #include "core/css/Counter.h" | 55 #include "core/css/Counter.h" |
| 68 #include "core/css/ElementRuleCollector.h" | |
| 69 #include "core/css/FontFeatureValue.h" | |
| 70 #include "core/css/FontSize.h" | |
| 71 #include "core/css/FontValue.h" | 56 #include "core/css/FontValue.h" |
| 72 #include "core/css/MediaQueryEvaluator.h" | |
| 73 #include "core/css/PageRuleCollector.h" | |
| 74 #include "core/css/Pair.h" | 57 #include "core/css/Pair.h" |
| 75 #include "core/css/Rect.h" | 58 #include "core/css/Rect.h" |
| 76 #include "core/css/RuleSet.h" | |
| 77 #include "core/css/ShadowValue.h" | 59 #include "core/css/ShadowValue.h" |
| 78 #include "core/css/StylePropertySet.h" | |
| 79 #include "core/css/StylePropertyShorthand.h" | 60 #include "core/css/StylePropertyShorthand.h" |
| 80 #include "core/css/StyleSheetContents.h" | |
| 81 #include "core/css/resolver/ElementStyleResources.h" | 61 #include "core/css/resolver/ElementStyleResources.h" |
| 82 #include "core/css/resolver/FilterOperationResolver.h" | 62 #include "core/css/resolver/FilterOperationResolver.h" |
| 63 #include "core/css/resolver/FontBuilder.h" |
| 83 #include "core/css/resolver/StyleResolver.h" | 64 #include "core/css/resolver/StyleResolver.h" |
| 84 #include "core/css/resolver/StyleResolverState.h" | 65 #include "core/css/resolver/StyleResolverState.h" |
| 85 #include "core/css/resolver/TransformBuilder.h" | 66 #include "core/css/resolver/TransformBuilder.h" |
| 86 #include "core/css/resolver/ViewportStyleResolver.h" | |
| 87 #include "core/dom/DocumentStyleSheetCollection.h" | |
| 88 #include "core/dom/Text.h" | |
| 89 #include "core/dom/shadow/ShadowRoot.h" | |
| 90 #include "core/page/Frame.h" | 67 #include "core/page/Frame.h" |
| 91 #include "core/page/FrameView.h" | |
| 92 #include "core/page/Page.h" | |
| 93 #include "core/page/Settings.h" | 68 #include "core/page/Settings.h" |
| 94 #include "core/platform/LinkHash.h" | |
| 95 #include "core/platform/graphics/FontDescription.h" | 69 #include "core/platform/graphics/FontDescription.h" |
| 96 #include "core/platform/graphics/filters/custom/CustomFilterConstants.h" | |
| 97 #include "core/platform/text/LocaleToScriptMapping.h" | |
| 98 #include "core/rendering/RenderTheme.h" | |
| 99 #include "core/rendering/RenderView.h" | |
| 100 #include "core/rendering/style/ContentData.h" | |
| 101 #include "core/rendering/style/CounterContent.h" | 70 #include "core/rendering/style/CounterContent.h" |
| 102 #include "core/rendering/style/CursorList.h" | 71 #include "core/rendering/style/CursorList.h" |
| 103 #include "core/rendering/style/KeyframeList.h" | |
| 104 #include "core/rendering/style/QuotesData.h" | 72 #include "core/rendering/style/QuotesData.h" |
| 105 #include "core/rendering/style/RenderStyle.h" | 73 #include "core/rendering/style/RenderStyle.h" |
| 106 #include "core/rendering/style/RenderStyleConstants.h" | 74 #include "core/rendering/style/RenderStyleConstants.h" |
| 107 #include "core/rendering/style/SVGRenderStyle.h" | 75 #include "core/rendering/style/SVGRenderStyle.h" |
| 108 #include "core/rendering/style/SVGRenderStyleDefs.h" | 76 #include "core/rendering/style/SVGRenderStyleDefs.h" |
| 109 #include "core/rendering/style/ShadowData.h" | 77 #include "core/rendering/style/ShadowData.h" |
| 110 #include "core/rendering/style/StyleCachedImage.h" | |
| 111 #include "core/rendering/style/StyleCachedImageSet.h" | |
| 112 #include "core/rendering/style/StyleCustomFilterProgramCache.h" | |
| 113 #include "core/rendering/style/StyleGeneratedImage.h" | 78 #include "core/rendering/style/StyleGeneratedImage.h" |
| 114 #include "core/rendering/style/StylePendingImage.h" | |
| 115 #include "core/rendering/style/StylePendingShader.h" | |
| 116 #include "core/rendering/style/StyleShader.h" | |
| 117 #include "core/svg/SVGColor.h" | 79 #include "core/svg/SVGColor.h" |
| 118 #include "core/svg/SVGPaint.h" | 80 #include "core/svg/SVGPaint.h" |
| 119 #include "core/svg/SVGURIReference.h" | 81 #include "core/svg/SVGURIReference.h" |
| 120 #include "wtf/MathExtras.h" | 82 #include "wtf/MathExtras.h" |
| 121 #include "wtf/StdLibExtras.h" | 83 #include "wtf/StdLibExtras.h" |
| 122 #include "wtf/Vector.h" | 84 #include "wtf/Vector.h" |
| 123 | 85 |
| 124 | |
| 125 namespace WebCore { | 86 namespace WebCore { |
| 126 | 87 |
| 127 static Length clipConvertToLength(StyleResolverState& state, CSSPrimitiveValue*
value) | 88 static Length clipConvertToLength(StyleResolverState& state, CSSPrimitiveValue*
value) |
| 128 { | 89 { |
| 129 return value->convertToLength<FixedIntegerConversion | PercentConversion | F
ractionConversion | AutoConversion>(state.style(), state.rootElementStyle(), sta
te.style()->effectiveZoom()); | 90 return value->convertToLength<FixedIntegerConversion | PercentConversion | F
ractionConversion | AutoConversion>(state.style(), state.rootElementStyle(), sta
te.style()->effectiveZoom()); |
| 130 } | 91 } |
| 131 | 92 |
| 132 void StyleBuilderFunctions::applyInitialCSSPropertyClip(StyleResolver*, StyleRes
olverState& state) | 93 void StyleBuilderFunctions::applyInitialCSSPropertyClip(StyleResolver*, StyleRes
olverState& state) |
| 133 { | 94 { |
| 134 state.style()->setClip(Length(), Length(), Length(), Length()); | 95 state.style()->setClip(Length(), Length(), Length(), Length()); |
| (...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2276 case CSSPropertyMaskType: { | 2237 case CSSPropertyMaskType: { |
| 2277 HANDLE_SVG_INHERIT_AND_INITIAL(maskType, MaskType) | 2238 HANDLE_SVG_INHERIT_AND_INITIAL(maskType, MaskType) |
| 2278 if (primitiveValue) | 2239 if (primitiveValue) |
| 2279 state.style()->accessSVGStyle()->setMaskType(*primitiveValue); | 2240 state.style()->accessSVGStyle()->setMaskType(*primitiveValue); |
| 2280 break; | 2241 break; |
| 2281 } | 2242 } |
| 2282 } | 2243 } |
| 2283 } | 2244 } |
| 2284 | 2245 |
| 2285 } // namespace WebCore | 2246 } // namespace WebCore |
| OLD | NEW |