Title: [171416] branches/safari-600.1-branch/Source/WebKit2
- Revision
- 171416
- Author
- dburk...@apple.com
- Date
- 2014-07-22 22:53:50 -0700 (Tue, 22 Jul 2014)
Log Message
Merge r171225
Modified Paths
Diff
Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (171415 => 171416)
--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog 2014-07-23 05:52:04 UTC (rev 171415)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog 2014-07-23 05:53:50 UTC (rev 171416)
@@ -1,5 +1,24 @@
2014-07-22 Dana Burkart <dburk...@apple.com>
+ Merge r171225.
+
+ 2014-07-18 Jon Honeycutt <jhoneyc...@apple.com>
+
+ REGRESSION: Crash when typing into text field that clears itself on iOS
+
+ <https://bugs.webkit.org/show_bug.cgi?id=135044>
+ <rdar://problem/17640443>
+
+ Reviewed by Darin Adler.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::requestAutocorrectionData):
+ wordRangeFromPosition() returns null in some cases; null check range
+ before dereferencing it. Moved some variable declarations around to
+ better match our style.
+
+2014-07-22 Dana Burkart <dburk...@apple.com>
+
Merge r171219.
2014-07-18 Tim Horton <timothy_hor...@apple.com>
Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (171415 => 171416)
--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-07-23 05:52:04 UTC (rev 171415)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-07-23 05:53:50 UTC (rev 171416)
@@ -1620,7 +1620,6 @@
void WebPage::requestAutocorrectionData(const String& textForAutocorrection, uint64_t callbackID)
{
- RefPtr<Range> range;
Frame& frame = m_page->focusController().focusedOrMainFrame();
if (!frame.selection().isCaret()) {
send(Messages::WebPageProxy::AutocorrectionDataCallback(Vector<FloatRect>(), String(), 0, 0, callbackID));
@@ -1628,9 +1627,12 @@
}
VisiblePosition position = frame.selection().selection().start();
- Vector<SelectionRect> selectionRects;
+ RefPtr<Range> range = wordRangeFromPosition(position);
+ if (!range) {
+ send(Messages::WebPageProxy::AutocorrectionDataCallback(Vector<FloatRect>(), String(), 0, 0, callbackID));
+ return;
+ }
- range = wordRangeFromPosition(position);
String textForRange = plainTextReplacingNoBreakSpace(range.get());
const unsigned maxSearchAttempts = 5;
for (size_t i = 0; i < maxSearchAttempts && textForRange != textForAutocorrection; ++i)
@@ -1641,6 +1643,8 @@
range = Range::create(*frame.document(), wordRangeFromPosition(position)->startPosition(), range->endPosition());
textForRange = plainTextReplacingNoBreakSpace(range.get());
}
+
+ Vector<SelectionRect> selectionRects;
if (textForRange == textForAutocorrection)
range->collectSelectionRects(selectionRects);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes