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

Side by Side Diff: Source/WebCore/rendering/svg/RenderSVGRoot.cpp

Issue 11293229: Merge 132856 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp ('k') | no next file » | 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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 childPaintInfo.context->save(); 291 childPaintInfo.context->save();
292 292
293 // Apply initial viewport clip - not affected by overflow handling 293 // Apply initial viewport clip - not affected by overflow handling
294 childPaintInfo.context->clip(pixelSnappedIntRect(overflowClipRect(paintOffse t, paintInfo.renderRegion))); 294 childPaintInfo.context->clip(pixelSnappedIntRect(overflowClipRect(paintOffse t, paintInfo.renderRegion)));
295 295
296 // Convert from container offsets (html renderers) to a relative transform ( svg renderers). 296 // Convert from container offsets (html renderers) to a relative transform ( svg renderers).
297 // Transform from our paint container's coordinate system to our local coord s. 297 // Transform from our paint container's coordinate system to our local coord s.
298 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset); 298 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset);
299 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs et.x() - x(), adjustedPaintOffset.y() - y()) * localToParentTransform()); 299 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs et.x() - x(), adjustedPaintOffset.y() - y()) * localToParentTransform());
300 300
301 SVGRenderingContext renderingContext; 301 // SVGRenderingContext must be destroyed before we restore the childPaintInf o.context, because a filter may have
302 bool continueRendering = true; 302 // changed the context and it is only reverted when the SVGRenderingContext destructor finishes applying the filter.
303 if (childPaintInfo.phase == PaintPhaseForeground) { 303 {
304 renderingContext.prepareToRenderSVGContent(this, childPaintInfo); 304 SVGRenderingContext renderingContext;
305 continueRendering = renderingContext.isRenderingPrepared(); 305 bool continueRendering = true;
306 if (childPaintInfo.phase == PaintPhaseForeground) {
307 renderingContext.prepareToRenderSVGContent(this, childPaintInfo);
308 continueRendering = renderingContext.isRenderingPrepared();
309 }
310
311 if (continueRendering)
312 RenderBox::paint(childPaintInfo, LayoutPoint());
306 } 313 }
307 314
308 if (continueRendering)
309 RenderBox::paint(childPaintInfo, LayoutPoint());
310
311 childPaintInfo.context->restore(); 315 childPaintInfo.context->restore();
312 } 316 }
313 317
314 void RenderSVGRoot::willBeDestroyed() 318 void RenderSVGRoot::willBeDestroyed()
315 { 319 {
316 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*>(this)) ; 320 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*>(this)) ;
317 321
318 SVGResourcesCache::clientDestroyed(this); 322 SVGResourcesCache::clientDestroyed(this);
319 RenderReplaced::willBeDestroyed(); 323 RenderReplaced::willBeDestroyed();
320 } 324 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 while (svgRoot && !svgRoot->isSVGRoot()) 478 while (svgRoot && !svgRoot->isSVGRoot())
475 svgRoot = svgRoot->parent(); 479 svgRoot = svgRoot->parent();
476 if (!svgRoot) 480 if (!svgRoot)
477 return; 481 return;
478 static_cast<RenderSVGRoot*>(svgRoot)->m_resourcesNeedingToInvalidateClients. add(resource); 482 static_cast<RenderSVGRoot*>(svgRoot)->m_resourcesNeedingToInvalidateClients. add(resource);
479 } 483 }
480 484
481 } 485 }
482 486
483 #endif // ENABLE(SVG) 487 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698