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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp

Issue 2912663002: Clean up creation of "detached" SVG* data type objects (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 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) 2014 Google, Inc. 4 * Copyright (C) 2014 Google, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 return GetLayoutObject()->ObjectBoundingBox(); 166 return GetLayoutObject()->ObjectBoundingBox();
167 } 167 }
168 168
169 SVGRectTearOff* SVGGraphicsElement::getBBoxFromJavascript() { 169 SVGRectTearOff* SVGGraphicsElement::getBBoxFromJavascript() {
170 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); 170 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
171 171
172 // FIXME: Eventually we should support getBBox for detached elements. 172 // FIXME: Eventually we should support getBBox for detached elements.
173 FloatRect boundingBox; 173 FloatRect boundingBox;
174 if (GetLayoutObject()) 174 if (GetLayoutObject())
175 boundingBox = GetBBox(); 175 boundingBox = GetBBox();
176 return SVGRectTearOff::Create(SVGRect::Create(boundingBox), 0, 176 return SVGRectTearOff::CreateDetached(boundingBox);
177 kPropertyIsNotAnimVal);
178 } 177 }
179 178
180 } // namespace blink 179 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGLengthTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698