Changeset 248548 in webkit
- Timestamp:
- Aug 12, 2019 2:40:56 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r248547 r248548 1 2019-08-12 Megan Gardner <megan_gardner@apple.com> 2 3 Fix Crash in Mail Search 4 https://bugs.webkit.org/show_bug.cgi?id=200589 5 <rdar://problem/53666720> 6 7 Reviewed by Tim Horton. 8 9 If we search in Mail backwards first, for AppKit reasons 10 we get a -1 for the index of the found item. 11 Do not try and insert data in this case. 12 13 * UIProcess/mac/WKTextFinderClient.mm: 14 1 15 2019-08-12 Adrian Perez de Castro <aperez@igalia.com> 2 16 -
trunk/Source/WebKit/UIProcess/mac/WKTextFinderClient.mm
r247490 r248548 82 82 // that they at least exist. 83 83 allMatches.resize(matchCount); 84 allMatches[matchIndex].appendVector(matchRects); 84 // FIXME: Clean this up and figure out why we are getting a -1 index 85 if (matchIndex >= 0 && static_cast<uint32_t>(matchIndex) < matchCount) 86 allMatches[matchIndex].appendVector(matchRects); 85 87 } 86 88 -
trunk/Tools/ChangeLog
r248541 r248548 1 2019-08-12 Megan Gardner <megan_gardner@apple.com> 2 3 Fix Crash in Mail Search 4 https://bugs.webkit.org/show_bug.cgi?id=200589 5 6 Reviewed by Tim Horton. 7 8 If you search backwards first in mail, we would crash, 9 this tests that codepath. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: 12 (TEST): 13 1 14 2019-08-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm
r247490 r248548 225 225 } 226 226 227 TEST(WebKit, FindInPageBackwardsFirst) 228 { 229 RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]); 230 [webView _setOverrideDeviceScaleFactor:2]; 231 232 [webView loadHTMLString:@"word word" baseURL:nil]; 233 [webView _test_waitForDidFinishNavigation]; 234 235 // Find one match, doing an incremental search. 236 auto result = findMatches(webView.get(), @"word", wrapBackwardsFindOptions, 1); 237 EXPECT_EQ((NSUInteger)1, [result.matches count]); 238 239 result = findMatches(webView.get(), @"word", wrapBackwardsFindOptions, 1); 240 EXPECT_EQ((NSUInteger)1, [result.matches count]); 241 } 242 227 243 TEST(WebKit, FindInPageWrappingSubframe) 228 244 {
Note: See TracChangeset
for help on using the changeset viewer.