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

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

Issue 211193002: Compute correct repaint rect for decorated RenderSVGRoots (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase (adds additional TE conflict.) Created 6 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, 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 { 346 {
347 // Slightly optimized version of m_localToParentTransform = AffineTransform: :translation(x(), y()) * m_localToBorderBoxTransform; 347 // Slightly optimized version of m_localToParentTransform = AffineTransform: :translation(x(), y()) * m_localToBorderBoxTransform;
348 m_localToParentTransform = m_localToBorderBoxTransform; 348 m_localToParentTransform = m_localToBorderBoxTransform;
349 if (x()) 349 if (x())
350 m_localToParentTransform.setE(m_localToParentTransform.e() + roundToInt( x())); 350 m_localToParentTransform.setE(m_localToParentTransform.e() + roundToInt( x()));
351 if (y()) 351 if (y())
352 m_localToParentTransform.setF(m_localToParentTransform.f() + roundToInt( y())); 352 m_localToParentTransform.setF(m_localToParentTransform.f() + roundToInt( y()));
353 return m_localToParentTransform; 353 return m_localToParentTransform;
354 } 354 }
355 355
356 LayoutRect RenderSVGRoot::clippedOverflowRectForRepaint(const RenderLayerModelOb ject* repaintContainer) const
357 {
358 return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContaine r);
359 }
360
361 void RenderSVGRoot::computeFloatRectForRepaint(const RenderLayerModelObject* rep aintContainer, FloatRect& repaintRect, bool fixed) const 356 void RenderSVGRoot::computeFloatRectForRepaint(const RenderLayerModelObject* rep aintContainer, FloatRect& repaintRect, bool fixed) const
362 { 357 {
363 // Apply our local transforms (except for x/y translation), then our shadow, 358 // Apply our local transforms (except for x/y translation), then our shadow,
364 // and then call RenderBox's method to handle all the normal CSS Box model b its 359 // and then call RenderBox's method to handle all the normal CSS Box model b its
365 repaintRect = m_localToBorderBoxTransform.mapRect(repaintRect); 360 repaintRect = m_localToBorderBoxTransform.mapRect(repaintRect);
366 361
367 // Apply initial viewport clip - not affected by overflow settings 362 // Apply initial viewport clip - not affected by overflow settings
368 repaintRect.intersect(pixelSnappedBorderBoxRect()); 363 repaintRect.intersect(pixelSnappedBorderBoxRect());
369 364
370 LayoutRect rect = enclosingIntRect(repaintRect); 365 LayoutRect rect = enclosingIntRect(repaintRect);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 436
442 bool RenderSVGRoot::hasRelativeLogicalHeight() const 437 bool RenderSVGRoot::hasRelativeLogicalHeight() const
443 { 438 {
444 SVGSVGElement* svg = toSVGSVGElement(node()); 439 SVGSVGElement* svg = toSVGSVGElement(node());
445 ASSERT(svg); 440 ASSERT(svg);
446 441
447 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); 442 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent();
448 } 443 }
449 444
450 } 445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698