| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 29 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 30 #include "core/XLinkNames.h" | 30 #include "core/XLinkNames.h" |
| 31 #include "core/dom/Document.h" | 31 #include "core/dom/Document.h" |
| 32 #include "core/dom/ElementTraversal.h" | 32 #include "core/dom/ElementTraversal.h" |
| 33 #include "core/events/Event.h" | 33 #include "core/events/Event.h" |
| 34 #include "core/dom/shadow/ElementShadow.h" | 34 #include "core/dom/shadow/ElementShadow.h" |
| 35 #include "core/dom/shadow/ShadowRoot.h" | 35 #include "core/dom/shadow/ShadowRoot.h" |
| 36 #include "core/fetch/FetchRequest.h" | 36 #include "core/fetch/FetchRequest.h" |
| 37 #include "core/fetch/ResourceFetcher.h" | 37 #include "core/fetch/ResourceFetcher.h" |
| 38 #include "core/rendering/svg/RenderSVGResource.h" | |
| 39 #include "core/rendering/svg/RenderSVGTransformableContainer.h" | 38 #include "core/rendering/svg/RenderSVGTransformableContainer.h" |
| 40 #include "core/svg/SVGGElement.h" | 39 #include "core/svg/SVGGElement.h" |
| 41 #include "core/svg/SVGLengthContext.h" | 40 #include "core/svg/SVGLengthContext.h" |
| 42 #include "core/svg/SVGSVGElement.h" | 41 #include "core/svg/SVGSVGElement.h" |
| 43 #include "core/xml/parser/XMLDocumentParser.h" | 42 #include "core/xml/parser/XMLDocumentParser.h" |
| 44 | 43 |
| 45 namespace blink { | 44 namespace blink { |
| 46 | 45 |
| 47 inline SVGUseElement::SVGUseElement(Document& document) | 46 inline SVGUseElement::SVGUseElement(Document& document) |
| 48 : SVGGraphicsElement(SVGNames::useTag, document) | 47 : SVGGraphicsElement(SVGNames::useTag, document) |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 if (attrName == SVGNames::xAttr | 183 if (attrName == SVGNames::xAttr |
| 185 || attrName == SVGNames::yAttr | 184 || attrName == SVGNames::yAttr |
| 186 || attrName == SVGNames::widthAttr | 185 || attrName == SVGNames::widthAttr |
| 187 || attrName == SVGNames::heightAttr) { | 186 || attrName == SVGNames::heightAttr) { |
| 188 updateRelativeLengthsInformation(); | 187 updateRelativeLengthsInformation(); |
| 189 if (m_targetElementInstance) { | 188 if (m_targetElementInstance) { |
| 190 ASSERT(m_targetElementInstance->correspondingElement()); | 189 ASSERT(m_targetElementInstance->correspondingElement()); |
| 191 transferUseWidthAndHeightIfNeeded(*this, m_targetElementInstance.get
(), *m_targetElementInstance->correspondingElement()); | 190 transferUseWidthAndHeightIfNeeded(*this, m_targetElementInstance.get
(), *m_targetElementInstance->correspondingElement()); |
| 192 } | 191 } |
| 193 if (renderer) | 192 if (renderer) |
| 194 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render
er); | 193 markForLayoutAndParentResourceInvalidation(renderer); |
| 195 return; | 194 return; |
| 196 } | 195 } |
| 197 | 196 |
| 198 if (SVGURIReference::isKnownAttribute(attrName)) { | 197 if (SVGURIReference::isKnownAttribute(attrName)) { |
| 199 bool isExternalReference = isExternalURIReference(hrefString(), document
()); | 198 bool isExternalReference = isExternalURIReference(hrefString(), document
()); |
| 200 if (isExternalReference) { | 199 if (isExternalReference) { |
| 201 KURL url = document().completeURL(hrefString()); | 200 KURL url = document().completeURL(hrefString()); |
| 202 if (url.hasFragmentIdentifier()) { | 201 if (url.hasFragmentIdentifier()) { |
| 203 FetchRequest request(ResourceRequest(url), localName()); | 202 FetchRequest request(ResourceRequest(url), localName()); |
| 204 setDocumentResource(document().fetcher()->fetchSVGDocument(reque
st)); | 203 setDocumentResource(document().fetcher()->fetchSVGDocument(reque
st)); |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 m_resource->addClient(this); | 750 m_resource->addClient(this); |
| 752 } | 751 } |
| 753 | 752 |
| 754 void SVGUseElement::trace(Visitor* visitor) | 753 void SVGUseElement::trace(Visitor* visitor) |
| 755 { | 754 { |
| 756 visitor->trace(m_targetElementInstance); | 755 visitor->trace(m_targetElementInstance); |
| 757 SVGGraphicsElement::trace(visitor); | 756 SVGGraphicsElement::trace(visitor); |
| 758 } | 757 } |
| 759 | 758 |
| 760 } | 759 } |
| OLD | NEW |