-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=111894 Patch by Arpita Bahuguna <a.bah@samsung.com> on 2013-03-28 Reviewed by Ryosuke Niwa. Source/WebCore: There is a crash when trying to click/select an anonymous renderer. This is a regression due to r143313 which tries to add border/padding to the computed caret rect in RenderBox::localCaretRect(). The patch calls on the node() method for the corresponding renderer. For an anonymous renderer though, node() returns null. Since no check had been added for this, a crash occurs when caret rect for an anonymous renderer is being computed. Test: editing/selection/click-on-anonymous-content-crash.html * rendering/RenderBox.cpp: (WebCore::RenderBox::localCaretRect): Added a check for validating the return from the node() call. LayoutTests: * editing/selection/click-on-anonymous-content-crash-expected.txt: Added. * editing/selection/click-on-anonymous-content-crash.html: Added. Added a testcase for verifying that no crash occurs when trying to select/click an anonymous renderer, in this case the list marker's renderer. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4d884b29