https://bugs.webkit.org/show_bug.cgi?id=145981
<rdar://problem/
22441925>
Reviewed by Enrica Casucci.
Source/WebCore:
Test: editing/selection/minimal-user-select-crash.html
* editing/Editor.cpp:
(WebCore::Editor::hasBidiSelection):
Visible position cannot be created because of the style that doesn't allow the selection.
LayoutTests:
* editing/selection/minimal-user-select-crash-expected.txt: Added.
* editing/selection/minimal-user-select-crash.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192191
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-11-09 Jiewen Tan <jiewen_tan@apple.com>
+
+ Crash when right clicking in input box with -webkit-user-select: none
+ https://bugs.webkit.org/show_bug.cgi?id=145981
+ <rdar://problem/22441925>
+
+ Reviewed by Enrica Casucci.
+
+ * editing/selection/minimal-user-select-crash-expected.txt: Added.
+ * editing/selection/minimal-user-select-crash.html: Added.
+
2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: $0 stops working after navigating to a different domain
--- /dev/null
+PASS. WebKit didn't crash.
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ #search-text {
+ -webkit-user-select: none;
+ }
+</style>
+
+<script src="../editing.js"></script>
+
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function editingTest() {
+ var element = document.getElementById('search-text');
+ element.focus();
+
+ if (window.eventSender) {
+ eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop);
+ eventSender.contextClick();
+
+ document.write("PASS. WebKit didn't crash.")
+ }
+ }
+</script>
+</head>
+<body onload=editingTest()>
+ <input id="search-text">
+</body>
+</html>
editing/selection/extend-selection-home-end.html
editing/spelling/spellcheck-async.html
editing/style/style-text-node-without-editable-parent.html
+editing/selection/minimal-user-select-crash.html
# Editing tests that fail:
editing/deleting/delete-emoji.html [ Failure ]
+2015-11-09 Jiewen Tan <jiewen_tan@apple.com>
+
+ Crash when right clicking in input box with -webkit-user-select: none
+ https://bugs.webkit.org/show_bug.cgi?id=145981
+ <rdar://problem/22441925>
+
+ Reviewed by Enrica Casucci.
+
+ Test: editing/selection/minimal-user-select-crash.html
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::hasBidiSelection):
+ Visible position cannot be created because of the style that doesn't allow the selection.
+
2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: $0 stops working after navigating to a different domain
} else
startNode = m_frame.selection().selection().visibleStart().deepEquivalent().deprecatedNode();
+ if (!startNode)
+ return false;
+
auto renderer = startNode->renderer();
while (renderer && !is<RenderBlockFlow>(*renderer))
renderer = renderer->parent();