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

Issue 2707973002: Remove blacklist on .innerHTML and .outerHTML (Closed)

Created:
3 years, 10 months ago by Sunny
Modified:
3 years, 10 months ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dcheng, dglazkov+blink, kinuko+watch, mlamouri+watch-blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove blacklist on .innerHTML and .outerHTML The blacklist was stored in HTMLElement::ieForbidsInsertHTML(), used to disallow set inner/outerHTML on these elements and determine whether the tag should be serailized with end tag or not. The current spec doesn't have any blocklist on them, so the blocklists on .innerHTML, .outerHTML and createContextualFragment() are all removed in this change. During the serialization, the spec [1] have a list of tag names which should skip the end tag, the serializers now using it instead of using the HTMLElement::ieForbidsInsertHTML(). This commit also fix a bug in serializeNodesWithNamespaces(), which always append the end tag even it is serialized as html document and the tag is in the list mentioned above. Around 180 failed tests will be passed after this change. [1] https://www.w3.org/TR/DOM-Parsing/ BUG=679069 Review-Url: https://codereview.chromium.org/2707973002 Cr-Commit-Position: refs/heads/master@{#451961} Committed: https://chromium.googlesource.com/chromium/src/+/7a581007693d6b482158d03cd6eac849da99bb76

Patch Set 1 #

Patch Set 2 : Add HTMLElement::shouldSerializeEndTag #

Total comments: 4

Patch Set 3 : Remove blacklist on .innerHTML and .outerHTML #

Patch Set 4 : Typo fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -349 lines) Patch
D third_party/WebKit/LayoutTests/external/wpt/domparsing/createContextualFragment-expected.txt View 1 chunk +0 lines, -38 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/html/syntax/serializing-html-fragments/serializing-expected.txt View 3 chunks +135 lines, -135 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/innerText/setter-expected.txt View 2 chunks +29 lines, -29 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/dom/HTMLElement/ie-forbids-insert-html.html View 1 chunk +0 lines, -19 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/dom/HTMLElement/ie-forbids-insert-html-expected.txt View 1 chunk +0 lines, -41 lines 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp View 1 2 4 chunks +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp View 1 2 2 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/Serialization.cpp View 1 chunk +0 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.cpp View 1 3 chunks +9 lines, -50 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25 (15 generated)
Sunny
Hi tkent@, could you give a a dry run and answer this question for me? ...
3 years, 10 months ago (2017-02-20 17:04:28 UTC) #3
tkent
On 2017/02/20 at 17:04:28, ratsunny wrote: > Hi tkent@, could you give a a dry ...
3 years, 10 months ago (2017-02-20 23:36:03 UTC) #8
Sunny
On 2017/02/20 23:36:03, tkent wrote: > On 2017/02/20 at 17:04:28, ratsunny wrote: > > Hi ...
3 years, 10 months ago (2017-02-21 12:45:30 UTC) #9
tkent
https://codereview.chromium.org/2707973002/diff/20001/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp File third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp (right): https://codereview.chromium.org/2707973002/diff/20001/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp#newcode87 third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp:87: static inline bool elementCannotHaveEndTag(const Node& node) { Please add ...
3 years, 10 months ago (2017-02-22 00:31:55 UTC) #14
Sunny
On 2017/02/22 00:31:55, tkent wrote: > https://codereview.chromium.org/2707973002/diff/20001/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp > File third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp > (right): > > https://codereview.chromium.org/2707973002/diff/20001/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp#newcode87 ...
3 years, 10 months ago (2017-02-22 04:25:38 UTC) #15
tkent
lgtm
3 years, 10 months ago (2017-02-22 04:35:56 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2707973002/60001
3 years, 10 months ago (2017-02-22 04:36:40 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/369699)
3 years, 10 months ago (2017-02-22 07:27:43 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2707973002/60001
3 years, 10 months ago (2017-02-22 07:34:26 UTC) #22
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 09:51:19 UTC) #25
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/7a581007693d6b482158d03cd6ea...

Powered by Google App Engine
This is Rietveld 408576698