-
yuzo@google.com authored
Reviewed by Kent Tamura. Fix for Bug 52279 - WebCore::RenderBlock::updateFirstLetter crashes for anonymous blocks https://bugs.webkit.org/show_bug.cgi?id=52279 * fast/css/first-letter-anonymous-block-crash-expected.txt: Added. * fast/css/first-letter-anonymous-block-crash.html: Added. 2011-01-19 Yuzo Fujishima <yuzo@google.com> Reviewed by Kent Tamura. Fix for Bug 52279 - WebCore::RenderBlock::updateFirstLetter crashes for anonymous blocks https://bugs.webkit.org/show_bug.cgi?id=52279 In constructing text fragments to handle first-letter rule, first add the text for the non-first letters and then remove the original text, rather than the other way around. Otherwise, the text can be added to an anoymous block that is different from the original one. This breaks the assumption that a first letter render object has a non-null sibling for the non-first letters and causes a crash. Test: fast/css/first-letter-anonymous-block-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ab365cee