-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix source insertion/moving/removing steps #11137
Conversation
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.
LGTM, not sure if @annevk wants to take a look since he raised the issue, so maybe give him a day or two in case.
See whatwg/html#11113. Since the test added here passes in all browsers, we can remove the spec text indicating that the source element's removing and moving steps somehow keep track of the previous position's "next sibling" pointer. See also whatwg/html#11137. R=domenic Bug: N/A Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d
See whatwg/html#11113. Since the test added here passes in all browsers, we can remove the spec text indicating that the source element's removing and moving steps somehow keep track of the previous position's "next sibling" pointer. See also whatwg/html#11137. R=domenic Bug: N/A Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453 Reviewed-by: Domenic Denicola <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1433512}
See whatwg/html#11113. Since the test added here passes in all browsers, we can remove the spec text indicating that the source element's removing and moving steps somehow keep track of the previous position's "next sibling" pointer. See also whatwg/html#11137. R=domenic Bug: N/A Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453 Reviewed-by: Domenic Denicola <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1433512}
See whatwg/html#11113. Since the test added here passes in all browsers, we can remove the spec text indicating that the source element's removing and moving steps somehow keep track of the previous position's "next sibling" pointer. See also whatwg/html#11137. R=domenic Bug: N/A Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453 Reviewed-by: Domenic Denicola <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1433512}
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.
This looks good to me. @smaug---- spotted the original issue and maybe wants to take a look at this fix.
Is that true? Are there tests for this? I'm just looking at https://searchfox.org/mozilla-central/rev/f07a6b1e84a609fbf9746f67be9edd43b3ed3362/dom/html/HTMLPictureElement.cpp#63-70 |
See the linked tests in the OP, where I test two img elements inside the picture element. |
That test relies on moveBefore. How do browsers behave when moving nodes without moveBefore? And if I'm reading wubkat correctly, the PR doesn't match webkit exactly either https://searchfox.org/wubkat/rev/d8448d088fe3ea650b82638e4aacbbcd38b078e5/Source/WebCore/html/HTMLSourceElement.cpp#92-102 |
The test also uses |
…ion test, a=testonly Automatic update from web-platform-tests Add 'next sibling' source relevant mutation test See whatwg/html#11113. Since the test added here passes in all browsers, we can remove the spec text indicating that the source element's removing and moving steps somehow keep track of the previous position's "next sibling" pointer. See also whatwg/html#11137. R=domenic Bug: N/A Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453 Reviewed-by: Domenic Denicola <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1433512} -- wpt-commits: c29189937f2794b23486f6d7b3bdf8326fb05ddb wpt-pr: 51381
This PR closes #11113. While standardizing the
moveBefore()
integration in #10657, we discovered that no browser's removing or moving steps rely on the 'next sibling' pointer associated with the old element's position. After writing a test, we also discovered that the same goes for the insertion steps. In all cases, when the parent (old parent, for removing/moving steps) is a<picture>
element, a relevant mutation is triggered for all<img>
children of the parent. This PR updates the spec to reflect this.(See WHATWG Working Mode: Changes for more details.)
/embedded-content.html ( diff )