-
Notifications
You must be signed in to change notification settings - Fork 50.1k
[Fiber] Support SVG #8490
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
Merged
Merged
[Fiber] Support SVG #8490
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
4f7455d
Test that SVG elements get created with the right namespace
gaearon ebb80e8
Pass root to the renderer methods
gaearon ef639f6
Keep track of host instances and containers
gaearon 9aaf31b
Keep instances instead of fibers on the stack
gaearon d94aee1
Create text instances in begin phase
gaearon db2018c
Create instance before bailing on offscreen children
gaearon 2a090c1
Tweak magic numbers in incremental tests
gaearon 6899b38
Only push newly created nodes on the parent stack
gaearon b08ce9d
Fix lint
gaearon 44189e0
Fix Flow
gaearon 77fb926
Use the same destructuring style in scheduler as everywhere else
gaearon ce39123
Remove branches that don't seem to run anymore
gaearon dfcf07b
Be explicit about the difference between type and tag
gaearon 93de77f
Save and restore host context when pushing and popping portals
gaearon 6ab662c
Revert parent context and adding children in the begin phase
gaearon 840285b
Add a test for SVG updates
gaearon c2b8888
Record tests
gaearon 8dbd419
Read ownerDocument from the root container instance
gaearon c332d6f
Track namespaces instead of creating instances early
gaearon 836f829
Pop child context before reading own context and clarify API
gaearon a37d5e9
Give SVG namespace to <svg> itself
gaearon 1b3178b
Don't allocate unnecessarily when reconciling portals
gaearon 84e23ca
Add more tests for edge cases
gaearon aa57380
Fix up math namespace
gaearon b31cb3d
Maintain a separate container stack
gaearon dfd37c8
Fix rebase mistakes
gaearon 4240833
Unwind context on errors
gaearon f80f094
Merge master into fiber-svg-3
gaearon 4ba9d64
Reset the container state when reusing the object
gaearon f64f786
Add getChildHostContext() to ReactART
gaearon 79074b1
Record tests
gaearon 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 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
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
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
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
Oops, something went wrong.
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.
We'll need to replicate this to the separate repo. cc @bvaughn
Uh oh!
There was an error while loading. Please reload this page.
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.
Roger that.
I'll append it to my existing sync PR.Edit: Added to reactjs/react-art/pull/109 and merged.
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.
nit: I think it would be nice for us to alpha-sort
HostConfigprops to make it easier to scan for differences between fiber renderers. (At least it helps when things are changing fairly often due to fiber being in-flux.)Uh oh!
There was an error while loading. Please reload this page.
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.
We should make these optional so that they don't have to be added to every renderer. That way we can also do things like:
That way if the compiler knows that it is always undefined, it can dead-code eliminate everything in the
ifstatement. That's part of the reason I'd like to compile the renderer and host config together into one unit instead of making them share code.