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

Issue 1155353002: Throw DOMException when invoked Document::execCommand on non-{X,}HTML documents (Closed)

Created:
5 years, 6 months ago by kouhei (in TOK)
Modified:
5 years, 6 months ago
Reviewers:
esprehn, yosin, sof, yosin_UTC9
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Throw DOMException when invoked Document::execCommand on non-{X,}HTML documents Throw DOMException when invoked Document::execCommand on non-{X,}HTML documents as it may lead to unexpected results. (e.g. InsertHTML execCommand running HTML parser on top of XML document) This change also aligns Blink better to other browsers and the HTML Editing spec, which doesn't mention execCommand being applied to non-HTML document: https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html BUG=484974 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196652

Patch Set 1 #

Patch Set 2 : add test #

Total comments: 2

Patch Set 3 : yosin review #

Patch Set 4 : throw NotSupportedError #

Patch Set 5 : fix test / change to InvalidStateError #

Patch Set 6 : revert accidental edit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -28 lines) Patch
A LayoutTests/editing/execCommand/non-html-document.html View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/editing/execCommand/non-html-document-expected.txt View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 2 chunks +36 lines, -6 lines 0 comments Download
M Source/core/dom/Document.idl View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 7 chunks +27 lines, -10 lines 0 comments Download

Messages

Total messages: 41 (17 generated)
kouhei (in TOK)
ptal
5 years, 6 months ago (2015-05-27 06:46:15 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155353002/20001
5 years, 6 months ago (2015-05-27 06:46:27 UTC) #4
yosin_UTC9
lgtm Thanks! https://codereview.chromium.org/1155353002/diff/20001/LayoutTests/editing/execCommand/non-html-document.html File LayoutTests/editing/execCommand/non-html-document.html (right): https://codereview.chromium.org/1155353002/diff/20001/LayoutTests/editing/execCommand/non-html-document.html#newcode7 LayoutTests/editing/execCommand/non-html-document.html:7: shouldBeFalse("xmldoc.execCommand('bold, false, null')"); nit: you don't need ...
5 years, 6 months ago (2015-05-27 06:57:44 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155353002/40001
5 years, 6 months ago (2015-05-27 07:03:52 UTC) #9
kouhei (in TOK)
https://codereview.chromium.org/1155353002/diff/20001/LayoutTests/editing/execCommand/non-html-document.html File LayoutTests/editing/execCommand/non-html-document.html (right): https://codereview.chromium.org/1155353002/diff/20001/LayoutTests/editing/execCommand/non-html-document.html#newcode7 LayoutTests/editing/execCommand/non-html-document.html:7: shouldBeFalse("xmldoc.execCommand('bold, false, null')"); On 2015/05/27 06:57:44, Yosi_UTC9 wrote: > ...
5 years, 6 months ago (2015-05-27 07:04:20 UTC) #10
sof
Could you add some information about browser compatibility of this change to the description? (It ...
5 years, 6 months ago (2015-05-27 07:09:25 UTC) #12
kouhei (in TOK)
On 2015/05/27 07:09:25, sof wrote: > Could you add some information about browser compatibility of ...
5 years, 6 months ago (2015-05-27 07:11:36 UTC) #13
esprehn
On 2015/05/27 at 07:11:36, kouhei wrote: > On 2015/05/27 07:09:25, sof wrote: > > Could ...
5 years, 6 months ago (2015-05-27 07:14:44 UTC) #14
sof
On 2015/05/27 07:14:44, esprehn wrote: > On 2015/05/27 at 07:11:36, kouhei wrote: > > On ...
5 years, 6 months ago (2015-05-27 07:16:07 UTC) #15
kouhei (in TOK)
On 2015/05/27 07:16:07, sof wrote: > On 2015/05/27 07:14:44, esprehn wrote: > > On 2015/05/27 ...
5 years, 6 months ago (2015-05-27 07:23:57 UTC) #17
sof
On 2015/05/27 07:23:57, kouhei wrote: > On 2015/05/27 07:16:07, sof wrote: > > On 2015/05/27 ...
5 years, 6 months ago (2015-05-27 08:53:45 UTC) #18
esprehn
Did we fix this correctly by removing it from Document.idl and putting it in HTMLDocument.idl ...
5 years, 6 months ago (2015-06-03 04:04:55 UTC) #19
kouhei (in TOK)
On 2015/06/03 04:04:55, esprehn wrote: > Did we fix this correctly by removing it from ...
5 years, 6 months ago (2015-06-03 05:01:03 UTC) #20
kouhei (in TOK)
PTAL. Changed CL to throw NotSupportedError exception instead.
5 years, 6 months ago (2015-06-05 09:29:12 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155353002/60001
5 years, 6 months ago (2015-06-05 15:04:01 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/46641)
5 years, 6 months ago (2015-06-05 15:23:00 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155353002/80001
5 years, 6 months ago (2015-06-08 05:01:53 UTC) #29
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/65439)
5 years, 6 months ago (2015-06-08 06:30:33 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155353002/100001
5 years, 6 months ago (2015-06-08 06:31:09 UTC) #34
kouhei (in TOK)
Yosi: Would you mind taking a look again?
5 years, 6 months ago (2015-06-08 06:31:19 UTC) #35
yosin_UTC9
still lgtm Thanks!
5 years, 6 months ago (2015-06-08 07:10:40 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-08 07:27:02 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155353002/100001
5 years, 6 months ago (2015-06-08 07:27:37 UTC) #40
commit-bot: I haz the power
5 years, 6 months ago (2015-06-08 07:33:23 UTC) #41
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=196652

Powered by Google App Engine
This is Rietveld 408576698