makeSearchRange() should use Position::computeContainerNode() |
|||
Issue descriptionTo reproduce, load this page: <label> <input type="checkbox"></input> <div style="user-select: none;">text</div> </label> and double-click on the text. The result is: FATAL:EphemeralRange.cpp(43) Check failed: m_startPosition <= m_endPosition (INPUT@afterAnchor vs. INPUT@afterChildren) This happens with the following stack (the problem is in makeSearchRange actually, but it was inlined): blink_core.dll!blink::EphemeralRangeTemplate<blink::EditingAlgorithm<blink::FlatTreeTraversal> >::EphemeralRangeTemplate Line 44 blink_core.dll!blink::VisibleSelectionTemplate<blink::EditingAlgorithm<blink::FlatTreeTraversal> >::appendTrailingWhitespace Line 207 blink_core.dll!blink::SelectionController::selectClosestWordFromHitTestResult Line 490 blink_core.dll!blink::SelectionController::selectClosestWordFromMouseEvent Line 546 blink_core.dll!blink::SelectionController::handleMousePressEventDoubleClick Line 742 blink_core.dll!blink::MouseEventManager::handleMousePressEvent Line 614 blink_core.dll!blink::EventHandler::handleMousePressEvent Line 722 blink_web.dll!blink::PageWidgetEventHandler::handleMouseDown Line 249 blink_web.dll!blink::WebViewImpl::handleMouseDown Line 521 blink_web.dll!blink::PageWidgetDelegate::handleInputEvent Line 163 blink_web.dll!blink::WebViewImpl::handleInputEvent Line 2225 content.dll!content::RenderWidgetInputHandler::HandleInputEvent Line 312 Note: 100% reproducible on windows, but not on mac.
,
Mar 15 2017
In review: http://crrev.com/2747333002
,
Mar 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/66986ea643d5a387e1ec0682663617df0cda2b96 commit 66986ea643d5a387e1ec0682663617df0cda2b96 Author: yosin <yosin@chromium.org> Date: Wed Mar 15 07:04:45 2017 Make makeSearchRange() in VisibleSelection to handle BeforeAnchor and AfterAnchor position type This patch makes |makeSearchRange()| in |VisibleSelection| to use |Position| container node instead of anchor node to return correct range. Before this patch, |makeSearchRange()| attempts to create a range from after element to after child nodes of element which violates |start <= end| in |EphmeralRange| constructor. BUG= 700368 TEST=run_webkit_unit_tests --gtest_filter=VisibleSelectionTest.appendTrailingWhitespaceWithAfterAnchor Review-Url: https://codereview.chromium.org/2747333002 Cr-Commit-Position: refs/heads/master@{#457018} [modify] https://crrev.com/66986ea643d5a387e1ec0682663617df0cda2b96/third_party/WebKit/Source/core/editing/VisibleSelection.cpp [modify] https://crrev.com/66986ea643d5a387e1ec0682663617df0cda2b96/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
,
Mar 15 2017
,
Mar 17 2017
Tested the issue on Windows 7 with chrome dev version-59.0.3043.0 as per the provided html file in comment#0.Able to check & uncheck the text check box after running the html file in browser. Please find the atatched screencast for reference & confirm us on the expected behaviour & fix for the same. Thank you!!. |
|||
►
Sign in to add a comment |
|||
Comment 1 Deleted