A workaround fix for Issue 6971. This is a workaround for Issue 6971 "Chrome crashes if Javascript dynamically clears an input field while user attempts to type Korean into that field." To prevent this crash, this code verifies if the parent nodes of an IME composition node exist and are editable before updating the composition node.
A workaround fix for Issue 6971.
This is a workaround for Issue 6971 "Chrome crashes if Javascript dynamically clears an input field while user attempts to type Korean into that field."
To prevent this crash, this code verifies if the parent nodes of an IME composition node exist and are editable before updating the composition node.

This change also changes an Editor::completeComposition() call to an Editor::setComposition() call to emulate the behavior of Safari. It seems Safari calls the Editor::setComposition() function when it cancels an ongoing composition.
Review URL: http://codereview.chromium.org/19619

git-svn-id: http://src.chromium.org/svn/trunk/src@9208 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: a9ce2d21aef52c0d9da6402894a611c67a3057bb
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser