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, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) | 865 void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) |
866 { | 866 { |
867 RefPtr<SVGElement> currentTarget = this; | 867 RefPtr<SVGElement> currentTarget = this; |
868 while (currentTarget && currentTarget->haveLoadedRequiredResources()) { | 868 while (currentTarget && currentTarget->haveLoadedRequiredResources()) { |
869 RefPtr<Element> parent; | 869 RefPtr<Element> parent; |
870 if (sendParentLoadEvents) | 870 if (sendParentLoadEvents) |
871 parent = currentTarget->parentOrShadowHostElement(); // save the nex
t parent to dispatch too incase dispatching the event changes the tree | 871 parent = currentTarget->parentOrShadowHostElement(); // save the nex
t parent to dispatch too incase dispatching the event changes the tree |
872 if (hasLoadListener(currentTarget.get())) | 872 if (hasLoadListener(currentTarget.get())) |
873 currentTarget->dispatchEvent(Event::create(EventTypeNames::load)); | 873 currentTarget->dispatchEvent(Event::create(EventTypeNames::load)); |
874 currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast
<SVGElement>(parent) : RefPtr<SVGElement>(); | 874 currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast
<SVGElement>(parent) : RefPtr<SVGElement>(); |
875 SVGElement* element = toSVGElement(currentTarget.get()); | 875 SVGElement* element = currentTarget.get(); |
876 if (!element || !element->isOutermostSVGSVGElement()) | 876 if (!element || !element->isOutermostSVGSVGElement()) |
877 continue; | 877 continue; |
878 | 878 |
879 // Consider <svg onload="foo()"><image xlink:href="foo.png" externalReso
urcesRequired="true"/></svg>. | 879 // Consider <svg onload="foo()"><image xlink:href="foo.png" externalReso
urcesRequired="true"/></svg>. |
880 // If foo.png is not yet loaded, the first SVGLoad event will go to the
<svg> element, sent through | 880 // If foo.png is not yet loaded, the first SVGLoad event will go to the
<svg> element, sent through |
881 // Document::implicitClose(). Then the SVGLoad event will fire for <imag
e>, once its loaded. | 881 // Document::implicitClose(). Then the SVGLoad event will fire for <imag
e>, once its loaded. |
882 ASSERT(sendParentLoadEvents); | 882 ASSERT(sendParentLoadEvents); |
883 | 883 |
884 // If the load event was not sent yet by Document::implicitClose(), but
the <image> from the example | 884 // If the load event was not sent yet by Document::implicitClose(), but
the <image> from the example |
885 // above, just appeared, don't send the SVGLoad event to the outermost <
svg>, but wait for the document | 885 // above, just appeared, don't send the SVGLoad event to the outermost <
svg>, but wait for the document |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 } | 1167 } |
1168 | 1168 |
1169 if (name == classAttr) | 1169 if (name == classAttr) |
1170 return true; | 1170 return true; |
1171 | 1171 |
1172 return animatableAttributes.contains(name); | 1172 return animatableAttributes.contains(name); |
1173 } | 1173 } |
1174 #endif | 1174 #endif |
1175 | 1175 |
1176 } | 1176 } |
OLD | NEW |