| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 return; | 320 return; |
| 321 clearShadowTree(); | 321 clearShadowTree(); |
| 322 cancelShadowTreeRecreation(); | 322 cancelShadowTreeRecreation(); |
| 323 if (!inShadowIncludingDocument()) | 323 if (!inShadowIncludingDocument()) |
| 324 return; | 324 return; |
| 325 Document* externalDocument = this->externalDocument(); | 325 Document* externalDocument = this->externalDocument(); |
| 326 if (isStructurallyExternal() && !externalDocument) | 326 if (isStructurallyExternal() && !externalDocument) |
| 327 return; | 327 return; |
| 328 | 328 |
| 329 AtomicString id; | 329 AtomicString id; |
| 330 Element* target = targetElementFromIRIString(hrefString(), treeScope(), &id,
externalDocument); | 330 Element* target = targetElementFromIRIString(hrefString(), treeScopeOrDocume
nt(), &id, externalDocument); |
| 331 if (!target || !target->inShadowIncludingDocument()) { | 331 if (!target || !target->inShadowIncludingDocument()) { |
| 332 // If we can't find the target of an external element, just give up. | 332 // If we can't find the target of an external element, just give up. |
| 333 // We can't observe if the target somewhen enters the external document,
nor should we do it. | 333 // We can't observe if the target somewhen enters the external document,
nor should we do it. |
| 334 if (externalDocument) | 334 if (externalDocument) |
| 335 return; | 335 return; |
| 336 if (id.isEmpty()) | 336 if (id.isEmpty()) |
| 337 return; | 337 return; |
| 338 | 338 |
| 339 document().accessSVGExtensions().addPendingResource(id, this); | 339 document().accessSVGExtensions().addPendingResource(id, this); |
| 340 ASSERT(hasPendingResources()); | 340 ASSERT(hasPendingResources()); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 void SVGUseElement::cloneNonMarkupEventListeners() | 546 void SVGUseElement::cloneNonMarkupEventListeners() |
| 547 { | 547 { |
| 548 for (SVGElement& element : Traversal<SVGElement>::descendantsOf(*userAgentSh
adowRoot())) { | 548 for (SVGElement& element : Traversal<SVGElement>::descendantsOf(*userAgentSh
adowRoot())) { |
| 549 if (EventTargetData* data = element.correspondingElement()->eventTargetD
ata()) | 549 if (EventTargetData* data = element.correspondingElement()->eventTargetD
ata()) |
| 550 data->eventListenerMap.copyEventListenersNotCreatedFromMarkupToTarge
t(&element); | 550 data->eventListenerMap.copyEventListenersNotCreatedFromMarkupToTarge
t(&element); |
| 551 } | 551 } |
| 552 } | 552 } |
| 553 | 553 |
| 554 bool SVGUseElement::hasCycleUseReferencing(const SVGUseElement& use, const Conta
inerNode& targetInstance, SVGElement*& newTarget) const | 554 bool SVGUseElement::hasCycleUseReferencing(const SVGUseElement& use, const Conta
inerNode& targetInstance, SVGElement*& newTarget) const |
| 555 { | 555 { |
| 556 Element* targetElement = targetElementFromIRIString(use.hrefString(), use.tr
eeScope()); | 556 Element* targetElement = targetElementFromIRIString(use.hrefString(), use.tr
eeScopeOrDocument()); |
| 557 newTarget = 0; | 557 newTarget = 0; |
| 558 if (targetElement && targetElement->isSVGElement()) | 558 if (targetElement && targetElement->isSVGElement()) |
| 559 newTarget = toSVGElement(targetElement); | 559 newTarget = toSVGElement(targetElement); |
| 560 | 560 |
| 561 if (!newTarget) | 561 if (!newTarget) |
| 562 return false; | 562 return false; |
| 563 | 563 |
| 564 // Shortcut for self-references | 564 // Shortcut for self-references |
| 565 if (newTarget == this) | 565 if (newTarget == this) |
| 566 return true; | 566 return true; |
| (...skipping 184 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 |