Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Issue 326323003: Fix a crash caused by invalid selection set by Undo command. (Closed)

Created:
6 years, 6 months ago by Yuta Kitamura
Modified:
6 years, 6 months ago
Reviewers:
yoichio, yosin_UTC9
CC:
blink-reviews, groby+blinkspell_chromium.org
Visibility:
Public.

Description

Fix a crash caused by invalid selection set by Undo command. Undo command resets the selection to the previous position, but under some conditions it may set the selection to a position in a document that is not controlled by FrameSelection. If this happens, a subsequent call of FindString command provokes an assertion in TextIterator, as it does not expect the selection endpoints to be in another document. This patch fixes the issue and adds a layout test that reproduces the assertion failure. BUG=374904 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176010

Patch Set 1 #

Total comments: 6

Patch Set 2 : Revise test. #

Total comments: 4

Patch Set 3 : Fix minor issues in test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -2 lines) Patch
A LayoutTests/editing/undo/undo-set-selection-crash.html View 1 2 1 chunk +36 lines, -0 lines 0 comments Download
A + LayoutTests/editing/undo/undo-set-selection-crash-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/Editor.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Yuta Kitamura
PTAL
6 years, 6 months ago (2014-06-11 05:27:12 UTC) #1
yosin_UTC9
LGTM https://codereview.chromium.org/326323003/diff/1/LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html File LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html (right): https://codereview.chromium.org/326323003/diff/1/LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html#newcode1 LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html:1: <html> nit: Could you add <!DOCTYPE html> to ...
6 years, 6 months ago (2014-06-11 09:02:51 UTC) #2
Yuta Kitamura
PTAL since I significantly changed the test files (merged the iframe file with the main ...
6 years, 6 months ago (2014-06-12 06:23:25 UTC) #3
yosin_UTC9
LGTM https://chromiumcodereview.appspot.com/326323003/diff/20001/LayoutTests/editing/undo/undo-set-selection-crash.html File LayoutTests/editing/undo/undo-set-selection-crash.html (right): https://chromiumcodereview.appspot.com/326323003/diff/20001/LayoutTests/editing/undo/undo-set-selection-crash.html#newcode7 LayoutTests/editing/undo/undo-set-selection-crash.html:7: <div id="test-div" contentEditable="true"><select></div> nit: It it better to ...
6 years, 6 months ago (2014-06-12 06:38:10 UTC) #4
Yuta Kitamura
https://chromiumcodereview.appspot.com/326323003/diff/20001/LayoutTests/editing/undo/undo-set-selection-crash.html File LayoutTests/editing/undo/undo-set-selection-crash.html (right): https://chromiumcodereview.appspot.com/326323003/diff/20001/LayoutTests/editing/undo/undo-set-selection-crash.html#newcode7 LayoutTests/editing/undo/undo-set-selection-crash.html:7: <div id="test-div" contentEditable="true"><select></div> On 2014/06/12 06:38:10, yosi wrote: > ...
6 years, 6 months ago (2014-06-12 07:34:49 UTC) #5
Yuta Kitamura
The CQ bit was checked by yutak@chromium.org
6 years, 6 months ago (2014-06-12 07:34:53 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yutak@chromium.org/326323003/40001
6 years, 6 months ago (2014-06-12 07:36:12 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-12 08:45:44 UTC) #8
Message was sent while issue was closed.
Change committed as 176010

Powered by Google App Engine
This is Rietveld 408576698