Add pending resource even if others are pending
authorpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2012 18:24:01 +0000 (18:24 +0000)
committerpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2012 18:24:01 +0000 (18:24 +0000)
commit40d9a1f8368c90f218312c704aa3d02465280406
treea7f1f59c923661eb75c99301fe12399dc18fc7af
parentaafa50b7c870057d6ff91561cadb2f0144beb205
Add pending resource even if others are pending
https://bugs.webkit.org/show_bug.cgi?id=89633

Reviewed by Dirk Schulze.

Source/WebCore:

An element can have multiple simultaneous pending resources but some of
this code was legacy, before the hasPendingResource()->hasPendingResources()
change (r105573). This patch continues adding a pending resource even if
there are other pending resources. In some cases, this can lead to marking
a resource as pending twice but the performance impact of that is negligible.

Other than SVGUseElement, SVGTrefElement and SVGFEImageElement are also
changed. These elements are unaffected because they can only have
a single resource at the moment (href), with other Style url() references
being handled by their parent containers.

Tests: svg/custom/use-multiple-pending-resources-expected.svg
       svg/custom/use-multiple-pending-resources.svg

* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::buildPendingResource):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::detachTarget):
(WebCore::SVGTRefElement::buildPendingResource):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::buildPendingResource):

LayoutTests:

* svg/custom/use-multiple-pending-resources-expected.svg: Added.
* svg/custom/use-multiple-pending-resources.svg: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/custom/use-multiple-pending-resources-expected.svg [new file with mode: 0644]
LayoutTests/svg/custom/use-multiple-pending-resources.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGFEImageElement.cpp
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/svg/SVGUseElement.cpp