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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGUseElement.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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp ('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, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 static SVGUseEventSender& svgUseLoadEventSender() 49 static SVGUseEventSender& svgUseLoadEventSender()
50 { 50 {
51 DEFINE_STATIC_LOCAL(SVGUseEventSender, sharedLoadEventSender, (EventTypeName s::load)); 51 DEFINE_STATIC_LOCAL(SVGUseEventSender, sharedLoadEventSender, (EventTypeName s::load));
52 return sharedLoadEventSender; 52 return sharedLoadEventSender;
53 } 53 }
54 54
55 inline SVGUseElement::SVGUseElement(Document& document) 55 inline SVGUseElement::SVGUseElement(Document& document)
56 : SVGGraphicsElement(SVGNames::useTag, document) 56 : SVGGraphicsElement(SVGNames::useTag, document)
57 , SVGURIReference(this) 57 , SVGURIReference(this)
58 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width), AllowNegativeLengths)) 58 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width)))
59 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height), AllowNegativeLengths)) 59 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height)))
60 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width), ForbidNegativeLengths)) 60 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width)))
61 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height), ForbidNegativeLengths)) 61 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height)))
62 , m_haveFiredLoadEvent(false) 62 , m_haveFiredLoadEvent(false)
63 , m_needsShadowTreeRecreation(false) 63 , m_needsShadowTreeRecreation(false)
64 { 64 {
65 ASSERT(hasCustomStyleCallbacks()); 65 ASSERT(hasCustomStyleCallbacks());
66 66
67 addToPropertyMap(m_x); 67 addToPropertyMap(m_x);
68 addToPropertyMap(m_y); 68 addToPropertyMap(m_y);
69 addToPropertyMap(m_width); 69 addToPropertyMap(m_width);
70 addToPropertyMap(m_height); 70 addToPropertyMap(m_height);
71 } 71 }
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 817
818 if (m_resource) 818 if (m_resource)
819 m_resource->removeClient(this); 819 m_resource->removeClient(this);
820 820
821 m_resource = resource; 821 m_resource = resource;
822 if (m_resource) 822 if (m_resource)
823 m_resource->addClient(this); 823 m_resource->addClient(this);
824 } 824 }
825 825
826 } 826 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698