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

Side by Side Diff: Source/core/svg/SVGLocatable.cpp

Issue 19096011: Get rid of SVGRect special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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
« no previous file with comments | « Source/core/svg/SVGLocatable.h ('k') | Source/core/svg/SVGRect.h » ('j') | 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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2009 Google, Inc. All rights reserved. 4 * Copyright (C) 2009 Google, Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 { 54 {
55 ASSERT(element); 55 ASSERT(element);
56 SVGElement* farthest = 0; 56 SVGElement* farthest = 0;
57 for (Element* current = element->parentOrShadowHostElement(); current; curre nt = current->parentOrShadowHostElement()) { 57 for (Element* current = element->parentOrShadowHostElement(); current; curre nt = current->parentOrShadowHostElement()) {
58 if (isViewportElement(current)) 58 if (isViewportElement(current))
59 farthest = toSVGElement(current); 59 farthest = toSVGElement(current);
60 } 60 }
61 return farthest; 61 return farthest;
62 } 62 }
63 63
64 FloatRect SVGLocatable::getBBox(SVGElement* element, StyleUpdateStrategy styleUp dateStrategy) 64 SVGRect SVGLocatable::getBBox(SVGElement* element, StyleUpdateStrategy styleUpda teStrategy)
65 { 65 {
66 ASSERT(element); 66 ASSERT(element);
67 if (styleUpdateStrategy == AllowStyleUpdate) 67 if (styleUpdateStrategy == AllowStyleUpdate)
68 element->document()->updateLayoutIgnorePendingStylesheets(); 68 element->document()->updateLayoutIgnorePendingStylesheets();
69 69
70 // FIXME: Eventually we should support getBBox for detached elements. 70 // FIXME: Eventually we should support getBBox for detached elements.
71 if (!element->renderer()) 71 if (!element->renderer())
72 return FloatRect(); 72 return SVGRect();
73 73
74 return element->renderer()->objectBoundingBox(); 74 return element->renderer()->objectBoundingBox();
75 } 75 }
76 76
77 AffineTransform SVGLocatable::computeCTM(SVGElement* element, CTMScope mode, Sty leUpdateStrategy styleUpdateStrategy) 77 AffineTransform SVGLocatable::computeCTM(SVGElement* element, CTMScope mode, Sty leUpdateStrategy styleUpdateStrategy)
78 { 78 {
79 ASSERT(element); 79 ASSERT(element);
80 if (styleUpdateStrategy == AllowStyleUpdate) 80 if (styleUpdateStrategy == AllowStyleUpdate)
81 element->document()->updateLayoutIgnorePendingStylesheets(); 81 element->document()->updateLayoutIgnorePendingStylesheets();
82 82
(...skipping 25 matching lines...) Expand all
108 ec = InvalidStateError; 108 ec = InvalidStateError;
109 return ctm; 109 return ctm;
110 } 110 }
111 ctm = targetCTM.inverse() * ctm; 111 ctm = targetCTM.inverse() * ctm;
112 } 112 }
113 113
114 return ctm; 114 return ctm;
115 } 115 }
116 116
117 } 117 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGLocatable.h ('k') | Source/core/svg/SVGRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698