TextFieldInputType::handleBeforeTextInsertedEvent shouldn't use plainText
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 00:04:07 +0000 (00:04 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 00:04:07 +0000 (00:04 +0000)
commit0be2916a8b175d7b9b6d550d866f6b84ccefe793
tree2617d6c1af162e2aed081f565becec83b84f3436
parentfcf91cdbf3596d72276e43eb942147ab003afabc
TextFieldInputType::handleBeforeTextInsertedEvent shouldn't use plainText
https://bugs.webkit.org/show_bug.cgi?id=128953

Reviewed by Alexey Proskuryakov.

Don't use FrameSelection's toNormalizedRange and plainText. Instead, use the cached selection start and selection
end to extract the selected text. The caches are updated inside FrameSelection::setSelection whenever selection
is inside a text form control via HTMLTextFormControlElement::selectionChanged.

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/TextFieldInputType.cpp