DescriptionInvalidStateError 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 #
Messages
Total messages: 10 (0 generated)
|