2011-04-26 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Nikolas Zimmermann.
ASSERT failure in SVGUseElement
https://bugs.webkit.org/show_bug.cgi?id=59313
Test case to verify webkit doesn't crash when a <use> element
is pending on resource and the document is not well-formed.
Test passes if no crash occurs in debug mode.
* svg/custom/use-crash-in-non-wellformed-document-expected.txt: Added.
* svg/custom/use-crash-in-non-wellformed-document.svg: Added.
2011-04-26 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Nikolas Zimmermann.
ASSERT failure in SVGUseElement
https://bugs.webkit.org/show_bug.cgi?id=59313
In SVGUseElement::insertedIntoDocument(), ASSERT(!m_isPendingResource)
was wrong because the document may not be well-formed.
This patch asserts the element is not pending on resource or the
document is not well-formed.
Test: svg/custom/use-crash-in-non-wellformed-document.svg
* svg/SVGUseElement.cpp:
(WebCore::isWellFormedDocument):
(WebCore::SVGUseElement::insertedIntoDocument):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84899
268f45cc-cd09-0410-ab3c-
d52691b4dbfc