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

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

Issue 1317563010: Drop SVGElement::getBoundingBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« Source/core/dom/Element.cpp ('K') | « Source/core/svg/SVGElement.h ('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, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 return *emptyInstances; 494 return *emptyInstances;
495 } 495 }
496 496
497 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& SVGElement::instanc esForElement() const 497 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& SVGElement::instanc esForElement() const
498 { 498 {
499 if (!hasSVGRareData()) 499 if (!hasSVGRareData())
500 return emptyInstances(); 500 return emptyInstances();
501 return svgRareData()->elementInstances(); 501 return svgRareData()->elementInstances();
502 } 502 }
503 503
504 bool SVGElement::getBoundingBox(FloatRect& rect)
505 {
506 if (!isSVGGraphicsElement())
507 return false;
508
509 rect = toSVGGraphicsElement(this)->getBBox();
510 return true;
511 }
512
513 void SVGElement::setCursorElement(SVGCursorElement* cursorElement) 504 void SVGElement::setCursorElement(SVGCursorElement* cursorElement)
514 { 505 {
515 SVGElementRareData* rareData = ensureSVGRareData(); 506 SVGElementRareData* rareData = ensureSVGRareData();
516 if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) { 507 if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) {
517 if (cursorElement == oldCursorElement) 508 if (cursorElement == oldCursorElement)
518 return; 509 return;
519 oldCursorElement->removeReferencedElement(this); 510 oldCursorElement->removeReferencedElement(this);
520 } 511 }
521 rareData->setCursorElement(cursorElement); 512 rareData->setCursorElement(cursorElement);
522 } 513 }
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 Element::trace(visitor); 1156 Element::trace(visitor);
1166 } 1157 }
1167 1158
1168 const AtomicString& SVGElement::eventParameterName() 1159 const AtomicString& SVGElement::eventParameterName()
1169 { 1160 {
1170 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral)); 1161 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con structFromLiteral));
1171 return evtString; 1162 return evtString;
1172 } 1163 }
1173 1164
1174 } // namespace blink 1165 } // namespace blink
OLDNEW
« Source/core/dom/Element.cpp ('K') | « Source/core/svg/SVGElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698