[BlackBerry] Optimize spellchecking by coalescing messages
authornghanavatian@rim.com <nghanavatian@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2013 19:48:17 +0000 (19:48 +0000)
committernghanavatian@rim.com <nghanavatian@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2013 19:48:17 +0000 (19:48 +0000)
commit4e7aa69e505eca85fb0a36269963250f38c4f86d
tree8fb2e687a5c289af18088931bb1dec2a9b00a54b
parent89b3c80d4dd1122599aa944adf50f8490c1b8bef
[BlackBerry] Optimize spellchecking by coalescing messages
https://bugs.webkit.org/show_bug.cgi?id=107707

Reviewed by Rob Buis.

PR233604
Instead of taking chunks one line at a time, coalesce them together
to fire off messages as close to our character limit as possible.
This should dramatically reduce the total number of messages in email
giving us a little performance bump.

Internally reviewed by Mike Fenton and Gen Mak.

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
(DOMSupport):
* WebKitSupport/DOMSupport.h:
* WebKitSupport/InputHandler.cpp:
* WebKitSupport/InputHandler.h:
(InputHandler):
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
(BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
(BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
* WebKitSupport/SpellingHandler.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140562 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/InputHandler.h
Source/WebKit/blackberry/WebKitSupport/SpellingHandler.cpp
Source/WebKit/blackberry/WebKitSupport/SpellingHandler.h