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 13 matching lines...) Expand all Loading... |
24 #include "config.h" | 24 #include "config.h" |
25 #include "core/css/CSSComputedStyleDeclaration.h" | 25 #include "core/css/CSSComputedStyleDeclaration.h" |
26 | 26 |
27 #include "CSSPropertyNames.h" | 27 #include "CSSPropertyNames.h" |
28 #include "WebKitFontFamilyNames.h" | 28 #include "WebKitFontFamilyNames.h" |
29 #include "core/css/BasicShapeFunctions.h" | 29 #include "core/css/BasicShapeFunctions.h" |
30 #include "core/css/CSSAspectRatioValue.h" | 30 #include "core/css/CSSAspectRatioValue.h" |
31 #include "core/css/CSSBorderImage.h" | 31 #include "core/css/CSSBorderImage.h" |
32 #include "core/css/CSSFunctionValue.h" | 32 #include "core/css/CSSFunctionValue.h" |
33 #include "core/css/CSSLineBoxContainValue.h" | 33 #include "core/css/CSSLineBoxContainValue.h" |
| 34 #include "core/css/CSSMixFunctionValue.h" |
34 #include "core/css/CSSParser.h" | 35 #include "core/css/CSSParser.h" |
35 #include "core/css/CSSPrimitiveValue.h" | 36 #include "core/css/CSSPrimitiveValue.h" |
36 #include "core/css/CSSPrimitiveValueMappings.h" | 37 #include "core/css/CSSPrimitiveValueMappings.h" |
37 #include "core/css/CSSReflectValue.h" | 38 #include "core/css/CSSReflectValue.h" |
38 #include "core/css/CSSSelector.h" | 39 #include "core/css/CSSSelector.h" |
39 #include "core/css/CSSTimingFunctionValue.h" | 40 #include "core/css/CSSTimingFunctionValue.h" |
| 41 #include "core/css/CSSTransformValue.h" |
40 #include "core/css/CSSValueList.h" | 42 #include "core/css/CSSValueList.h" |
41 #include "core/css/CSSValuePool.h" | 43 #include "core/css/CSSValuePool.h" |
42 #include "core/css/FontFeatureValue.h" | 44 #include "core/css/FontFeatureValue.h" |
43 #include "core/css/FontValue.h" | 45 #include "core/css/FontValue.h" |
44 #include "core/css/Pair.h" | 46 #include "core/css/Pair.h" |
45 #include "core/css/Rect.h" | 47 #include "core/css/Rect.h" |
46 #include "core/css/ShadowValue.h" | 48 #include "core/css/ShadowValue.h" |
47 #include "core/css/StylePropertySet.h" | 49 #include "core/css/StylePropertySet.h" |
48 #include "core/css/StylePropertyShorthand.h" | 50 #include "core/css/StylePropertyShorthand.h" |
49 #include "core/css/WebKitCSSTransformValue.h" | |
50 #include "core/css/resolver/StyleResolver.h" | 51 #include "core/css/resolver/StyleResolver.h" |
51 #include "core/dom/Document.h" | 52 #include "core/dom/Document.h" |
52 #include "core/dom/ExceptionCode.h" | 53 #include "core/dom/ExceptionCode.h" |
53 #include "core/dom/PseudoElement.h" | 54 #include "core/dom/PseudoElement.h" |
54 #include "core/dom/WebCoreMemoryInstrumentation.h" | 55 #include "core/dom/WebCoreMemoryInstrumentation.h" |
55 #include "core/page/RuntimeCSSEnabled.h" | 56 #include "core/page/RuntimeCSSEnabled.h" |
56 #include "core/page/animation/AnimationController.h" | 57 #include "core/page/animation/AnimationController.h" |
57 #include "core/platform/graphics/FontFeatureSettings.h" | 58 #include "core/platform/graphics/FontFeatureSettings.h" |
58 #include "core/rendering/RenderBox.h" | 59 #include "core/rendering/RenderBox.h" |
59 #include "core/rendering/RenderView.h" | 60 #include "core/rendering/RenderView.h" |
60 #include "core/rendering/style/ContentData.h" | 61 #include "core/rendering/style/ContentData.h" |
61 #include "core/rendering/style/CounterContent.h" | 62 #include "core/rendering/style/CounterContent.h" |
62 #include "core/rendering/style/CursorList.h" | 63 #include "core/rendering/style/CursorList.h" |
63 #include "core/rendering/style/ExclusionShapeValue.h" | 64 #include "core/rendering/style/ExclusionShapeValue.h" |
64 #include "core/rendering/style/RenderStyle.h" | 65 #include "core/rendering/style/RenderStyle.h" |
65 #include <wtf/text/StringBuilder.h> | 66 #include <wtf/text/StringBuilder.h> |
66 | 67 |
67 #include "core/css/WebKitCSSArrayFunctionValue.h" | 68 #include "core/css/WebKitCSSArrayFunctionValue.h" |
68 #include "core/css/WebKitCSSMixFunctionValue.h" | |
69 #include "core/platform/graphics/filters/custom/CustomFilterArrayParameter.h" | 69 #include "core/platform/graphics/filters/custom/CustomFilterArrayParameter.h" |
70 #include "core/platform/graphics/filters/custom/CustomFilterNumberParameter.h" | 70 #include "core/platform/graphics/filters/custom/CustomFilterNumberParameter.h" |
71 #include "core/platform/graphics/filters/custom/CustomFilterOperation.h" | 71 #include "core/platform/graphics/filters/custom/CustomFilterOperation.h" |
72 #include "core/platform/graphics/filters/custom/CustomFilterParameter.h" | 72 #include "core/platform/graphics/filters/custom/CustomFilterParameter.h" |
73 #include "core/platform/graphics/filters/custom/CustomFilterTransformParameter.h
" | 73 #include "core/platform/graphics/filters/custom/CustomFilterTransformParameter.h
" |
74 | 74 |
75 #include "core/css/WebKitCSSFilterValue.h" | 75 #include "core/css/WebKitCSSFilterValue.h" |
76 #include "core/rendering/style/StyleCustomFilterProgram.h" | 76 #include "core/rendering/style/StyleCustomFilterProgram.h" |
77 | 77 |
78 namespace WebCore { | 78 namespace WebCore { |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 726 |
727 static LayoutRect sizingBox(RenderObject* renderer) | 727 static LayoutRect sizingBox(RenderObject* renderer) |
728 { | 728 { |
729 if (!renderer->isBox()) | 729 if (!renderer->isBox()) |
730 return LayoutRect(); | 730 return LayoutRect(); |
731 | 731 |
732 RenderBox* box = toRenderBox(renderer); | 732 RenderBox* box = toRenderBox(renderer); |
733 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); | 733 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); |
734 } | 734 } |
735 | 735 |
736 static PassRefPtr<WebKitCSSTransformValue> matrixTransformValue(const Transforma
tionMatrix& transform, const RenderStyle* style) | 736 static PassRefPtr<CSSTransformValue> matrixTransformValue(const TransformationMa
trix& transform, const RenderStyle* style) |
737 { | 737 { |
738 RefPtr<WebKitCSSTransformValue> transformValue; | 738 RefPtr<CSSTransformValue> transformValue; |
739 if (transform.isAffine()) { | 739 if (transform.isAffine()) { |
740 transformValue = WebKitCSSTransformValue::create(WebKitCSSTransformValue
::MatrixTransformOperation); | 740 transformValue = CSSTransformValue::create(CSSTransformValue::MatrixTran
sformOperation); |
741 | 741 |
742 transformValue->append(cssValuePool().createValue(transform.a(), CSSPrim
itiveValue::CSS_NUMBER)); | 742 transformValue->append(cssValuePool().createValue(transform.a(), CSSPrim
itiveValue::CSS_NUMBER)); |
743 transformValue->append(cssValuePool().createValue(transform.b(), CSSPrim
itiveValue::CSS_NUMBER)); | 743 transformValue->append(cssValuePool().createValue(transform.b(), CSSPrim
itiveValue::CSS_NUMBER)); |
744 transformValue->append(cssValuePool().createValue(transform.c(), CSSPrim
itiveValue::CSS_NUMBER)); | 744 transformValue->append(cssValuePool().createValue(transform.c(), CSSPrim
itiveValue::CSS_NUMBER)); |
745 transformValue->append(cssValuePool().createValue(transform.d(), CSSPrim
itiveValue::CSS_NUMBER)); | 745 transformValue->append(cssValuePool().createValue(transform.d(), CSSPrim
itiveValue::CSS_NUMBER)); |
746 transformValue->append(zoomAdjustedNumberValue(transform.e(), style)); | 746 transformValue->append(zoomAdjustedNumberValue(transform.e(), style)); |
747 transformValue->append(zoomAdjustedNumberValue(transform.f(), style)); | 747 transformValue->append(zoomAdjustedNumberValue(transform.f(), style)); |
748 } else { | 748 } else { |
749 transformValue = WebKitCSSTransformValue::create(WebKitCSSTransformValue
::Matrix3DTransformOperation); | 749 transformValue = CSSTransformValue::create(CSSTransformValue::Matrix3DTr
ansformOperation); |
750 | 750 |
751 transformValue->append(cssValuePool().createValue(transform.m11(), CSSPr
imitiveValue::CSS_NUMBER)); | 751 transformValue->append(cssValuePool().createValue(transform.m11(), CSSPr
imitiveValue::CSS_NUMBER)); |
752 transformValue->append(cssValuePool().createValue(transform.m12(), CSSPr
imitiveValue::CSS_NUMBER)); | 752 transformValue->append(cssValuePool().createValue(transform.m12(), CSSPr
imitiveValue::CSS_NUMBER)); |
753 transformValue->append(cssValuePool().createValue(transform.m13(), CSSPr
imitiveValue::CSS_NUMBER)); | 753 transformValue->append(cssValuePool().createValue(transform.m13(), CSSPr
imitiveValue::CSS_NUMBER)); |
754 transformValue->append(cssValuePool().createValue(transform.m14(), CSSPr
imitiveValue::CSS_NUMBER)); | 754 transformValue->append(cssValuePool().createValue(transform.m14(), CSSPr
imitiveValue::CSS_NUMBER)); |
755 | 755 |
756 transformValue->append(cssValuePool().createValue(transform.m21(), CSSPr
imitiveValue::CSS_NUMBER)); | 756 transformValue->append(cssValuePool().createValue(transform.m21(), CSSPr
imitiveValue::CSS_NUMBER)); |
757 transformValue->append(cssValuePool().createValue(transform.m22(), CSSPr
imitiveValue::CSS_NUMBER)); | 757 transformValue->append(cssValuePool().createValue(transform.m22(), CSSPr
imitiveValue::CSS_NUMBER)); |
758 transformValue->append(cssValuePool().createValue(transform.m23(), CSSPr
imitiveValue::CSS_NUMBER)); | 758 transformValue->append(cssValuePool().createValue(transform.m23(), CSSPr
imitiveValue::CSS_NUMBER)); |
759 transformValue->append(cssValuePool().createValue(transform.m24(), CSSPr
imitiveValue::CSS_NUMBER)); | 759 transformValue->append(cssValuePool().createValue(transform.m24(), CSSPr
imitiveValue::CSS_NUMBER)); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 | 932 |
933 RefPtr<CSSValueList> shadersList = CSSValueList::createSpaceSeparate
d(); | 933 RefPtr<CSSValueList> shadersList = CSSValueList::createSpaceSeparate
d(); |
934 if (program->vertexShader()) | 934 if (program->vertexShader()) |
935 shadersList->append(program->vertexShader()->cssValue()); | 935 shadersList->append(program->vertexShader()->cssValue()); |
936 else | 936 else |
937 shadersList->append(cssValuePool().createIdentifierValue(CSSValu
eNone)); | 937 shadersList->append(cssValuePool().createIdentifierValue(CSSValu
eNone)); |
938 | 938 |
939 const CustomFilterProgramMixSettings mixSettings = program->mixSetti
ngs(); | 939 const CustomFilterProgramMixSettings mixSettings = program->mixSetti
ngs(); |
940 if (program->fragmentShader()) { | 940 if (program->fragmentShader()) { |
941 if (program->programType() == PROGRAM_TYPE_BLENDS_ELEMENT_TEXTUR
E) { | 941 if (program->programType() == PROGRAM_TYPE_BLENDS_ELEMENT_TEXTUR
E) { |
942 RefPtr<WebKitCSSMixFunctionValue> mixFunction = WebKitCSSMix
FunctionValue::create(); | 942 RefPtr<CSSMixFunctionValue> mixFunction = CSSMixFunctionValu
e::create(); |
943 mixFunction->append(program->fragmentShader()->cssValue()); | 943 mixFunction->append(program->fragmentShader()->cssValue()); |
944 mixFunction->append(cssValuePool().createValue(mixSettings.b
lendMode)); | 944 mixFunction->append(cssValuePool().createValue(mixSettings.b
lendMode)); |
945 mixFunction->append(cssValuePool().createValue(mixSettings.c
ompositeOperator)); | 945 mixFunction->append(cssValuePool().createValue(mixSettings.c
ompositeOperator)); |
946 shadersList->append(mixFunction.release()); | 946 shadersList->append(mixFunction.release()); |
947 } else | 947 } else |
948 shadersList->append(program->fragmentShader()->cssValue()); | 948 shadersList->append(program->fragmentShader()->cssValue()); |
949 } | 949 } |
950 else | 950 else |
951 shadersList->append(cssValuePool().createIdentifierValue(CSSValu
eNone)); | 951 shadersList->append(cssValuePool().createIdentifierValue(CSSValu
eNone)); |
952 | 952 |
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2988 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 2988 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
2989 CSSPropertyB
ackgroundClip }; | 2989 CSSPropertyB
ackgroundClip }; |
2990 | 2990 |
2991 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 2991 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
2992 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); | 2992 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); |
2993 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); | 2993 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); |
2994 return list.release(); | 2994 return list.release(); |
2995 } | 2995 } |
2996 | 2996 |
2997 } // namespace WebCore | 2997 } // namespace WebCore |
OLD | NEW |