Log Message
REGRESSION: Spellcheck tests hit assertions on Mac. https://bugs.webkit.org/show_bug.cgi?id=80883
Reviewed by Ryosuke Niwa. Source/WebKit/mac: The bug was caused by the closure object created in requestCheckingOfString accessing request's member variables even though the request object is not an NSObject or allocated in stack. This resulted in the closure not being able to access those variables when invoked. Fixed the bug by making local copies of those member variables. * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::requestCheckingOfString): LayoutTests: Some words used in spellcheck-paste.js are considered as correct spellings in Mac's spellchecker. This patch changes them into 'zz' so that Mac's spellchecker can make them as misspelling. * editing/spelling/script-tests/spellcheck-paste.js: (pasteAndVerify.trial): (pasteAndVerify): (tests): * editing/spelling/spellcheck-paste-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (110545 => 110546)
--- trunk/LayoutTests/ChangeLog 2012-03-13 08:27:14 UTC (rev 110545)
+++ trunk/LayoutTests/ChangeLog 2012-03-13 08:38:38 UTC (rev 110546)
@@ -1,3 +1,19 @@
+2012-03-13 Shinya Kawanaka <[email protected]>
+
+ REGRESSION: Spellcheck tests hit assertions on Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=80883
+
+ Reviewed by Ryosuke Niwa.
+
+ Some words used in spellcheck-paste.js are considered as correct spellings in Mac's spellchecker.
+ This patch changes them into 'zz' so that Mac's spellchecker can make them as misspelling.
+
+ * editing/spelling/script-tests/spellcheck-paste.js:
+ (pasteAndVerify.trial):
+ (pasteAndVerify):
+ (tests):
+ * editing/spelling/spellcheck-paste-expected.txt:
+
2012-03-12 Nikolas Zimmermann <[email protected]>
SVG Animations update baseVal instead of animVal
Modified: trunk/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js (110545 => 110546)
--- trunk/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js 2012-03-13 08:27:14 UTC (rev 110545)
+++ trunk/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js 2012-03-13 08:38:38 UTC (rev 110546)
@@ -18,11 +18,11 @@
testRoot.appendChild(testEditable);
var testSourcePlain = document.createElement("div");
-testSourcePlain.innerHTML = "foo bar";
+testSourcePlain.innerHTML = "zz apple";
testRoot.appendChild(testSourcePlain);
var testSourceDecorated = document.createElement("div");
-testSourceDecorated.innerHTML = "fo<b>o ba</b>r";
+testSourceDecorated.innerHTML = "z<b>z appl</b>e";
testRoot.appendChild(testSourceDecorated);
var testSourceMulti = document.createElement("div");
@@ -83,7 +83,7 @@
nretry--;
if (0 == nretry) {
- testFailed(dest.tagName + " should have a marker on for '" + source.innerHTML + "'");
+ testFailed(dest.tagName + " should have a marker on '" + source.innerHTML + "'");
done();
return;
}
@@ -97,14 +97,16 @@
if (window.layoutTestController)
layoutTestController.setAsynchronousSpellCheckingEnabled(true);
-tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [[0, 3]]); });
-tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [[0, 3]]); });
+tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [[0, 2]]); });
+tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [[0, 2]]); });
tests.push(function() { pasteAndVerify(testSourceMulti, testInput, [[0, 2], [3, 2]]); });
-tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [[0, 3]]); });
-tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [[0, 3]]); });
+
+tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [[0, 2]]); });
+tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [[0, 2]]); });
tests.push(function() { pasteAndVerify(testSourceMulti, testTextArea, [[0, 2], [3, 2]]); });
-tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [[0, 3]]); });
-tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [[0, 2]]); }); // To check "fo" part of foo.
+
+tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [[0, 2]]); });
+tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [[0, 1]]); }); // To check "fo" part of foo.
tests.push(function() { pasteAndVerify(testSourceMulti, testEditable, [[0, 2], [3, 2]]); });
done();
Modified: trunk/LayoutTests/editing/spelling/spellcheck-paste-expected.txt (110545 => 110546)
--- trunk/LayoutTests/editing/spelling/spellcheck-paste-expected.txt 2012-03-13 08:27:14 UTC (rev 110545)
+++ trunk/LayoutTests/editing/spelling/spellcheck-paste-expected.txt 2012-03-13 08:38:38 UTC (rev 110546)
@@ -6,13 +6,13 @@
PASS successfullyParsed is true
TEST COMPLETE
-PASS INPUT has a marker on 'foo bar'
-PASS INPUT has a marker on 'fo<b>o ba</b>r'
+PASS INPUT has a marker on 'zz apple'
+PASS INPUT has a marker on 'z<b>z appl</b>e'
PASS INPUT has a marker on 'zz zz zz'
-PASS TEXTAREA has a marker on 'foo bar'
-PASS TEXTAREA has a marker on 'fo<b>o ba</b>r'
+PASS TEXTAREA has a marker on 'zz apple'
+PASS TEXTAREA has a marker on 'z<b>z appl</b>e'
PASS TEXTAREA has a marker on 'zz zz zz'
-PASS DIV has a marker on 'foo bar'
-PASS DIV has a marker on 'fo<b>o ba</b>r'
+PASS DIV has a marker on 'zz apple'
+PASS DIV has a marker on 'z<b>z appl</b>e'
PASS DIV has a marker on 'zz zz zz'
Modified: trunk/Source/WebKit/mac/ChangeLog (110545 => 110546)
--- trunk/Source/WebKit/mac/ChangeLog 2012-03-13 08:27:14 UTC (rev 110545)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-03-13 08:38:38 UTC (rev 110546)
@@ -1,3 +1,19 @@
+2012-03-13 Shinya Kawanaka <[email protected]>
+
+ REGRESSION: Spellcheck tests hit assertions on Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=80883
+
+ Reviewed by Ryosuke Niwa.
+
+ The bug was caused by the closure object created in requestCheckingOfString accessing
+ request's member variables even though the request object is not an NSObject or allocated
+ in stack. This resulted in the closure not being able to access those variables when invoked.
+
+ Fixed the bug by making local copies of those member variables.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::requestCheckingOfString):
+
2012-03-11 Timothy Hatcher <[email protected]>
Update how the Web Inspector resources are loaded.
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (110545 => 110546)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2012-03-13 08:27:14 UTC (rev 110545)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2012-03-13 08:38:38 UTC (rev 110546)
@@ -977,10 +977,12 @@
#ifndef BUILDING_ON_LEOPARD
NSRange range = NSMakeRange(0, request.text().length());
NSRunLoop* currentLoop = [NSRunLoop currentRunLoop];
+ int sequence = request.sequence();
+ TextCheckingTypeMask types = request.mask();
[[NSSpellChecker sharedSpellChecker] requestCheckingOfString:request.text() range:range types:NSTextCheckingAllSystemTypes options:0 inSpellDocumentWithTag:0
completionHandler:^(NSInteger, NSArray* results, NSOrthography*, NSInteger) {
[currentLoop performSelector:@selector(perform)
- target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:request.sequence() types:request.mask() results:results] autorelease]
+ target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:sequence types:types results:results] autorelease]
argument:nil order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
}];
#endif
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
