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

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

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@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. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "core/layout/svg/SVGResourcesCache.h" 42 #include "core/layout/svg/SVGResourcesCache.h"
43 #include "core/svg/SVGElement.h" 43 #include "core/svg/SVGElement.h"
44 #include "platform/geometry/TransformState.h" 44 #include "platform/geometry/TransformState.h"
45 45
46 namespace blink { 46 namespace blink {
47 47
48 static inline LayoutRect enclosingIntRectIfNotEmpty(const FloatRect& rect) 48 static inline LayoutRect enclosingIntRectIfNotEmpty(const FloatRect& rect)
49 { 49 {
50 if (rect.isEmpty()) 50 if (rect.isEmpty())
51 return LayoutRect(); 51 return LayoutRect();
52 return enclosingIntRect(rect); 52 return LayoutRect(enclosingIntRect(rect));
53 } 53 }
54 54
55 LayoutRect SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(const Layou tObject* object, const LayoutBoxModelObject* paintInvalidationContainer, const P aintInvalidationState* paintInvalidationState) 55 LayoutRect SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(const Layou tObject* object, const LayoutBoxModelObject* paintInvalidationContainer, const P aintInvalidationState* paintInvalidationState)
56 { 56 {
57 // Return early for any cases where we don't actually paint 57 // Return early for any cases where we don't actually paint
58 if (object->style()->visibility() != VISIBLE && !object->enclosingLayer()->h asVisibleContent()) 58 if (object->style()->visibility() != VISIBLE && !object->enclosingLayer()->h asVisibleContent())
59 return LayoutRect(); 59 return LayoutRect();
60 60
61 // Pass our local paint rect to computeRectForPaintInvalidation() which will 61 // Pass our local paint rect to computeRectForPaintInvalidation() which will
62 // map to parent coords and recurse up the parent chain. 62 // map to parent coords and recurse up the parent chain.
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 510
511 layer = layer->parent(); 511 layer = layer->parent();
512 } 512 }
513 513
514 ctm.scale(deviceScaleFactor); 514 ctm.scale(deviceScaleFactor);
515 515
516 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(), 2)) / 2)); 516 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(), 2)) / 2));
517 } 517 }
518 518
519 } 519 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | Source/core/layout/svg/line/SVGInlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698