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

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

Issue 11358200: Merge 132856 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 childPaintInfo.context->save(); 292 childPaintInfo.context->save();
293 293
294 // Apply initial viewport clip - not affected by overflow handling 294 // Apply initial viewport clip - not affected by overflow handling
295 childPaintInfo.context->clip(pixelSnappedIntRect(overflowClipRect(paintOffse t, paintInfo.renderRegion))); 295 childPaintInfo.context->clip(pixelSnappedIntRect(overflowClipRect(paintOffse t, paintInfo.renderRegion)));
296 296
297 // Convert from container offsets (html renderers) to a relative transform ( svg renderers). 297 // Convert from container offsets (html renderers) to a relative transform ( svg renderers).
298 // Transform from our paint container's coordinate system to our local coord s. 298 // Transform from our paint container's coordinate system to our local coord s.
299 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset); 299 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset);
300 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs et.x(), adjustedPaintOffset.y()) * localToBorderBoxTransform()); 300 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs et.x(), adjustedPaintOffset.y()) * localToBorderBoxTransform());
301 301
302 SVGRenderingContext renderingContext; 302 // SVGRenderingContext must be destroyed before we restore the childPaintInf o.context, because a filter may have
303 bool continueRendering = true; 303 // changed the context and it is only reverted when the SVGRenderingContext destructor finishes applying the filter.
304 if (childPaintInfo.phase == PaintPhaseForeground) { 304 {
305 renderingContext.prepareToRenderSVGContent(this, childPaintInfo); 305 SVGRenderingContext renderingContext;
306 continueRendering = renderingContext.isRenderingPrepared(); 306 bool continueRendering = true;
307 if (childPaintInfo.phase == PaintPhaseForeground) {
308 renderingContext.prepareToRenderSVGContent(this, childPaintInfo);
309 continueRendering = renderingContext.isRenderingPrepared();
310 }
311
312 if (continueRendering)
313 RenderBox::paint(childPaintInfo, LayoutPoint());
307 } 314 }
308 315
309 if (continueRendering)
310 RenderBox::paint(childPaintInfo, LayoutPoint());
311
312 childPaintInfo.context->restore(); 316 childPaintInfo.context->restore();
313 } 317 }
314 318
315 void RenderSVGRoot::willBeDestroyed() 319 void RenderSVGRoot::willBeDestroyed()
316 { 320 {
317 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*>(this)) ; 321 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*>(this)) ;
318 322
319 SVGResourcesCache::clientDestroyed(this); 323 SVGResourcesCache::clientDestroyed(this);
320 RenderReplaced::willBeDestroyed(); 324 RenderReplaced::willBeDestroyed();
321 } 325 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 while (svgRoot && !svgRoot->isSVGRoot()) 479 while (svgRoot && !svgRoot->isSVGRoot())
476 svgRoot = svgRoot->parent(); 480 svgRoot = svgRoot->parent();
477 if (!svgRoot) 481 if (!svgRoot)
478 return; 482 return;
479 static_cast<RenderSVGRoot*>(svgRoot)->m_resourcesNeedingToInvalidateClients. add(resource); 483 static_cast<RenderSVGRoot*>(svgRoot)->m_resourcesNeedingToInvalidateClients. add(resource);
480 } 484 }
481 485
482 } 486 }
483 487
484 #endif // ENABLE(SVG) 488 #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