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

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

Issue 1082723002: Don't consider the viewBox in SVGSVGElement::selfHasRelativeLengths() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove 'hasAttribute(SVGNames::viewBoxAttr)' on 'selfHasRelativeLengths()'. Created 5 years, 8 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
« no previous file with comments | « no previous file | 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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 Google, Inc. 5 * Copyright (C) 2014 Google, Inc.
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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 ASSERT(std::isfinite(seconds)); 602 ASSERT(std::isfinite(seconds));
603 seconds = max(seconds, 0.0f); 603 seconds = max(seconds, 0.0f);
604 m_timeContainer->setElapsed(seconds); 604 m_timeContainer->setElapsed(seconds);
605 } 605 }
606 606
607 bool SVGSVGElement::selfHasRelativeLengths() const 607 bool SVGSVGElement::selfHasRelativeLengths() const
608 { 608 {
609 return m_x->currentValue()->isRelative() 609 return m_x->currentValue()->isRelative()
610 || m_y->currentValue()->isRelative() 610 || m_y->currentValue()->isRelative()
611 || m_width->currentValue()->isRelative() 611 || m_width->currentValue()->isRelative()
612 || m_height->currentValue()->isRelative() 612 || m_height->currentValue()->isRelative();
613 || hasAttribute(SVGNames::viewBoxAttr);
614 } 613 }
615 614
616 FloatRect SVGSVGElement::currentViewBoxRect() const 615 FloatRect SVGSVGElement::currentViewBoxRect() const
617 { 616 {
618 if (m_useCurrentView) 617 if (m_useCurrentView)
619 return m_viewSpec ? m_viewSpec->viewBox()->currentValue()->value() : Flo atRect(); 618 return m_viewSpec ? m_viewSpec->viewBox()->currentValue()->value() : Flo atRect();
620 619
621 FloatRect useViewBox = viewBox()->currentValue()->value(); 620 FloatRect useViewBox = viewBox()->currentValue()->value();
622 if (!useViewBox.isEmpty()) 621 if (!useViewBox.isEmpty())
623 return useViewBox; 622 return useViewBox;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 visitor->trace(m_width); 780 visitor->trace(m_width);
782 visitor->trace(m_height); 781 visitor->trace(m_height);
783 visitor->trace(m_translation); 782 visitor->trace(m_translation);
784 visitor->trace(m_timeContainer); 783 visitor->trace(m_timeContainer);
785 visitor->trace(m_viewSpec); 784 visitor->trace(m_viewSpec);
786 SVGGraphicsElement::trace(visitor); 785 SVGGraphicsElement::trace(visitor);
787 SVGFitToViewBox::trace(visitor); 786 SVGFitToViewBox::trace(visitor);
788 } 787 }
789 788
790 } // namespace blink 789 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698