OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 DocumentResourceReference* documentReference = referenceFilterOperation-
>documentResourceReference(); | 119 DocumentResourceReference* documentReference = referenceFilterOperation-
>documentResourceReference(); |
120 DocumentResource* cachedSVGDocument = documentReference ? documentRefere
nce->document() : 0; | 120 DocumentResource* cachedSVGDocument = documentReference ? documentRefere
nce->document() : 0; |
121 | 121 |
122 if (cachedSVGDocument) { | 122 if (cachedSVGDocument) { |
123 // Reference is external; wait for notifyFinished(). | 123 // Reference is external; wait for notifyFinished(). |
124 cachedSVGDocument->addClient(this); | 124 cachedSVGDocument->addClient(this); |
125 m_externalSVGReferences.append(cachedSVGDocument); | 125 m_externalSVGReferences.append(cachedSVGDocument); |
126 } else { | 126 } else { |
127 // Reference is internal; add layer as a client so we can trigger | 127 // Reference is internal; add layer as a client so we can trigger |
128 // filter repaint on SVG attribute change. | 128 // filter repaint on SVG attribute change. |
129 Element* filter = m_layer->renderer()->node()->document()->getElemen
tById(referenceFilterOperation->fragment()); | 129 Element* filter = m_layer->renderer()->node()->document().getElement
ById(referenceFilterOperation->fragment()); |
130 if (!filter || !filter->hasTagName(SVGNames::filterTag)) | 130 if (!filter || !filter->hasTagName(SVGNames::filterTag)) |
131 continue; | 131 continue; |
132 toSVGFilterElement(filter)->addClientRenderLayer(m_layer); | 132 toSVGFilterElement(filter)->addClientRenderLayer(m_layer); |
133 m_internalSVGReferences.append(filter); | 133 m_internalSVGReferences.append(filter); |
134 } | 134 } |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 void RenderLayerFilterInfo::removeReferenceFilterClients() | 138 void RenderLayerFilterInfo::removeReferenceFilterClients() |
139 { | 139 { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 void RenderLayerFilterInfo::removeCustomFilterClients() | 178 void RenderLayerFilterInfo::removeCustomFilterClients() |
179 { | 179 { |
180 for (size_t i = 0; i < m_cachedCustomFilterPrograms.size(); ++i) | 180 for (size_t i = 0; i < m_cachedCustomFilterPrograms.size(); ++i) |
181 m_cachedCustomFilterPrograms.at(i)->removeClient(this); | 181 m_cachedCustomFilterPrograms.at(i)->removeClient(this); |
182 m_cachedCustomFilterPrograms.clear(); | 182 m_cachedCustomFilterPrograms.clear(); |
183 } | 183 } |
184 | 184 |
185 } // namespace WebCore | 185 } // namespace WebCore |
186 | 186 |
OLD | NEW |