Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: Source/core/rendering/RenderLayerFilterInfo.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698