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

Issue 234463003: Avoid using cross RenderView selection rendering (Closed)

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

Description

Avoid using cross RenderView selection rendering This patch makes sure we pass |RenderObject| belong to RenderView in |RenderView::setSelection|, which takes two |RenderObject|s for start and end of selection, in |FrameSeleciton::updateAppearance|. The bug is caused by |VisibleSelection::base| and |VisibleSelection::start| are in different document, |base| points to IFRAME and |start| points |TextNode| in IFRAME. This causes |RenderView|, which holds |RenderObject|s of selection start points and end points, have dangling |RenderObject|'s. Because, |RenderView| doesn't know destructed |RenderObject| belongs to another |RenderView|. BUG=356690 TEST=LayoutTests/undo/execCommand/crash-redo-with-iframes.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171440

Patch Set 1 #

Total comments: 1

Patch Set 2 : 2014-04-11T06:58:52 #

Patch Set 3 : 2014-04-14T01:01:05 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -1 line) Patch
A LayoutTests/editing/undo/crash-redo-with-iframes.html View 1 2 1 chunk +42 lines, -0 lines 0 comments Download
A LayoutTests/editing/undo/crash-redo-with-iframes-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/editing/FrameSelection.cpp View 1 2 1 chunk +2 lines, -1 line 2 comments Download

Messages

Total messages: 8 (0 generated)
yosin_UTC9
Could you review this patch? This is short term solution for fixing heap-use-after-free. For long ...
6 years, 8 months ago (2014-04-11 08:40:20 UTC) #1
Yuta Kitamura
https://codereview.chromium.org/234463003/diff/1/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/234463003/diff/1/Source/core/editing/FrameSelection.cpp#newcode232 Source/core/editing/FrameSelection.cpp:232: if (s.start().anchorNode()) { As far as I know, the ...
6 years, 8 months ago (2014-04-11 08:59:22 UTC) #2
yosin_UTC9
PTAL As discussed off-line, this is minimal short term solution for fixing heap-use-after-free.
6 years, 8 months ago (2014-04-14 05:03:01 UTC) #3
Yuta Kitamura
LGTM https://codereview.chromium.org/234463003/diff/40001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/234463003/diff/40001/Source/core/editing/FrameSelection.cpp#newcode1589 Source/core/editing/FrameSelection.cpp:1589: if (startRenderer->view() == view && endRenderer->view() == view) ...
6 years, 8 months ago (2014-04-14 06:23:39 UTC) #4
yosin_UTC9
Thanks! Committing... https://codereview.chromium.org/234463003/diff/40001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/234463003/diff/40001/Source/core/editing/FrameSelection.cpp#newcode1589 Source/core/editing/FrameSelection.cpp:1589: if (startRenderer->view() == view && endRenderer->view() == ...
6 years, 8 months ago (2014-04-14 08:03:56 UTC) #5
yosin_UTC9
The CQ bit was checked by yosin@chromium.org
6 years, 8 months ago (2014-04-14 08:04:01 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yosin@chromium.org/234463003/40001
6 years, 8 months ago (2014-04-14 08:04:06 UTC) #7
commit-bot: I haz the power
6 years, 8 months ago (2014-04-14 08:24:17 UTC) #8
Message was sent while issue was closed.
Change committed as 171440

Powered by Google App Engine
This is Rietveld 408576698