-
Notifications
You must be signed in to change notification settings - Fork 299
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
Introduce moveBefore()
state-preserving atomic move API
#1307
Open
domfarolino
wants to merge
57
commits into
main
Choose a base branch
from
state-preserving-atomic-move
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
0d30952
Initial atomic move skeleton
domfarolino 3073a9c
Most of the `MutationObserver` integration
domfarolino 6670500
Remove mutation events flag references
domfarolino 85d32be
Populate the `MutationRecord`
domfarolino 945189c
Fix punctuation
domfarolino 8ecd282
Remove trailing whitespace
domfarolino b798d9a
`<span>` -> `<a>` plus fix punctuation error
domfarolino e5bb880
Camel case
domfarolino 70e1531
Throw an exception on failure
domfarolino 512ab18
Introduce move primitive + moving steps hook/extension
domfarolino 2afc546
Remove changes to insertion primitive
domfarolino 0862078
Revert document flag and mutation record changes
domfarolino c59a7e5
Fix mutation record callsites
domfarolino 30fc53c
Fix wrapping
domfarolino c53fba8
Remove suppress observers flag
domfarolino 47e97f0
Custom element integration
domfarolino 75f5c75
Update live ranges and NodeIterators properly; do not call the remove…
domfarolino 5aa8a70
Correct removal bookkeeping
domfarolino fe7c678
Moving steps prose
domfarolino cfe40ff
Tighten up pre-move checks
domfarolino 1d0f90e
Assert -> throw condition
domfarolino abb3c4a
Move conditions into pre-move validity
domfarolino 73bdd6d
Fix `<old>`
domfarolino 3ae1115
Ordering and format
domfarolino 45d089c
Fix live range updating logic
domfarolino 62cf625
Document `move` primitive in Range note
domfarolino 457c410
Enable moves in a connected `ShadowRoot` `DocumentFragment` node
domfarolino 41b1742
Do not explicitly rethrow
domfarolino fedd42b
Do not do special range handling
domfarolino cb549ca
Support both connected->connected and disconnected->disconnected
domfarolino 2bc9213
Whitespace and formatting
domfarolino f1cf126
Factor our live range pre-removal steps
domfarolino a40701d
newParent, newPreviousSibling, and count
domfarolino 7bcdeb2
Only queue connectedMoveCallback if connected
domfarolino 22ff396
Revert random editorial change
domfarolino 9478d7f
Remove newline
domfarolino fd643dc
Remove manual custom element upgrade
domfarolino 3d0651d
Compare node documents instead of shadow-including roots
domfarolino f5c1e83
Align pre-move and pre-insertion conditions
domfarolino bc64f9a
Add document-is-parent pre-move conditions
domfarolino d6436f4
Remove unnecessary checks now that we have root checks
domfarolino 41e8864
Live range rename
domfarolino 7c781c5
Empty arguments
domfarolino b0a10e4
Update dom.bs
domfarolino 21ee3c1
Update dom.bs
domfarolino 3c8ba6d
Remove run these steps
domfarolino c6aaace
Move to ParentNode, simplify pre-move conditions, add web developer box
domfarolino 227fd9d
nits
annevk 145d726
nit
annevk 4b54a0d
actually, pre-removing here is better
annevk 90d8339
Make moveBefore() return undefined
domfarolino 8e1d36d
Fold more into the move algorithm
domfarolino bb1a060
Document for reference, and this->newParent
domfarolino f3f2ab2
Update moving steps link to be consistent with other extension hooks,…
domfarolino 32a8a68
Fire slotchange events on the removal and insertion during moveBefore
domfarolino de2d428
Remove incorrect `data-x` and `span`
domfarolino 5ce7c8a
Wrapping
domfarolino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Aren't we missing the steps needed to track the case when slot element itself if moving. In the "remove" algorithm step 14.
And I didn't immediately see tests for moving slots.