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

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

Issue 1491023003: Refactor SVGAnimatedLength negative values mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace SVGLengthNegativeValuesMode enum with bool Created 5 years 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, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "platform/LengthFunctions.h" 56 #include "platform/LengthFunctions.h"
57 #include "platform/geometry/FloatRect.h" 57 #include "platform/geometry/FloatRect.h"
58 #include "platform/transforms/AffineTransform.h" 58 #include "platform/transforms/AffineTransform.h"
59 #include "wtf/StdLibExtras.h" 59 #include "wtf/StdLibExtras.h"
60 60
61 namespace blink { 61 namespace blink {
62 62
63 inline SVGSVGElement::SVGSVGElement(Document& doc) 63 inline SVGSVGElement::SVGSVGElement(Document& doc)
64 : SVGGraphicsElement(SVGNames::svgTag, doc) 64 : SVGGraphicsElement(SVGNames::svgTag, doc)
65 , SVGFitToViewBox(this) 65 , SVGFitToViewBox(this)
66 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width), AllowNegativeLengths)) 66 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width)))
67 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height), AllowNegativeLengths)) 67 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height)))
68 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width), ForbidNegativeLengths)) 68 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width)))
69 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height), ForbidNegativeLengths)) 69 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height)))
70 , m_useCurrentView(false) 70 , m_useCurrentView(false)
71 , m_timeContainer(SMILTimeContainer::create(*this)) 71 , m_timeContainer(SMILTimeContainer::create(*this))
72 , m_translation(SVGPoint::create()) 72 , m_translation(SVGPoint::create())
73 { 73 {
74 m_width->setDefaultValueAsString("100%"); 74 m_width->setDefaultValueAsString("100%");
75 m_height->setDefaultValueAsString("100%"); 75 m_height->setDefaultValueAsString("100%");
76 76
77 addToPropertyMap(m_x); 77 addToPropertyMap(m_x);
78 addToPropertyMap(m_y); 78 addToPropertyMap(m_y);
79 addToPropertyMap(m_width); 79 addToPropertyMap(m_width);
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 visitor->trace(m_width); 772 visitor->trace(m_width);
773 visitor->trace(m_height); 773 visitor->trace(m_height);
774 visitor->trace(m_translation); 774 visitor->trace(m_translation);
775 visitor->trace(m_timeContainer); 775 visitor->trace(m_timeContainer);
776 visitor->trace(m_viewSpec); 776 visitor->trace(m_viewSpec);
777 SVGGraphicsElement::trace(visitor); 777 SVGGraphicsElement::trace(visitor);
778 SVGFitToViewBox::trace(visitor); 778 SVGFitToViewBox::trace(visitor);
779 } 779 }
780 780
781 } // namespace blink 781 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRectElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698