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

Issue 443103002: Range.insertNode should verify parent before setting end to it (Closed)

Created:
6 years, 4 months ago by kangil_
Modified:
6 years, 4 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Range.insertNode should verify parent before setting end to it This is because ContainerNode::insertBefore would cause mutation in tree. So this CL adds code block to throw exception if parent is not avaiable. In addition, http://crbug.com/399230 will be fixed with this CL. BUG=399230 TEST=LayoutTests/fast/dom/Range/surroundContents-for-mutation.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179828

Patch Set 1 #

Total comments: 9

Patch Set 2 : Take review comment into consideration #

Total comments: 4

Patch Set 3 : Take review comment into consideration #

Total comments: 2

Patch Set 4 : Take review comment into consideration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -1 line) Patch
A LayoutTests/fast/dom/Range/surroundContents-for-mutation.html View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/surroundContents-for-mutation-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/dom/Range.cpp View 1 2 3 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 22 (0 generated)
kangil_
PTAL fyi, trybot failures seem not to be related to this change.
6 years, 4 months ago (2014-08-07 00:54:54 UTC) #1
tkent
-tkent, haraken +yosin
6 years, 4 months ago (2014-08-07 01:04:36 UTC) #2
Yuta Kitamura
https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html File LayoutTests/fast/dom/Range/surroundContents-for-mutation.html (right): https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html#newcode18 LayoutTests/fast/dom/Range/surroundContents-for-mutation.html:18: var srcElement = event.srcElement; Does this work? You have ...
6 years, 4 months ago (2014-08-07 09:30:41 UTC) #3
kangil_
https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html File LayoutTests/fast/dom/Range/surroundContents-for-mutation.html (right): https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html#newcode18 LayoutTests/fast/dom/Range/surroundContents-for-mutation.html:18: var srcElement = event.srcElement; On 2014/08/07 09:30:41, Yuta Kitamura ...
6 years, 4 months ago (2014-08-07 09:59:51 UTC) #4
kangil_
PTAL fyi, here are tree shown before/after insertBefore() in Range::insertNode. [LayoutTests/fast/dom/Range/surroundContents-for-mutation.html] 1. range.surroundContents(testFrame) - before: ...
6 years, 4 months ago (2014-08-07 12:30:33 UTC) #5
Yuta Kitamura
https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html File LayoutTests/fast/dom/Range/surroundContents-for-mutation.html (right): https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html#newcode18 LayoutTests/fast/dom/Range/surroundContents-for-mutation.html:18: var srcElement = event.srcElement; On 2014/08/07 09:59:50, kangil_ wrote: ...
6 years, 4 months ago (2014-08-08 04:27:55 UTC) #6
kangil_
https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html File LayoutTests/fast/dom/Range/surroundContents-for-mutation.html (right): https://codereview.chromium.org/443103002/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html#newcode18 LayoutTests/fast/dom/Range/surroundContents-for-mutation.html:18: var srcElement = event.srcElement; On 2014/08/08 04:27:55, Yuta Kitamura ...
6 years, 4 months ago (2014-08-08 04:52:26 UTC) #7
kangil_
Done. PTAL.
6 years, 4 months ago (2014-08-08 05:17:12 UTC) #8
Yuta Kitamura
https://codereview.chromium.org/443103002/diff/1/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/443103002/diff/1/Source/core/dom/Range.cpp#newcode898 Source/core/dom/Range.cpp:898: if (!newText->parentNode()) { On 2014/08/08 04:52:25, kangil_ wrote: > ...
6 years, 4 months ago (2014-08-08 05:25:07 UTC) #9
kangil_
On 2014/08/08 05:25:07, Yuta Kitamura wrote: > > load event is fired. > > > ...
6 years, 4 months ago (2014-08-08 05:31:09 UTC) #10
kangil_
#1 0x000002452cf1 blink::EventDispatcher::dispatch() #2 0x000002451f70 blink::EventDispatchMediator::dispatchEvent() #3 0x000002452303 blink::EventDispatcher::dispatchEvent() #4 0x0000023b6e44 blink::Node::dispatchEvent() #5 0x000002636c56 blink::HTMLFrameOwnerElement::dispatchLoad() ...
6 years, 4 months ago (2014-08-08 05:38:10 UTC) #11
Yuta Kitamura
https://codereview.chromium.org/443103002/diff/20001/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html File LayoutTests/fast/dom/Range/surroundContents-for-mutation.html (right): https://codereview.chromium.org/443103002/diff/20001/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html#newcode17 LayoutTests/fast/dom/Range/surroundContents-for-mutation.html:17: function loaded(ev) { Urm okay, you were trying to ...
6 years, 4 months ago (2014-08-08 06:20:58 UTC) #12
kangil_
PTAL https://codereview.chromium.org/443103002/diff/20001/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html File LayoutTests/fast/dom/Range/surroundContents-for-mutation.html (right): https://codereview.chromium.org/443103002/diff/20001/LayoutTests/fast/dom/Range/surroundContents-for-mutation.html#newcode17 LayoutTests/fast/dom/Range/surroundContents-for-mutation.html:17: function loaded(ev) { On 2014/08/08 06:20:58, Yuta Kitamura ...
6 years, 4 months ago (2014-08-08 06:32:50 UTC) #13
yosin_UTC9
Sorry for later response. I tried to fix this one but it is suspended by ...
6 years, 4 months ago (2014-08-08 06:49:30 UTC) #14
kangil_
On 2014/08/08 06:49:30, Yosi_UTC9 wrote: > Sorry for later response. I tried to fix this ...
6 years, 4 months ago (2014-08-08 07:16:34 UTC) #15
Yuta Kitamura
lgtm after minor revision https://codereview.chromium.org/443103002/diff/40001/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/443103002/diff/40001/Source/core/dom/Range.cpp#newcode898 Source/core/dom/Range.cpp:898: // The event would be ...
6 years, 4 months ago (2014-08-08 09:17:34 UTC) #16
kangil_
https://codereview.chromium.org/443103002/diff/40001/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/443103002/diff/40001/Source/core/dom/Range.cpp#newcode898 Source/core/dom/Range.cpp:898: // The event would be fired regardless of EventQueueScope; ...
6 years, 4 months ago (2014-08-08 10:47:13 UTC) #17
kangil_
Thanks for reviewing this CL! :)
6 years, 4 months ago (2014-08-08 10:47:43 UTC) #18
kangil_
The CQ bit was checked by kangil.han@samsung.com
6 years, 4 months ago (2014-08-08 10:47:50 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kangil.han@samsung.com/443103002/60001
6 years, 4 months ago (2014-08-08 10:48:50 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 4 months ago (2014-08-08 12:14:02 UTC) #21
commit-bot: I haz the power
6 years, 4 months ago (2014-08-08 12:52:45 UTC) #22
Message was sent while issue was closed.
Change committed as 179828

Powered by Google App Engine
This is Rietveld 408576698