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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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) 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 documentResourceReferences->remove(filterOperation); 68 documentResourceReferences->remove(filterOperation);
69 } 69 }
70 70
71 // Returns whether or not the SVGElement object contains a valid color-interpola tion-filters attribute 71 // Returns whether or not the SVGElement object contains a valid color-interpola tion-filters attribute
72 static bool getSVGElementColorSpace(SVGElement* svgElement, ColorSpace& cs) 72 static bool getSVGElementColorSpace(SVGElement* svgElement, ColorSpace& cs)
73 { 73 {
74 if (!svgElement) 74 if (!svgElement)
75 return false; 75 return false;
76 76
77 const LayoutObject* renderer = svgElement->renderer(); 77 const LayoutObject* renderer = svgElement->layoutObject();
78 const LayoutStyle* style = renderer ? renderer->style() : 0; 78 const LayoutStyle* style = renderer ? renderer->style() : 0;
79 const SVGLayoutStyle* svgStyle = style ? &style->svgStyle() : 0; 79 const SVGLayoutStyle* svgStyle = style ? &style->svgStyle() : 0;
80 EColorInterpolation eColorInterpolation = CI_AUTO; 80 EColorInterpolation eColorInterpolation = CI_AUTO;
81 if (svgStyle) { 81 if (svgStyle) {
82 // If a layout has been performed, then we can use the fast path to get this attribute 82 // If a layout has been performed, then we can use the fast path to get this attribute
83 eColorInterpolation = svgStyle->colorInterpolationFilters(); 83 eColorInterpolation = svgStyle->colorInterpolationFilters();
84 } else if (!svgElement->presentationAttributeStyle()) { 84 } else if (!svgElement->presentationAttributeStyle()) {
85 return false; 85 return false;
86 } else { 86 } else {
87 // Otherwise, use the slow path by using string comparison (used by exte rnal svg files) 87 // Otherwise, use the slow path by using string comparison (used by exte rnal svg files)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->curr entValue()->enumValue(), parentFilter->sourceImageRect())); 166 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->curr entValue()->enumValue(), parentFilter->sourceImageRect()));
167 ColorSpace colorSpace = filterColorSpace; 167 ColorSpace colorSpace = filterColorSpace;
168 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS pace)) 168 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS pace))
169 effect->setOperatingColorSpace(colorSpace); 169 effect->setOperatingColorSpace(colorSpace);
170 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect); 170 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect);
171 } 171 }
172 return builder->lastEffect(); 172 return builder->lastEffect();
173 } 173 }
174 174
175 } // namespace blink 175 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGText.cpp ('k') | Source/core/layout/svg/SVGLayoutTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698