[BlackBerry] Appropriately handle word wrapping in SpellingHandler
authornghanavatian@rim.com <nghanavatian@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Feb 2013 23:15:42 +0000 (23:15 +0000)
committernghanavatian@rim.com <nghanavatian@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Feb 2013 23:15:42 +0000 (23:15 +0000)
commit3f0d53c8fdf77e5cf0e64a942bf7482f7a139955
tree4c1700833c1a84f467d1f605611b29e78341f307
parente4d4dc3b36b82bac61d928a2c73568d9d154f727
[BlackBerry] Appropriately handle word wrapping in SpellingHandler
https://bugs.webkit.org/show_bug.cgi?id=110253

Reviewed by Rob Buis.

PR286001
Since we traverse through text by visual lines instead of blocks, word wrapping causes some
bad behavior. Changing the way we traverse text to jump by words instead of lines. This will
mean it takes longer to finish spellchecking, but the removal of any loops allows webkit
processing to continue. This gives priority to user actions while still completing a large
paragraph in a reasonable amount of time.

Internally reviewed by Mike Fenton

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::requestCheckingOfString):
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
(BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
(BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
(BlackBerry::WebKit::SpellingHandler::startOfNextWord):
(WebKit):
(BlackBerry::WebKit::SpellingHandler::incrementByWord):
(BlackBerry::WebKit::SpellingHandler::doesWordWrap):
* WebKitSupport/SpellingHandler.h:
(SpellingHandler):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
Source/WebKit/blackberry/WebKitSupport/DOMSupport.h
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
Source/WebKit/blackberry/WebKitSupport/SpellingHandler.cpp
Source/WebKit/blackberry/WebKitSupport/SpellingHandler.h