script: Replace usage of IntersectionObserverRootMargin with Stylo'sIntersectionObserverMargin#38519
Merged
Merged
Conversation
repeated code. Additionally moved resolve_percentages_with_basis() to work with wrapper. --------------------------- Signed-off-by: samir <[email protected]>
Member
stevennovaryo
left a comment
There was a problem hiding this comment.
Looking good! Several suggestions to go.
mrobinson
requested changes
Aug 8, 2025
| } | ||
|
|
||
| // TODO(stevennovaryo): move this to the wrapper later | ||
| impl IntersectionObserverRootMargin { |
Member
There was a problem hiding this comment.
Is this the only utility function? If so maybe we can remove the wrapper entirely and just inline this code.
Member
There was a problem hiding this comment.
Yes it is. Are you referring to something like this? #38519 (comment)
Contributor
Author
There was a problem hiding this comment.
I have implemented the changes by referencing Stylo's implementation of IntersectionObserverMargin where applicable and moved resolve_percentages_with_basis under IntersectionObserver. Removed the intersectionobserverrootmargin.rs and changes mod.rs to not reference it.
IntersectionObserverRootMargin a wrapper around stylo::IntersectionObserverMargin
call it directly instead of using a local clone of the struct. All references to the local clone of the struct has now been moved to the upstream implementation. Additionally, custom functions added to the local clone has been reimplemented directly within intersectionobserver.rs Signed-off-by: samir <[email protected]>
IntersectionObserverMargin struct. As Stylo's implementation is now visible, it is no longer required. Changed mod.rs file to not reference deleted file. Signed-off-by: samir <[email protected]>
Signed-off-by: samir <[email protected]>
IntersectionObserverRootMargin a wrapper around stylo::IntersectionObserverMarginIntersectionObserverRootMargin with Stylo'sIntersectionObserverMargin
mrobinson
approved these changes
Aug 9, 2025
Member
|
Nice cleanup! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
@stevennovaryo
Created wrapper for Stylo's IntersectionObserverMargin and cleaned up repeated code.
Testing: Code compiles and
./mach test-unit tests/unit/style/doesn't have any errors. intersectionobserver.rs is able to utilize the struct.Fixes: #35907
Signed-off-by: samir [email protected]