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

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

Issue 1699893003: setOrientTo{Auto|Angle} should reflect on orient attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Align with review comments Created 4 years, 10 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 | « third_party/WebKit/LayoutTests/svg/markers/marker-orientation-set.html ('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 * 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 if (change.byParser) 110 if (change.byParser)
111 return; 111 return;
112 112
113 if (LayoutObject* object = layoutObject()) 113 if (LayoutObject* object = layoutObject())
114 object->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason: :ChildChanged); 114 object->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason: :ChildChanged);
115 } 115 }
116 116
117 void SVGMarkerElement::setOrientToAuto() 117 void SVGMarkerElement::setOrientToAuto()
118 { 118 {
119 m_orientAngle->baseValue()->orientType()->setEnumValue(SVGMarkerOrientAuto); 119 setAttribute(SVGNames::orientAttr, "auto");
120 invalidateSVGAttributes();
121 svgAttributeBaseValChanged(SVGNames::orientAttr);
122 } 120 }
123 121
124 void SVGMarkerElement::setOrientToAngle(PassRefPtrWillBeRawPtr<SVGAngleTearOff> angle) 122 void SVGMarkerElement::setOrientToAngle(PassRefPtrWillBeRawPtr<SVGAngleTearOff> angle)
125 { 123 {
126 ASSERT(angle); 124 ASSERT(angle);
127 RefPtrWillBeRawPtr<SVGAngle> target = angle->target(); 125 RefPtrWillBeRawPtr<SVGAngle> target = angle->target();
128 m_orientAngle->baseValue()->newValueSpecifiedUnits(target->unitType(), targe t->valueInSpecifiedUnits()); 126 setAttribute(SVGNames::orientAttr, AtomicString(target->valueAsString()));
129 invalidateSVGAttributes();
130 svgAttributeBaseValChanged(SVGNames::orientAttr);
131 } 127 }
132 128
133 LayoutObject* SVGMarkerElement::createLayoutObject(const ComputedStyle&) 129 LayoutObject* SVGMarkerElement::createLayoutObject(const ComputedStyle&)
134 { 130 {
135 return new LayoutSVGResourceMarker(this); 131 return new LayoutSVGResourceMarker(this);
136 } 132 }
137 133
138 bool SVGMarkerElement::selfHasRelativeLengths() const 134 bool SVGMarkerElement::selfHasRelativeLengths() const
139 { 135 {
140 return m_refX->currentValue()->isRelative() 136 return m_refX->currentValue()->isRelative()
141 || m_refY->currentValue()->isRelative() 137 || m_refY->currentValue()->isRelative()
142 || m_markerWidth->currentValue()->isRelative() 138 || m_markerWidth->currentValue()->isRelative()
143 || m_markerHeight->currentValue()->isRelative(); 139 || m_markerHeight->currentValue()->isRelative();
144 } 140 }
145 141
146 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/markers/marker-orientation-set.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698