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

Issue 2313573002: Custom Elements: add prototype check for "failed" elements (Closed)

Created:
4 years, 3 months ago by davaajav
Modified:
4 years, 3 months ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Custom Elements: add prototype check for "failed" elements There 2 possible ways to set an element`s state to "failed": 1. create the element for the token https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token 2. upgrade the element https://html.spec.whatwg.org/#concept-upgrade-an-element According to the spec, "failed" element should implement HTMLUnknownElement only while it is being created for the token, not while it is being upgraded. Added prototype sanity check when an element is created inside a template. BUG=643509 Committed: https://crrev.com/44d4690c35729c1cfa0f6d78df1de3e5effdf871 Cr-Commit-Position: refs/heads/master@{#416886}

Patch Set 1 #

Total comments: 1

Patch Set 2 : delete trailing whitespaces #

Patch Set 3 : change getPrototypeOf to instanceof #

Patch Set 4 : delete unnecessary console.log #

Total comments: 3

Patch Set 5 : added failure expectation #

Patch Set 6 : template.html clean up #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -3 lines) Patch
M third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-create.html View 1 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade-expected.txt View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (5 generated)
davaajav
PTL
4 years, 3 months ago (2016-09-05 05:10:53 UTC) #3
kojii
https://codereview.chromium.org/2313573002/diff/1/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html File third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html (right): https://codereview.chromium.org/2313573002/diff/1/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html#newcode21 third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html:21: assert_equals(Object.getPrototypeOf(element), w.HTMLElement.prototype); I'm not sure what is the good ...
4 years, 3 months ago (2016-09-06 04:58:51 UTC) #4
davaajav
On 2016/09/06 at 04:58:51, kojii wrote: > https://codereview.chromium.org/2313573002/diff/1/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html > File third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html (right): > > https://codereview.chromium.org/2313573002/diff/1/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html#newcode21 ...
4 years, 3 months ago (2016-09-06 05:32:03 UTC) #5
kojii
On 2016/09/06 at 05:32:03, davaajav wrote: > On 2016/09/06 at 04:58:51, kojii wrote: > > ...
4 years, 3 months ago (2016-09-06 05:45:31 UTC) #6
davaajav
On 2016/09/06 at 05:45:31, kojii wrote: > On 2016/09/06 at 05:32:03, davaajav wrote: > > ...
4 years, 3 months ago (2016-09-06 05:47:04 UTC) #7
davaajav
On 2016/09/06 at 05:47:04, davaajav wrote: > On 2016/09/06 at 05:45:31, kojii wrote: > > ...
4 years, 3 months ago (2016-09-06 08:00:58 UTC) #8
davaajav
4 years, 3 months ago (2016-09-06 08:03:05 UTC) #9
kojii
> After looking at the spec again, I am having second thoughts on whether we ...
4 years, 3 months ago (2016-09-06 08:10:55 UTC) #10
dominicc (has gone to gerrit)
There's a typo in the description, elElement. https://codereview.chromium.org/2313573002/diff/60001/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html File third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html (right): https://codereview.chromium.org/2313573002/diff/60001/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html#newcode41 third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html:41: assert_equals(Object.getPrototypeOf(element), w.HTMLElement.prototype); ...
4 years, 3 months ago (2016-09-06 16:54:07 UTC) #11
kojii
On 2016/09/06 at 16:54:07, dominicc wrote: > > I think the assert_equals checks are better ...
4 years, 3 months ago (2016-09-07 02:33:19 UTC) #12
davaajav
PTL
4 years, 3 months ago (2016-09-07 05:22:52 UTC) #13
kojii
lgtm
4 years, 3 months ago (2016-09-07 06:46:33 UTC) #15
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/2313573002/100001
4 years, 3 months ago (2016-09-07 06:46:56 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 3 months ago (2016-09-07 09:22:20 UTC) #17
commit-bot: I haz the power
4 years, 3 months ago (2016-09-07 09:24:04 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/44d4690c35729c1cfa0f6d78df1de3e5effdf871
Cr-Commit-Position: refs/heads/master@{#416886}

Powered by Google App Engine
This is Rietveld 408576698