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

Issue 441853003: Range.surroundContents should throw InvalidStateError if a non-Text node is partially contained (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

InvalidStateError should be thrown firstly in Range.surroundContents SPEC: http://dom.spec.whatwg.org/#dom-range-surroundcontents According to spec, 'If a non-Text node is partially contained in the context object, throw an "InvalidStateError" exception.' is first step. So this CL moved existed implementation to the first code block in function. 72 test cases will be passed with this CL in http://w3c-test.org/dom/ranges/Range-surroundContents.html Behavior in other browsers. *)FF: PASS *)IE: FAIL TEST=LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179795

Patch Set 1 #

Total comments: 4

Patch Set 2 : Take review comment into consideration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -12 lines) Patch
A LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/dom/Range.cpp View 1 2 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
kangil_
PTAL fyi, trybot seems not working well at this moment.
6 years, 4 months ago (2014-08-05 06:25:00 UTC) #1
haraken
The change to core/ looks good, but yutak-san wants to take a look. https://codereview.chromium.org/441853003/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html File ...
6 years, 4 months ago (2014-08-05 06:34:10 UTC) #2
kangil_
https://codereview.chromium.org/441853003/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html File LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html (right): https://codereview.chromium.org/441853003/diff/1/LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html#newcode20 LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html:20: document.getElementById('test').outerHTML = ''; On 2014/08/05 06:34:10, haraken wrote: > ...
6 years, 4 months ago (2014-08-05 06:49:58 UTC) #3
kangil_
@yutak: PTAL :)
6 years, 4 months ago (2014-08-07 12:32:26 UTC) #4
Yuta Kitamura
I'm mildly confused by the change description. This patch just corrects the order of error ...
6 years, 4 months ago (2014-08-08 04:49:31 UTC) #5
kangil_
PTAL https://codereview.chromium.org/441853003/diff/1/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/441853003/diff/1/Source/core/dom/Range.cpp#newcode1211 Source/core/dom/Range.cpp:1211: // BAD_BOUNDARYPOINTS_ERR: Raised if the Range partially selects ...
6 years, 4 months ago (2014-08-08 05:04:48 UTC) #6
Yuta Kitamura
lgtm
6 years, 4 months ago (2014-08-08 05:38:48 UTC) #7
kangil_
The CQ bit was checked by kangil.han@samsung.com
6 years, 4 months ago (2014-08-08 05:40:59 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kangil.han@samsung.com/441853003/20001
6 years, 4 months ago (2014-08-08 05:41:55 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-08-08 07:09:03 UTC) #10
Message was sent while issue was closed.
Change committed as 179795

Powered by Google App Engine
This is Rietveld 408576698