OLD | NEW |
---|---|
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 Loading... | |
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 if (Attribute* orientAttribute = ensureUniqueElementData().attributes().find (SVGNames::orientAttr)) | |
fs
2016/02/19 10:33:13
This will not do the right thing if this method is
Shanmuga Pandi
2016/02/19 11:30:29
Yes. you are right.. I got it..
In case 'orient' a
fs
2016/02/19 12:38:35
Yes, calling setAttribute would be preferable to m
Shanmuga Pandi
2016/02/19 14:46:44
Acknowledged.
Shanmuga Pandi
2016/02/22 06:45:07
Done.
| |
120 orientAttribute->setValue("auto"); | |
rwlbuis
2016/02/17 22:38:02
Have you considered using setAttribute?
fs
2016/02/19 10:33:13
Using setAttribute would likely work fine in these
Shanmuga Pandi
2016/02/19 11:30:29
Hmm..
The part here "markerElement.orientType.bas
fs
2016/02/19 12:38:35
My point is that doing that will show the same iss
Shanmuga Pandi
2016/02/19 14:46:44
Yes. Copy-Paste problem... It will go through SVGA
| |
121 | |
119 m_orientAngle->baseValue()->orientType()->setEnumValue(SVGMarkerOrientAuto); | 122 m_orientAngle->baseValue()->orientType()->setEnumValue(SVGMarkerOrientAuto); |
120 invalidateSVGAttributes(); | 123 invalidateSVGAttributes(); |
121 svgAttributeBaseValChanged(SVGNames::orientAttr); | 124 svgAttributeBaseValChanged(SVGNames::orientAttr); |
122 } | 125 } |
123 | 126 |
124 void SVGMarkerElement::setOrientToAngle(PassRefPtrWillBeRawPtr<SVGAngleTearOff> angle) | 127 void SVGMarkerElement::setOrientToAngle(PassRefPtrWillBeRawPtr<SVGAngleTearOff> angle) |
125 { | 128 { |
126 ASSERT(angle); | 129 ASSERT(angle); |
127 RefPtrWillBeRawPtr<SVGAngle> target = angle->target(); | 130 RefPtrWillBeRawPtr<SVGAngle> target = angle->target(); |
131 if (Attribute* orientAttribute = ensureUniqueElementData().attributes().find (SVGNames::orientAttr)) | |
132 orientAttribute->setValue(AtomicString(target->valueAsString())); | |
133 | |
128 m_orientAngle->baseValue()->newValueSpecifiedUnits(target->unitType(), targe t->valueInSpecifiedUnits()); | 134 m_orientAngle->baseValue()->newValueSpecifiedUnits(target->unitType(), targe t->valueInSpecifiedUnits()); |
129 invalidateSVGAttributes(); | 135 invalidateSVGAttributes(); |
130 svgAttributeBaseValChanged(SVGNames::orientAttr); | 136 svgAttributeBaseValChanged(SVGNames::orientAttr); |
131 } | 137 } |
132 | 138 |
133 LayoutObject* SVGMarkerElement::createLayoutObject(const ComputedStyle&) | 139 LayoutObject* SVGMarkerElement::createLayoutObject(const ComputedStyle&) |
134 { | 140 { |
135 return new LayoutSVGResourceMarker(this); | 141 return new LayoutSVGResourceMarker(this); |
136 } | 142 } |
137 | 143 |
138 bool SVGMarkerElement::selfHasRelativeLengths() const | 144 bool SVGMarkerElement::selfHasRelativeLengths() const |
139 { | 145 { |
140 return m_refX->currentValue()->isRelative() | 146 return m_refX->currentValue()->isRelative() |
141 || m_refY->currentValue()->isRelative() | 147 || m_refY->currentValue()->isRelative() |
142 || m_markerWidth->currentValue()->isRelative() | 148 || m_markerWidth->currentValue()->isRelative() |
143 || m_markerHeight->currentValue()->isRelative(); | 149 || m_markerHeight->currentValue()->isRelative(); |
144 } | 150 } |
145 | 151 |
146 } // namespace blink | 152 } // namespace blink |
OLD | NEW |