Changeset 171225 in webkit
- Timestamp:
- Jul 18, 2014 10:21:20 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r171219 r171225 1 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com> 2 3 REGRESSION: Crash when typing into text field that clears itself on iOS 4 5 <https://bugs.webkit.org/show_bug.cgi?id=135044> 6 <rdar://problem/17640443> 7 8 Reviewed by Darin Adler. 9 10 * WebProcess/WebPage/ios/WebPageIOS.mm: 11 (WebKit::WebPage::requestAutocorrectionData): 12 wordRangeFromPosition() returns null in some cases; null check range 13 before dereferencing it. Moved some variable declarations around to 14 better match our style. 15 1 16 2014-07-18 Tim Horton <timothy_horton@apple.com> 2 17 -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r171209 r171225 1621 1621 void WebPage::requestAutocorrectionData(const String& textForAutocorrection, uint64_t callbackID) 1622 1622 { 1623 RefPtr<Range> range;1624 1623 Frame& frame = m_page->focusController().focusedOrMainFrame(); 1625 1624 if (!frame.selection().isCaret()) { … … 1629 1628 1630 1629 VisiblePosition position = frame.selection().selection().start(); 1631 Vector<SelectionRect> selectionRects; 1632 1633 range = wordRangeFromPosition(position); 1630 RefPtr<Range> range = wordRangeFromPosition(position); 1631 if (!range) { 1632 send(Messages::WebPageProxy::AutocorrectionDataCallback(Vector<FloatRect>(), String(), 0, 0, callbackID)); 1633 return; 1634 } 1635 1634 1636 String textForRange = plainTextReplacingNoBreakSpace(range.get()); 1635 1637 const unsigned maxSearchAttempts = 5; … … 1642 1644 textForRange = plainTextReplacingNoBreakSpace(range.get()); 1643 1645 } 1646 1647 Vector<SelectionRect> selectionRects; 1644 1648 if (textForRange == textForAutocorrection) 1645 1649 range->collectSelectionRects(selectionRects);
Note: See TracChangeset
for help on using the changeset viewer.