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

Side by Side Diff: Source/core/layout/svg/LayoutSVGResourceFilter.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) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 PassRefPtrWillBeRawPtr<SVGFilterBuilder> LayoutSVGResourceFilter::buildPrimitive s(SVGFilter* filter) 80 PassRefPtrWillBeRawPtr<SVGFilterBuilder> LayoutSVGResourceFilter::buildPrimitive s(SVGFilter* filter)
81 { 81 {
82 SVGFilterElement* filterElement = toSVGFilterElement(element()); 82 SVGFilterElement* filterElement = toSVGFilterElement(element());
83 FloatRect targetBoundingBox = filter->targetBoundingBox(); 83 FloatRect targetBoundingBox = filter->targetBoundingBox();
84 84
85 // Add effects to the builder 85 // Add effects to the builder
86 RefPtrWillBeRawPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(Sour ceGraphic::create(filter), SourceAlpha::create(filter)); 86 RefPtrWillBeRawPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(Sour ceGraphic::create(filter), SourceAlpha::create(filter));
87 for (SVGElement* element = Traversal<SVGElement>::firstChild(*filterElement) ; element; element = Traversal<SVGElement>::nextSibling(*element)) { 87 for (SVGElement* element = Traversal<SVGElement>::firstChild(*filterElement) ; element; element = Traversal<SVGElement>::nextSibling(*element)) {
88 if (!element->isFilterEffect() || !element->renderer()) 88 if (!element->isFilterEffect() || !element->layoutObject())
89 continue; 89 continue;
90 90
91 SVGFilterPrimitiveStandardAttributes* effectElement = static_cast<SVGFil terPrimitiveStandardAttributes*>(element); 91 SVGFilterPrimitiveStandardAttributes* effectElement = static_cast<SVGFil terPrimitiveStandardAttributes*>(element);
92 RefPtrWillBeRawPtr<FilterEffect> effect = effectElement->build(builder.g et(), filter); 92 RefPtrWillBeRawPtr<FilterEffect> effect = effectElement->build(builder.g et(), filter);
93 if (!effect) { 93 if (!effect) {
94 builder->clearEffects(); 94 builder->clearEffects();
95 return nullptr; 95 return nullptr;
96 } 96 }
97 builder->appendEffectToEffectReferences(effect, effectElement->renderer( )); 97 builder->appendEffectToEffectReferences(effect, effectElement->layoutObj ect());
98 effectElement->setStandardAttributes(effect.get()); 98 effectElement->setStandardAttributes(effect.get());
99 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->cur rentValue()->enumValue(), targetBoundingBox)); 99 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->cur rentValue()->enumValue(), targetBoundingBox));
100 effect->setOperatingColorSpace( 100 effect->setOperatingColorSpace(
101 effectElement->renderer()->style()->svgStyle().colorInterpolationFil ters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB); 101 effectElement->layoutObject()->style()->svgStyle().colorInterpolatio nFilters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB);
102 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect); 102 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect);
103 } 103 }
104 return builder.release(); 104 return builder.release();
105 } 105 }
106 106
107 static GraphicsContext* beginRecordingContent(GraphicsContext* context, FilterDa ta* filterData) 107 static GraphicsContext* beginRecordingContent(GraphicsContext* context, FilterDa ta* filterData)
108 { 108 {
109 ASSERT(filterData->m_state == FilterData::Initial); 109 ASSERT(filterData->m_state == FilterData::Initial);
110 110
111 // For slimming paint we need to create a new context so the contents of the 111 // For slimming paint we need to create a new context so the contents of the
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return; 306 return;
307 builder->clearResultsRecursive(effect); 307 builder->clearResultsRecursive(effect);
308 308
309 // Issue paint invalidations for the image on the screen. 309 // Issue paint invalidations for the image on the screen.
310 markClientForInvalidation(it->key, PaintInvalidation); 310 markClientForInvalidation(it->key, PaintInvalidation);
311 } 311 }
312 markAllClientLayersForInvalidation(); 312 markAllClientLayersForInvalidation();
313 } 313 }
314 314
315 } 315 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceContainer.cpp ('k') | Source/core/layout/svg/LayoutSVGResourceMasker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698