Title: [152369] trunk
- Revision
- 152369
- Author
- [email protected]
- Date
- 2013-07-03 11:06:00 -0700 (Wed, 03 Jul 2013)
Log Message
WebTextCheckerClient doesn't initialize output arguments.
https://bugs.webkit.org/show_bug.cgi?id=83683
Patch by Simon Pena <[email protected]> on 2013-07-03
Reviewed by Martin Robinson.
Source/WebKit2:
Callers of checkSpellingOfString and checkGrammarOfString expect
certain default values when no misspelled (or bad grammar) string
is found. They try to do that by initialising the reply arguments
that go into the IPC calls, but these values are ultimately ignored (see
HandleMessage.h, where the replyArguments are declared).
In the past, this seems to have led to various issues, (see
TextCheckingHelper::findFirstMisspelling in TextCheckingHelper.cpp),
where these return values are asserted and checked to be in the right range.
This patch initialises the values, so even if no available client
implements the methods (or if the implementation forgets to do it) the callers
will have their expected output.
However, and for a general case, we probably need a way to tell the caller
that any existing value in the output arguments will be ignored.
* UIProcess/WebTextCheckerClient.cpp:
(WebKit::WebTextCheckerClient::checkSpellingOfString):
(WebKit::WebTextCheckerClient::checkGrammarOfString):
LayoutTests:
Unskip editing/pasteboard/pasting-empty-html-falls-back-to-text.html, which no longer
crashes after the fix.
* platform/gtk-wk2/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (152368 => 152369)
--- trunk/LayoutTests/ChangeLog 2013-07-03 17:45:15 UTC (rev 152368)
+++ trunk/LayoutTests/ChangeLog 2013-07-03 18:06:00 UTC (rev 152369)
@@ -1,3 +1,15 @@
+2013-07-03 Simon Pena <[email protected]>
+
+ WebTextCheckerClient doesn't initialize output arguments.
+ https://bugs.webkit.org/show_bug.cgi?id=83683
+
+ Reviewed by Martin Robinson.
+
+ Unskip editing/pasteboard/pasting-empty-html-falls-back-to-text.html, which no longer
+ crashes after the fix.
+
+ * platform/gtk-wk2/TestExpectations:
+
2013-07-03 Gabor Abraham <[email protected]>
[Qt] Unreviewed gardening. Skipping test to paint the debug bot green.
Modified: trunk/LayoutTests/platform/gtk-wk2/TestExpectations (152368 => 152369)
--- trunk/LayoutTests/platform/gtk-wk2/TestExpectations 2013-07-03 17:45:15 UTC (rev 152368)
+++ trunk/LayoutTests/platform/gtk-wk2/TestExpectations 2013-07-03 18:06:00 UTC (rev 152369)
@@ -229,8 +229,6 @@
webkit.org/b/116974 accessibility/title-ui-element-correctness.html [ Crash ]
-webkit.org/b/83683 [ Debug ] editing/pasteboard/pasting-empty-html-falls-back-to-text.html [ Crash ]
-
webkit.org/b/108363 fullscreen/full-screen-iframe-legacy.html [ Crash ]
# EventSender's contextClick should return objects that implements click() method
Modified: trunk/Source/WebKit2/ChangeLog (152368 => 152369)
--- trunk/Source/WebKit2/ChangeLog 2013-07-03 17:45:15 UTC (rev 152368)
+++ trunk/Source/WebKit2/ChangeLog 2013-07-03 18:06:00 UTC (rev 152369)
@@ -1,3 +1,31 @@
+2013-07-03 Simon Pena <[email protected]>
+
+ WebTextCheckerClient doesn't initialize output arguments.
+ https://bugs.webkit.org/show_bug.cgi?id=83683
+
+ Reviewed by Martin Robinson.
+
+ Callers of checkSpellingOfString and checkGrammarOfString expect
+ certain default values when no misspelled (or bad grammar) string
+ is found. They try to do that by initialising the reply arguments
+ that go into the IPC calls, but these values are ultimately ignored (see
+ HandleMessage.h, where the replyArguments are declared).
+
+ In the past, this seems to have led to various issues, (see
+ TextCheckingHelper::findFirstMisspelling in TextCheckingHelper.cpp),
+ where these return values are asserted and checked to be in the right range.
+
+ This patch initialises the values, so even if no available client
+ implements the methods (or if the implementation forgets to do it) the callers
+ will have their expected output.
+
+ However, and for a general case, we probably need a way to tell the caller
+ that any existing value in the output arguments will be ignored.
+
+ * UIProcess/WebTextCheckerClient.cpp:
+ (WebKit::WebTextCheckerClient::checkSpellingOfString):
+ (WebKit::WebTextCheckerClient::checkGrammarOfString):
+
2013-07-03 Sergio Villar Senin <[email protected]>
[GTK][WK2] SIGSEV in WebKit::WebPageContextMenuClient::customContextMenuItemSelected
Modified: trunk/Source/WebKit2/UIProcess/WebTextCheckerClient.cpp (152368 => 152369)
--- trunk/Source/WebKit2/UIProcess/WebTextCheckerClient.cpp 2013-07-03 17:45:15 UTC (rev 152368)
+++ trunk/Source/WebKit2/UIProcess/WebTextCheckerClient.cpp 2013-07-03 18:06:00 UTC (rev 152369)
@@ -93,6 +93,9 @@
void WebTextCheckerClient::checkSpellingOfString(uint64_t tag, const String& text, int32_t& misspellingLocation, int32_t& misspellingLength)
{
+ misspellingLocation = -1;
+ misspellingLength = 0;
+
if (!m_client.checkSpellingOfString)
return;
@@ -101,6 +104,9 @@
void WebTextCheckerClient::checkGrammarOfString(uint64_t tag, const String& text, Vector<WebCore::GrammarDetail>& grammarDetails, int32_t& badGrammarLocation, int32_t& badGrammarLength)
{
+ badGrammarLocation = -1;
+ badGrammarLength = 0;
+
if (!m_client.checkGrammarOfString)
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes