OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "core/css/CSSCursorImageValue.h" | 44 #include "core/css/CSSCursorImageValue.h" |
45 #include "core/css/CSSDefaultStyleSheets.h" | 45 #include "core/css/CSSDefaultStyleSheets.h" |
46 #include "core/css/CSSFontFaceRule.h" | 46 #include "core/css/CSSFontFaceRule.h" |
47 #include "core/css/CSSFontSelector.h" | 47 #include "core/css/CSSFontSelector.h" |
48 #include "core/css/CSSImageSetValue.h" | 48 #include "core/css/CSSImageSetValue.h" |
49 #include "core/css/CSSLineBoxContainValue.h" | 49 #include "core/css/CSSLineBoxContainValue.h" |
50 #include "core/css/CSSPageRule.h" | 50 #include "core/css/CSSPageRule.h" |
51 #include "core/css/CSSParser.h" | 51 #include "core/css/CSSParser.h" |
52 #include "core/css/CSSPrimitiveValueMappings.h" | 52 #include "core/css/CSSPrimitiveValueMappings.h" |
53 #include "core/css/CSSReflectValue.h" | 53 #include "core/css/CSSReflectValue.h" |
| 54 #include "core/css/CSSSVGDocumentValue.h" |
54 #include "core/css/CSSSelector.h" | 55 #include "core/css/CSSSelector.h" |
55 #include "core/css/CSSSelectorList.h" | 56 #include "core/css/CSSSelectorList.h" |
| 57 #include "core/css/CSSShaderValue.h" |
56 #include "core/css/CSSStyleRule.h" | 58 #include "core/css/CSSStyleRule.h" |
57 #include "core/css/CSSSupportsRule.h" | 59 #include "core/css/CSSSupportsRule.h" |
58 #include "core/css/CSSTimingFunctionValue.h" | 60 #include "core/css/CSSTimingFunctionValue.h" |
59 #include "core/css/CSSValueList.h" | 61 #include "core/css/CSSValueList.h" |
60 #include "core/css/CSSVariableValue.h" | 62 #include "core/css/CSSVariableValue.h" |
61 #include "core/css/Counter.h" | 63 #include "core/css/Counter.h" |
62 #include "core/css/DeprecatedStyleBuilder.h" | 64 #include "core/css/DeprecatedStyleBuilder.h" |
63 #include "core/css/ElementRuleCollector.h" | 65 #include "core/css/ElementRuleCollector.h" |
64 #include "core/css/FontFeatureValue.h" | 66 #include "core/css/FontFeatureValue.h" |
65 #include "core/css/FontValue.h" | 67 #include "core/css/FontValue.h" |
66 #include "core/css/MediaList.h" | 68 #include "core/css/MediaList.h" |
67 #include "core/css/MediaQueryEvaluator.h" | 69 #include "core/css/MediaQueryEvaluator.h" |
68 #include "core/css/PageRuleCollector.h" | 70 #include "core/css/PageRuleCollector.h" |
69 #include "core/css/Pair.h" | 71 #include "core/css/Pair.h" |
70 #include "core/css/Rect.h" | 72 #include "core/css/Rect.h" |
71 #include "core/css/RuleSet.h" | 73 #include "core/css/RuleSet.h" |
72 #include "core/css/SelectorCheckerFastPath.h" | 74 #include "core/css/SelectorCheckerFastPath.h" |
73 #include "core/css/ShadowValue.h" | 75 #include "core/css/ShadowValue.h" |
74 #include "core/css/StylePropertySet.h" | 76 #include "core/css/StylePropertySet.h" |
75 #include "core/css/StylePropertyShorthand.h" | 77 #include "core/css/StylePropertyShorthand.h" |
76 #include "core/css/StyleRule.h" | 78 #include "core/css/StyleRule.h" |
77 #include "core/css/StyleRuleImport.h" | 79 #include "core/css/StyleRuleImport.h" |
78 #include "core/css/StyleSheetContents.h" | 80 #include "core/css/StyleSheetContents.h" |
79 #include "core/css/StyleSheetList.h" | 81 #include "core/css/StyleSheetList.h" |
80 #include "core/css/WebKitCSSKeyframeRule.h" | 82 #include "core/css/WebKitCSSKeyframeRule.h" |
81 #include "core/css/WebKitCSSKeyframesRule.h" | 83 #include "core/css/WebKitCSSKeyframesRule.h" |
82 #include "core/css/WebKitCSSMixFunctionValue.h" | |
83 #include "core/css/WebKitCSSRegionRule.h" | |
84 #include "core/css/WebKitCSSSVGDocumentValue.h" | |
85 #include "core/css/WebKitCSSShaderValue.h" | |
86 #include "core/css/resolver/FilterOperationResolver.h" | 84 #include "core/css/resolver/FilterOperationResolver.h" |
87 #include "core/css/resolver/StyleBuilder.h" | 85 #include "core/css/resolver/StyleBuilder.h" |
88 #include "core/css/resolver/TransformBuilder.h" | 86 #include "core/css/resolver/TransformBuilder.h" |
89 #include "core/css/resolver/ViewportStyleResolver.h" | 87 #include "core/css/resolver/ViewportStyleResolver.h" |
90 #include "core/dom/Attribute.h" | 88 #include "core/dom/Attribute.h" |
91 #include "core/dom/ContextFeatures.h" | 89 #include "core/dom/ContextFeatures.h" |
92 #include "core/dom/DocumentStyleSheetCollection.h" | 90 #include "core/dom/DocumentStyleSheetCollection.h" |
93 #include "core/dom/NodeRenderStyle.h" | 91 #include "core/dom/NodeRenderStyle.h" |
94 #include "core/dom/NodeRenderingContext.h" | 92 #include "core/dom/NodeRenderingContext.h" |
95 #include "core/dom/Text.h" | 93 #include "core/dom/Text.h" |
(...skipping 3531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3627 if (!state.style()->hasFilter() || state.pendingSVGDocuments().isEmpty()) | 3625 if (!state.style()->hasFilter() || state.pendingSVGDocuments().isEmpty()) |
3628 return; | 3626 return; |
3629 | 3627 |
3630 CachedResourceLoader* cachedResourceLoader = state.document()->cachedResourc
eLoader(); | 3628 CachedResourceLoader* cachedResourceLoader = state.document()->cachedResourc
eLoader(); |
3631 Vector<RefPtr<FilterOperation> >& filterOperations = state.style()->mutableF
ilter().operations(); | 3629 Vector<RefPtr<FilterOperation> >& filterOperations = state.style()->mutableF
ilter().operations(); |
3632 for (unsigned i = 0; i < filterOperations.size(); ++i) { | 3630 for (unsigned i = 0; i < filterOperations.size(); ++i) { |
3633 RefPtr<FilterOperation> filterOperation = filterOperations.at(i); | 3631 RefPtr<FilterOperation> filterOperation = filterOperations.at(i); |
3634 if (filterOperation->getOperationType() == FilterOperation::REFERENCE) { | 3632 if (filterOperation->getOperationType() == FilterOperation::REFERENCE) { |
3635 ReferenceFilterOperation* referenceFilter = static_cast<ReferenceFil
terOperation*>(filterOperation.get()); | 3633 ReferenceFilterOperation* referenceFilter = static_cast<ReferenceFil
terOperation*>(filterOperation.get()); |
3636 | 3634 |
3637 WebKitCSSSVGDocumentValue* value = state.pendingSVGDocuments().get(r
eferenceFilter); | 3635 CSSSVGDocumentValue* value = state.pendingSVGDocuments().get(referen
ceFilter); |
3638 if (!value) | 3636 if (!value) |
3639 continue; | 3637 continue; |
3640 CachedDocument* cachedDocument = value->load(cachedResourceLoader); | 3638 CachedDocument* cachedDocument = value->load(cachedResourceLoader); |
3641 if (!cachedDocument) | 3639 if (!cachedDocument) |
3642 continue; | 3640 continue; |
3643 | 3641 |
3644 // Stash the CachedDocument on the reference filter. | 3642 // Stash the CachedDocument on the reference filter. |
3645 referenceFilter->setCachedSVGDocumentReference(adoptPtr(new CachedSV
GDocumentReference(cachedDocument))); | 3643 referenceFilter->setCachedSVGDocumentReference(adoptPtr(new CachedSV
GDocumentReference(cachedDocument))); |
3646 } | 3644 } |
3647 } | 3645 } |
(...skipping 19 matching lines...) Expand all Loading... |
3667 // meaning that we get a new StyleCustomFilterProgram here that is n
ot yet in the cache, but already has loaded StyleShaders. | 3665 // meaning that we get a new StyleCustomFilterProgram here that is n
ot yet in the cache, but already has loaded StyleShaders. |
3668 if (!program->hasPendingShaders() && program->inCache()) | 3666 if (!program->hasPendingShaders() && program->inCache()) |
3669 continue; | 3667 continue; |
3670 if (!m_customFilterProgramCache) | 3668 if (!m_customFilterProgramCache) |
3671 m_customFilterProgramCache = adoptPtr(new StyleCustomFilterProgr
amCache()); | 3669 m_customFilterProgramCache = adoptPtr(new StyleCustomFilterProgr
amCache()); |
3672 RefPtr<StyleCustomFilterProgram> styleProgram = m_customFilterProgra
mCache->lookup(program); | 3670 RefPtr<StyleCustomFilterProgram> styleProgram = m_customFilterProgra
mCache->lookup(program); |
3673 if (styleProgram.get()) | 3671 if (styleProgram.get()) |
3674 customFilter->setProgram(styleProgram.release()); | 3672 customFilter->setProgram(styleProgram.release()); |
3675 else { | 3673 else { |
3676 if (program->vertexShader() && program->vertexShader()->isPendin
gShader()) { | 3674 if (program->vertexShader() && program->vertexShader()->isPendin
gShader()) { |
3677 WebKitCSSShaderValue* shaderValue = static_cast<StylePending
Shader*>(program->vertexShader())->cssShaderValue(); | 3675 CSSShaderValue* shaderValue = static_cast<StylePendingShader
*>(program->vertexShader())->cssShaderValue(); |
3678 program->setVertexShader(shaderValue->cachedShader(cachedRes
ourceLoader)); | 3676 program->setVertexShader(shaderValue->cachedShader(cachedRes
ourceLoader)); |
3679 } | 3677 } |
3680 if (program->fragmentShader() && program->fragmentShader()->isPe
ndingShader()) { | 3678 if (program->fragmentShader() && program->fragmentShader()->isPe
ndingShader()) { |
3681 WebKitCSSShaderValue* shaderValue = static_cast<StylePending
Shader*>(program->fragmentShader())->cssShaderValue(); | 3679 CSSShaderValue* shaderValue = static_cast<StylePendingShader
*>(program->fragmentShader())->cssShaderValue(); |
3682 program->setFragmentShader(shaderValue->cachedShader(cachedR
esourceLoader)); | 3680 program->setFragmentShader(shaderValue->cachedShader(cachedR
esourceLoader)); |
3683 } | 3681 } |
3684 m_customFilterProgramCache->add(program); | 3682 m_customFilterProgramCache->add(program); |
3685 } | 3683 } |
3686 } | 3684 } |
3687 } | 3685 } |
3688 m_state.setHasPendingShaders(false); | 3686 m_state.setHasPendingShaders(false); |
3689 } | 3687 } |
3690 | 3688 |
3691 PassRefPtr<StyleImage> StyleResolver::loadPendingImage(StylePendingImage* pendin
gImage) | 3689 PassRefPtr<StyleImage> StyleResolver::loadPendingImage(StylePendingImage* pendin
gImage) |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3860 info.addMember(m_state, "state"); | 3858 info.addMember(m_state, "state"); |
3861 | 3859 |
3862 // FIXME: move this to a place where it would be called only once? | 3860 // FIXME: move this to a place where it would be called only once? |
3863 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); | 3861 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); |
3864 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); | 3862 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); |
3865 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); | 3863 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); |
3866 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); | 3864 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); |
3867 } | 3865 } |
3868 | 3866 |
3869 } // namespace WebCore | 3867 } // namespace WebCore |
OLD | NEW |