Better named MathContext.layout_*() methods
#3455
Merged
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.
This is a refactoring PR for better readability.
This PR renamed
MathContext'slayout_fragment/layout_fragments/layout_row/layout_frameintolayout_into_fragment/layout_into_fragments/layout_into_row/layout_into_frame, because these four functions are laying out an input math-layoutable elem into the intended type:MathFragment,Vec<MathFragment>,MathRow,Frame.They are different from the other
layout_*()methods: e.g.layout_contentlays out aContent(not laying out an elem into aContent), layout_box lays out aBoxElem(not laying out an elem into aBoxElem) etc.Renaming them helps differentiate the two kinds of
layout*().Plus,
layout_roothas exactly the same body aslayout_row, and this PR unifies the two intolayout_row.