Make "insertHTML" execCommand not to crash on TEXTAREA
This patch changes "insertHTML" execCommand on TEXTAREA not to crash when inserted HTML containing text. The root cause of issue 504886 is calling |plainText()| with null |Range| object in |ReplacementFragment| constructor. This null |Range| object is comes from |VisibleSelection::selectionFromContentsOfNode()| with HTML fragment without text content, e.g. "<b></b>", "<span>", and so on, which returns empty seleciton. BUG=504886 TEST=LayoutTests/editing/inserting/insert-html-to-textarea-crash.html Review URL: https://codereview.chromium.org/1219723004 git-svn-id: svn://svn.chromium.org/blink/trunk@198037 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment