https://bugs.webkit.org/show_bug.cgi?id=149484
<rdar://problem/
22811338>
Reviewed by Darin Adler.
Source/WebKit/mac:
firstRectForCharacterRange(): don't fall over in an editable-less frame.
* WebView/WebFrame.mm:
(-[WebFrame _convertToDOMRange:]):
LayoutTests:
This test is from Blink r194870:
https://codereview.chromium.org/
1122593004
* editing/mac/input/text-input-controller-no-editable-no-crash-expected.txt: Added.
* editing/mac/input/text-input-controller-no-editable-no-crash.html: Added.
* platform/wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192007
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-11-03 Jiewen Tan <jiewen_tan@apple.com>
+
+ [WK1] Null dereference loading Blink layout test editing/input/text-input-controller-no-editable-no-crash.html
+ https://bugs.webkit.org/show_bug.cgi?id=149484
+ <rdar://problem/22811338>
+
+ Reviewed by Darin Adler.
+
+ This test is from Blink r194870:
+ https://codereview.chromium.org/1122593004
+
+ * editing/mac/input/text-input-controller-no-editable-no-crash-expected.txt: Added.
+ * editing/mac/input/text-input-controller-no-editable-no-crash.html: Added.
+ * platform/wk2/TestExpectations:
+
2015-11-03 Alexey Proskuryakov <ap@apple.com>
[iOS] Skip the touch tests
--- /dev/null
+PASS, WebKit didn't crash.
--- /dev/null
+<html>
+<body onload="runTest();">
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function runTest()
+ {
+ document.open();
+ if (window.textInputController)
+ textInputController.firstRectForCharacterRange(0, 0);
+ document.write("PASS, WebKit didn't crash.");
+ }
+</script>
+</body>
+</html>
editing/mac/input/replace-invalid-range.html
editing/mac/input/secure-input.html
editing/mac/input/text-input-controller.html
+editing/mac/input/text-input-controller-no-editable-no-crash.html
editing/mac/input/wrapped-line-char-rect.html
editing/mac/input/NSBackgroundColor-transparent.html
editing/mac/pasteboard/paste-and-match-style-selector-event.html
+2015-11-03 Jiewen Tan <jiewen_tan@apple.com>
+
+ [WK1] Null dereference loading Blink layout test editing/input/text-input-controller-no-editable-no-crash.html
+ https://bugs.webkit.org/show_bug.cgi?id=149484
+ <rdar://problem/22811338>
+
+ Reviewed by Darin Adler.
+
+ firstRectForCharacterRange(): don't fall over in an editable-less frame.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _convertToDOMRange:]):
+
2015-11-02 Andy Estes <aestes@apple.com>
[Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
// directly in the document DOM, so serialization is problematic. Our solution is
// to use the root editable element of the selection start as the positional base.
// That fits with AppKit's idea of an input context.
- return TextIterator::rangeFromLocationAndLength(_private->coreFrame->selection().rootEditableElementOrDocumentElement(), nsrange.location, nsrange.length);
+ Element* element = _private->coreFrame->selection().rootEditableElementOrDocumentElement();
+ if (!element)
+ return nil;
+ return TextIterator::rangeFromLocationAndLength(element, nsrange.location, nsrange.length);
}
- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)nsrange