Changeset 110546 in webkit
- Timestamp:
- Mar 13, 2012, 1:38:38 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/spelling/script-tests/spellcheck-paste.js (modified) (3 diffs)
-
LayoutTests/editing/spelling/spellcheck-paste-expected.txt (modified) (1 diff)
-
Source/WebKit/mac/ChangeLog (modified) (1 diff)
-
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r110545 r110546 1 2012-03-13 Shinya Kawanaka <shinyak@chromium.org> 2 3 REGRESSION: Spellcheck tests hit assertions on Mac. 4 https://bugs.webkit.org/show_bug.cgi?id=80883 5 6 Reviewed by Ryosuke Niwa. 7 8 Some words used in spellcheck-paste.js are considered as correct spellings in Mac's spellchecker. 9 This patch changes them into 'zz' so that Mac's spellchecker can make them as misspelling. 10 11 * editing/spelling/script-tests/spellcheck-paste.js: 12 (pasteAndVerify.trial): 13 (pasteAndVerify): 14 (tests): 15 * editing/spelling/spellcheck-paste-expected.txt: 16 1 17 2012-03-12 Nikolas Zimmermann <nzimmermann@rim.com> 2 18 -
trunk/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js
r101002 r110546 19 19 20 20 var testSourcePlain = document.createElement("div"); 21 testSourcePlain.innerHTML = " foo bar";21 testSourcePlain.innerHTML = "zz apple"; 22 22 testRoot.appendChild(testSourcePlain); 23 23 24 24 var testSourceDecorated = document.createElement("div"); 25 testSourceDecorated.innerHTML = " fo<b>o ba</b>r";25 testSourceDecorated.innerHTML = "z<b>z appl</b>e"; 26 26 testRoot.appendChild(testSourceDecorated); 27 27 … … 84 84 nretry--; 85 85 if (0 == nretry) { 86 testFailed(dest.tagName + " should have a marker on for'" + source.innerHTML + "'");86 testFailed(dest.tagName + " should have a marker on '" + source.innerHTML + "'"); 87 87 done(); 88 88 return; … … 98 98 layoutTestController.setAsynchronousSpellCheckingEnabled(true); 99 99 100 tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [[0, 3]]); });101 tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [[0, 3]]); });100 tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [[0, 2]]); }); 101 tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [[0, 2]]); }); 102 102 tests.push(function() { pasteAndVerify(testSourceMulti, testInput, [[0, 2], [3, 2]]); }); 103 tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [[0, 3]]); }); 104 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [[0, 3]]); }); 103 104 tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [[0, 2]]); }); 105 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [[0, 2]]); }); 105 106 tests.push(function() { pasteAndVerify(testSourceMulti, testTextArea, [[0, 2], [3, 2]]); }); 106 tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [[0, 3]]); }); 107 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [[0, 2]]); }); // To check "fo" part of foo. 107 108 tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [[0, 2]]); }); 109 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [[0, 1]]); }); // To check "fo" part of foo. 108 110 tests.push(function() { pasteAndVerify(testSourceMulti, testEditable, [[0, 2], [3, 2]]); }); 109 111 done(); -
trunk/LayoutTests/editing/spelling/spellcheck-paste-expected.txt
r100887 r110546 7 7 8 8 TEST COMPLETE 9 PASS INPUT has a marker on ' foo bar'10 PASS INPUT has a marker on ' fo<b>o ba</b>r'9 PASS INPUT has a marker on 'zz apple' 10 PASS INPUT has a marker on 'z<b>z appl</b>e' 11 11 PASS INPUT has a marker on 'zz zz zz' 12 PASS TEXTAREA has a marker on ' foo bar'13 PASS TEXTAREA has a marker on ' fo<b>o ba</b>r'12 PASS TEXTAREA has a marker on 'zz apple' 13 PASS TEXTAREA has a marker on 'z<b>z appl</b>e' 14 14 PASS TEXTAREA has a marker on 'zz zz zz' 15 PASS DIV has a marker on ' foo bar'16 PASS DIV has a marker on ' fo<b>o ba</b>r'15 PASS DIV has a marker on 'zz apple' 16 PASS DIV has a marker on 'z<b>z appl</b>e' 17 17 PASS DIV has a marker on 'zz zz zz' 18 18 -
trunk/Source/WebKit/mac/ChangeLog
r110403 r110546 1 2012-03-13 Shinya Kawanaka <shinyak@chromium.org> 2 3 REGRESSION: Spellcheck tests hit assertions on Mac. 4 https://bugs.webkit.org/show_bug.cgi?id=80883 5 6 Reviewed by Ryosuke Niwa. 7 8 The bug was caused by the closure object created in requestCheckingOfString accessing 9 request's member variables even though the request object is not an NSObject or allocated 10 in stack. This resulted in the closure not being able to access those variables when invoked. 11 12 Fixed the bug by making local copies of those member variables. 13 14 * WebCoreSupport/WebEditorClient.mm: 15 (WebEditorClient::requestCheckingOfString): 16 1 17 2012-03-11 Timothy Hatcher <timothy@apple.com> 2 18 -
trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
r109147 r110546 978 978 NSRange range = NSMakeRange(0, request.text().length()); 979 979 NSRunLoop* currentLoop = [NSRunLoop currentRunLoop]; 980 int sequence = request.sequence(); 981 TextCheckingTypeMask types = request.mask(); 980 982 [[NSSpellChecker sharedSpellChecker] requestCheckingOfString:request.text() range:range types:NSTextCheckingAllSystemTypes options:0 inSpellDocumentWithTag:0 981 983 completionHandler:^(NSInteger, NSArray* results, NSOrthography*, NSInteger) { 982 984 [currentLoop performSelector:@selector(perform) 983 target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence: request.sequence() types:request.mask()results:results] autorelease]985 target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:sequence types:types results:results] autorelease] 984 986 argument:nil order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]]; 985 987 }];
Note:
See TracChangeset
for help on using the changeset viewer.