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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 const EventListenerVector& entry = element->getEventListeners(eventNames
().loadEvent); | 450 const EventListenerVector& entry = element->getEventListeners(eventNames
().loadEvent); |
451 for (size_t i = 0; i < entry.size(); ++i) { | 451 for (size_t i = 0; i < entry.size(); ++i) { |
452 if (entry[i].useCapture) | 452 if (entry[i].useCapture) |
453 return true; | 453 return true; |
454 } | 454 } |
455 } | 455 } |
456 | 456 |
457 return false; | 457 return false; |
458 } | 458 } |
459 | 459 |
| 460 bool SVGElement::moveToFlowThreadIsNeeded(RefPtr<RenderStyle>& cachedStyle) |
| 461 { |
| 462 // Allow only svg root elements to be directly collected by a render flow th
read. |
| 463 return parentNode() && !parentNode()->isSVGElement() && hasTagName(SVGNames:
:svgTag) && Element::moveToFlowThreadIsNeeded(cachedStyle); |
| 464 } |
| 465 |
460 void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) | 466 void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) |
461 { | 467 { |
462 RefPtr<SVGElement> currentTarget = this; | 468 RefPtr<SVGElement> currentTarget = this; |
463 while (currentTarget && currentTarget->haveLoadedRequiredResources()) { | 469 while (currentTarget && currentTarget->haveLoadedRequiredResources()) { |
464 RefPtr<Element> parent; | 470 RefPtr<Element> parent; |
465 if (sendParentLoadEvents) | 471 if (sendParentLoadEvents) |
466 parent = currentTarget->parentOrShadowHostElement(); // save the nex
t parent to dispatch too incase dispatching the event changes the tree | 472 parent = currentTarget->parentOrShadowHostElement(); // save the nex
t parent to dispatch too incase dispatching the event changes the tree |
467 if (hasLoadListener(currentTarget.get())) | 473 if (hasLoadListener(currentTarget.get())) |
468 currentTarget->dispatchEvent(Event::create(eventNames().loadEvent, f
alse, false)); | 474 currentTarget->dispatchEvent(Event::create(eventNames().loadEvent, f
alse, false)); |
469 currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast
<SVGElement>(parent) : RefPtr<SVGElement>(); | 475 currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast
<SVGElement>(parent) : RefPtr<SVGElement>(); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 if (name == classAttr) | 741 if (name == classAttr) |
736 return isSVGStyledElement(); | 742 return isSVGStyledElement(); |
737 | 743 |
738 return animatableAttributes.contains(name); | 744 return animatableAttributes.contains(name); |
739 } | 745 } |
740 #endif | 746 #endif |
741 | 747 |
742 } | 748 } |
743 | 749 |
744 #endif // ENABLE(SVG) | 750 #endif // ENABLE(SVG) |
OLD | NEW |