Title: [152102] trunk/Source/WebKit/blackberry
Revision
152102
Author
commit-qu...@webkit.org
Date
2013-06-27 09:32:52 -0700 (Thu, 27 Jun 2013)

Log Message

[BlackBerry] We should clear all markers when input changes a word
https://bugs.webkit.org/show_bug.cgi?id=118136
JIRA115313.

For the case where a letter is added to the middle of a misspelled word, we were
sending incorrect offsets to clear spelling markers. However, since this
expanded the current word, it overlaps entirely the previous spelling marker so
no issue is found. However, if the keypress is backspace, the incorrect range
is smaller, causing an overlap which recreates the marker over the last character.
Setting shouldEraseMarkersAfterChangeSelection to follow continuous spell checking,
which will clear all markers regardless of overlap.
This patch also sustains spelling markers after the user taps to move the caret onto
the word, which is a nice gain as it was asked for previously.

Patch by Nima Ghanavatian <nghanavat...@blackberry.com> on 2013-06-27
Reviewed by Rob Buis.

Internally Reviewed by Mike Fenton

* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (152101 => 152102)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-06-27 16:19:09 UTC (rev 152101)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-06-27 16:32:52 UTC (rev 152102)
@@ -1,3 +1,26 @@
+2013-06-27  Nima Ghanavatian  <nghanavat...@blackberry.com>
+
+        [BlackBerry] We should clear all markers when input changes a word
+        https://bugs.webkit.org/show_bug.cgi?id=118136
+        JIRA115313.
+
+        For the case where a letter is added to the middle of a misspelled word, we were
+        sending incorrect offsets to clear spelling markers. However, since this
+        expanded the current word, it overlaps entirely the previous spelling marker so
+        no issue is found. However, if the keypress is backspace, the incorrect range
+        is smaller, causing an overlap which recreates the marker over the last character.
+        Setting shouldEraseMarkersAfterChangeSelection to follow continuous spell checking,
+        which will clear all markers regardless of overlap.
+        This patch also sustains spelling markers after the user taps to move the caret onto
+        the word, which is a nice gain as it was asked for previously.
+
+        Reviewed by Rob Buis.
+
+        Internally Reviewed by Mike Fenton
+
+        * WebCoreSupport/EditorClientBlackBerry.cpp:
+        (WebCore::EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection):
+
 2013-06-26  Carlos Garcia Campos  <cargar...@blackberry.com>
 
         [BlackBerry] Handle testRunner.setCustomPolicyDelegate()

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp (152101 => 152102)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp	2013-06-27 16:19:09 UTC (rev 152101)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp	2013-06-27 16:32:52 UTC (rev 152102)
@@ -550,7 +550,8 @@
 
 bool EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection(TextCheckingType) const
 {
-    return true;
+    const Frame* frame = m_webPagePrivate->focusedOrMainFrame();
+    return !frame || !frame->settings() || (!frame->settings()->asynchronousSpellCheckingEnabled() && !frame->settings()->unifiedTextCheckerEnabled());
 }
 
 void EditorClientBlackBerry::ignoreWordInSpellDocument(const WTF::String&)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to