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

Side by Side Diff: Source/core/rendering/svg/ReferenceFilterBuilder.cpp

Issue 181713003: Have Document::accessSVGExtensions() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | Source/core/rendering/svg/RenderSVGResource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Inc. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Apple Inc. All rights reserved. 4 * Copyright (C) 2011 Apple Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 if (!document) 125 if (!document)
126 return nullptr; 126 return nullptr;
127 127
128 Element* filter = document->getElementById(filterOperation->fragment()); 128 Element* filter = document->getElementById(filterOperation->fragment());
129 129
130 if (!filter) { 130 if (!filter) {
131 // Although we did not find the referenced filter, it might exist later 131 // Although we did not find the referenced filter, it might exist later
132 // in the document 132 // in the document
133 document->accessSVGExtensions()->addPendingResource(filterOperation->fra gment(), toElement(renderer->node())); 133 document->accessSVGExtensions().addPendingResource(filterOperation->frag ment(), toElement(renderer->node()));
134 return nullptr; 134 return nullptr;
135 } 135 }
136 136
137 if (!filter->isSVGElement() || !filter->hasTagName(SVGNames::filterTag)) 137 if (!filter->isSVGElement() || !filter->hasTagName(SVGNames::filterTag))
138 return nullptr; 138 return nullptr;
139 139
140 SVGFilterElement* filterElement = toSVGFilterElement(toSVGElement(filter)); 140 SVGFilterElement* filterElement = toSVGFilterElement(toSVGElement(filter));
141 141
142 // FIXME: Figure out what to do with SourceAlpha. Right now, we're 142 // FIXME: Figure out what to do with SourceAlpha. Right now, we're
143 // using the alpha of the original input layer, which is obviously 143 // using the alpha of the original input layer, which is obviously
(...skipping 23 matching lines...) Expand all
167 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->cur rentValue()->enumValue(), parentFilter->sourceImageRect())); 167 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->cur rentValue()->enumValue(), parentFilter->sourceImageRect()));
168 ColorSpace colorSpace = filterColorSpace; 168 ColorSpace colorSpace = filterColorSpace;
169 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS pace)) 169 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS pace))
170 effect->setOperatingColorSpace(colorSpace); 170 effect->setOperatingColorSpace(colorSpace);
171 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect); 171 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect);
172 } 172 }
173 return builder->lastEffect(); 173 return builder->lastEffect();
174 } 174 }
175 175
176 } // namespace WebCore 176 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | Source/core/rendering/svg/RenderSVGResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698