Crash at WebCore::SVGUseElement::expandSymbolElementsInShadowTree
https://bugs.webkit.org/show_bug.cgi?id=77639
Patch by Stephen Chenney <schenney@chromium.org> on 2012-02-17
Reviewed by Nikolas Zimmermann.
Source/WebCore:
Fix a SVG crash in Release builds, although it still crashes in Debug builds.
The crash occurred when an SVG use element attempted to reference a style element while the file
contained an error causing the error banner to display. The fix is to prevent SVGUseElement
from recalculating style during tree building and return immediately when style is recalculated and
the tree is building.
Test: svg/custom/use-referencing-style-crash.svg
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::willRecalcStyle): Return false if the tree is being built.
(WebCore::SVGUseElement::didRecalcStyle): Check and return if the tree
is being built and we are not yet ready for style update.
LayoutTests:
Fix a SVG crash in Release builds, although it still crashes in Debug builds.
This test is to verify no crash in Release builds, while expectations/Skipped
are added for Debug builds. Bug 77764 tracks the Debug fix.
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* svg/custom/use-referencing-style-crash-expected.txt: Added.
* svg/custom/use-referencing-style-crash.svg: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108084
268f45cc-cd09-0410-ab3c-
d52691b4dbfc