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 * 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 { | 143 { |
144 // Gracefully handle error condition. | 144 // Gracefully handle error condition. |
145 if (!resourceIsValid()) | 145 if (!resourceIsValid()) |
146 return nullptr; | 146 return nullptr; |
147 ASSERT(m_resource->document()); | 147 ASSERT(m_resource->document()); |
148 return m_resource->document(); | 148 return m_resource->document(); |
149 } | 149 } |
150 | 150 |
151 static void transferUseWidthAndHeightIfNeeded(const SVGUseElement& use, SVGEleme
nt& shadowElement, const SVGElement& originalElement) | 151 static void transferUseWidthAndHeightIfNeeded(const SVGUseElement& use, SVGEleme
nt& shadowElement, const SVGElement& originalElement) |
152 { | 152 { |
153 DEFINE_STATIC_LOCAL(const AtomicString, hundredPercentString, ("100%", Atomi
cString::ConstructFromLiteral)); | 153 DEFINE_STATIC_LOCAL(const AtomicString, hundredPercentString, ("100%")); |
154 // Use |originalElement| for checking the element type, because we will | 154 // Use |originalElement| for checking the element type, because we will |
155 // have replaced a <symbol> with an <svg> in the instance tree. | 155 // have replaced a <symbol> with an <svg> in the instance tree. |
156 if (isSVGSymbolElement(originalElement)) { | 156 if (isSVGSymbolElement(originalElement)) { |
157 // Spec (<use> on <symbol>): This generated 'svg' will always have | 157 // Spec (<use> on <symbol>): This generated 'svg' will always have |
158 // explicit values for attributes width and height. If attributes | 158 // explicit values for attributes width and height. If attributes |
159 // width and/or height are provided on the 'use' element, then these | 159 // width and/or height are provided on the 'use' element, then these |
160 // attributes will be transferred to the generated 'svg'. If attributes | 160 // attributes will be transferred to the generated 'svg'. If attributes |
161 // width and/or height are not specified, the generated 'svg' element | 161 // width and/or height are not specified, the generated 'svg' element |
162 // will use values of 100% for these attributes. | 162 // will use values of 100% for these attributes. |
163 shadowElement.setAttribute(SVGNames::widthAttr, | 163 shadowElement.setAttribute(SVGNames::widthAttr, |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 | 751 |
752 if (m_resource) | 752 if (m_resource) |
753 m_resource->removeClient(this); | 753 m_resource->removeClient(this); |
754 | 754 |
755 m_resource = resource; | 755 m_resource = resource; |
756 if (m_resource) | 756 if (m_resource) |
757 m_resource->addClient(this); | 757 m_resource->addClient(this); |
758 } | 758 } |
759 | 759 |
760 } // namespace blink | 760 } // namespace blink |
OLD | NEW |