Title: [148635] trunk/Source/WebKit/blackberry
- Revision
- 148635
- Author
- [email protected]
- Date
- 2013-04-17 14:14:08 -0700 (Wed, 17 Apr 2013)
Log Message
Clean up spellcheck state when changing focus.
https://bugs.webkit.org/show_bug.cgi?id=114758
Patch by Nima Ghanavatian <[email protected]> on 2013-04-17
Reviewed by Rob Buis.
Internally reviewed by Mike Fenton and Gen Mak.
PR325941
If we lose focus while waiting for a spellcheck request to return, we will
never see the reply and continue to queue up future requests. By clearing
the queue we ensure that all requests being processed and waiting to fire
are valid.
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::setElementUnfocused):
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (148634 => 148635)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-04-17 21:13:26 UTC (rev 148634)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-04-17 21:14:08 UTC (rev 148635)
@@ -1,3 +1,23 @@
+2013-04-17 Nima Ghanavatian <[email protected]>
+
+ Clean up spellcheck state when changing focus.
+ https://bugs.webkit.org/show_bug.cgi?id=114758
+
+ Reviewed by Rob Buis.
+
+ Internally reviewed by Mike Fenton and Gen Mak.
+
+ PR325941
+ If we lose focus while waiting for a spellcheck request to return, we will
+ never see the reply and continue to queue up future requests. By clearing
+ the queue we ensure that all requests being processed and waiting to fire
+ are valid.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::setElementUnfocused):
+ * WebKitSupport/SpellingHandler.cpp:
+ (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
+
2013-04-17 Tiancheng Jiang <[email protected]>
[BlackBerry] Check image node with usemap attribute isLink failed
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (148634 => 148635)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2013-04-17 21:13:26 UTC (rev 148634)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2013-04-17 21:14:08 UTC (rev 148635)
@@ -902,8 +902,12 @@
frameSelection->setFocused(true);
}
- m_spellingHandler->setSpellCheckActive(false);
- m_processingTransactionId = 0;
+ // Cancel any preexisting spellcheck requests.
+ if (m_request) {
+ stopPendingSpellCheckRequests();
+ m_request->didCancel();
+ m_request = 0;
+ }
// Clear the node details.
m_currentFocusElement = 0;
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SpellingHandler.cpp (148634 => 148635)
--- trunk/Source/WebKit/blackberry/WebKitSupport/SpellingHandler.cpp 2013-04-17 21:13:26 UTC (rev 148634)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SpellingHandler.cpp 2013-04-17 21:14:08 UTC (rev 148635)
@@ -43,6 +43,9 @@
void SpellingHandler::spellCheckTextBlock(const WebCore::VisibleSelection& visibleSelection, WebCore::TextCheckingProcessType textCheckingProcessType)
{
+ SpellingLog(Platform::LogLevelInfo, "SpellingHandler::spellCheckTextBlock received request of type %s",
+ textCheckingProcessType == TextCheckingProcessBatch ? "Batch" : "Incremental");
+
// Check if this request can be sent off in one message, or if it needs to be broken down.
RefPtr<Range> rangeForSpellChecking = visibleSelection.toNormalizedRange();
if (!rangeForSpellChecking || !rangeForSpellChecking->text() || !rangeForSpellChecking->text().length())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes