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

Issue 340713003: Ignore visibility when checking whether Position is editable or not at DeletetSelectionCommand (Closed)

Created:
6 years, 6 months ago by yosin_UTC9
Modified:
6 years, 6 months ago
Reviewers:
yoichio, Yuta Kitamura
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Ignore visibility when checking whether Position is editable or not at DeletetSelectionCommand This patch introduces |lastEditablePositionBeforePositionInRoot()| to get to editable |Position| instead of |VisiblePosition| for making DeletetSelectionCommand to work editable position regardless its visibility. The root cause of issue 339187 is |DeleteSelectionCommand| shrinks end point of selection range, start position is start of "bar", which is hidden editable, and end position is "foo", which isn't editable, to editable position but |DeleteSelectionCommand| checks both editability and visibility, then it gets null position since end point is hidden. BUG=339187 TEST=LayoutTests/editing/execCommand/delete-hidden-crash.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176497

Patch Set 1 #

Total comments: 15

Patch Set 2 : 2014-06-19T01:13:17 #

Patch Set 3 : 2014-06-19T03:44:02 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -5 lines) Patch
A LayoutTests/editing/execCommand/delete-hidden-crash.html View 1 1 chunk +29 lines, -0 lines 0 comments Download
A + LayoutTests/editing/execCommand/delete-hidden-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/editing/DeleteSelectionCommand.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/htmlediting.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/editing/htmlediting.cpp View 1 2 2 chunks +9 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
yosin_UTC9
Could you review this patch? Thanks in advance.
6 years, 6 months ago (2014-06-18 07:48:06 UTC) #1
Yuta Kitamura
https://codereview.chromium.org/340713003/diff/1/LayoutTests/editing/execCommand/delete-hidden-crash.html File LayoutTests/editing/execCommand/delete-hidden-crash.html (right): https://codereview.chromium.org/340713003/diff/1/LayoutTests/editing/execCommand/delete-hidden-crash.html#newcode8 LayoutTests/editing/execCommand/delete-hidden-crash.html:8: onload = function(){ Space required before the brace. https://codereview.chromium.org/340713003/diff/1/LayoutTests/editing/execCommand/delete-hidden-crash.html#newcode9 ...
6 years, 6 months ago (2014-06-18 08:08:11 UTC) #2
yosin_UTC9
PTAL https://codereview.chromium.org/340713003/diff/1/LayoutTests/editing/execCommand/delete-hidden-crash.html File LayoutTests/editing/execCommand/delete-hidden-crash.html (right): https://codereview.chromium.org/340713003/diff/1/LayoutTests/editing/execCommand/delete-hidden-crash.html#newcode8 LayoutTests/editing/execCommand/delete-hidden-crash.html:8: onload = function(){ On 2014/06/18 08:08:11, Yuta Kitamura ...
6 years, 6 months ago (2014-06-19 07:36:57 UTC) #3
Yuta Kitamura
LGTM This is much better, thanks! https://codereview.chromium.org/340713003/diff/1/Source/core/editing/htmlediting.h File Source/core/editing/htmlediting.h (right): https://codereview.chromium.org/340713003/diff/1/Source/core/editing/htmlediting.h#newcode177 Source/core/editing/htmlediting.h:177: Position lastEditablePositionBeforePositionInRoot(const Position&, ...
6 years, 6 months ago (2014-06-19 07:43:36 UTC) #4
yosin_UTC9
The CQ bit was checked by yosin@chromium.org
6 years, 6 months ago (2014-06-19 08:05:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yosin@chromium.org/340713003/40001
6 years, 6 months ago (2014-06-19 08:06:24 UTC) #6
yosin_UTC9
On 2014/06/19 07:43:36, Yuta Kitamura wrote: > LGTM > > This is much better, thanks! ...
6 years, 6 months ago (2014-06-19 08:07:26 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-19 08:43:03 UTC) #8
Message was sent while issue was closed.
Change committed as 176497

Powered by Google App Engine
This is Rietveld 408576698