-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch errors while upgrading customized built-in elements #797
Conversation
Filed tobie/specref#571 on the build error, although we could probably get around it by changing [HR-TIME] to [HR-TIME-2] everywhere. |
Ping for review and/or test volunteers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specification change LGTM.
Thanks! I guess this is still waiting on tests though. |
@EdgarChen you might be interested in this. |
This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true
This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true
I added a rough test for this here. |
Excellent, thank you! |
This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/master@{#760705}
This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/master@{#760705}
This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/master@{#760705}
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/master@{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/master@{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/master@{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/master@{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072
This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 [email protected] (cherry picked from commit 7101418) Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#760705} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2168800 Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/branch-heads/4044@{#985} Cr-Branched-From: a6d9daf-refs/heads/master@{#737173}
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <masonfreedchromium.org> Auto-Submit: Mason Freed <masonfreedchromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/master{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072 UltraBlame original commit: b4489b28cd64543c78ab8aed7788fe827c346a1d
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <masonfreedchromium.org> Auto-Submit: Mason Freed <masonfreedchromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/master{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072 UltraBlame original commit: f016ab30013b235661e8aa9f4f86e09cb98ff522
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <masonfreedchromium.org> Auto-Submit: Mason Freed <masonfreedchromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/master{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072 UltraBlame original commit: b4489b28cd64543c78ab8aed7788fe827c346a1d
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <masonfreedchromium.org> Auto-Submit: Mason Freed <masonfreedchromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/master{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072 UltraBlame original commit: f016ab30013b235661e8aa9f4f86e09cb98ff522
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <masonfreedchromium.org> Auto-Submit: Mason Freed <masonfreedchromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/master{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072 UltraBlame original commit: b4489b28cd64543c78ab8aed7788fe827c346a1d
…tor behavior, a=testonly Automatic update from web-platform-tests Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152986 Commit-Queue: Mason Freed <masonfreedchromium.org> Auto-Submit: Mason Freed <masonfreedchromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/master{#760705} -- wpt-commits: 8086723599f2bcdcbf54bcecff8cc50038cf939a wpt-pr: 23072 UltraBlame original commit: f016ab30013b235661e8aa9f4f86e09cb98ff522
Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 [email protected] (cherry picked from commit 7101418f85a0f17e4f9a35dfe3a9acff76340a93) Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Cq-Do-Not-Cancel-Tryjobs: true Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#760705} Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/branch-heads/4044@{#985} Cr-Branched-From: a6d9daf149a473ceea37f629c41d4527bf2055bd-refs/heads/master@{#737173} Reviewed-by: Michal Klocek <[email protected]>
Fix customized built-in element constructor behavior This CL implements two changes: 1. It fixes the implementation to better match the spec for the "create an element for the token" [1] algorithm. Prior to this CL, step 7 of that algorithm was skipping directly to step 6 of the "create an element" [2] algorithm, skipping over step 5 for customized built-in elements. This is now fixed. This case is illustrated by the issue and example at [3] and [4]. This becomes the first test in customized-built-in-constructor-exceptions.html. 2. It updates the comments to match the new behavior discussed in [3] and the [5] spec PR, which changes the return value in the case that a customized built-in element constructor throws an exception. With the change above, that is actually already the behavior. So this is just a comment change. Two new tests are added to customized-built-in-constructor-exceptions.html. [1] https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token [2] https://dom.spec.whatwg.org/#concept-create-element [3] whatwg/html#5084 [4] https://crbug.com/1024866 [5] whatwg/dom#797 [email protected] (cherry picked from commit 7101418f85a0f17e4f9a35dfe3a9acff76340a93) Bug: 1071059, 1024866 Change-Id: I814c81991eb5e83501304bcb3d2da476743aef52 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Closes whatwg/html#5084. /cc @tkent-google @bzbarsky and also @mfreed7 since he's been working on custom element bugs in Chromium recently.
This needs tests; maybe one of you all would be able to adapt the code in whatwg/html#5084 into such tests? Be sure to test the question as to whether the element retains its identity or not.
Preview | Diff