-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1908069 - Introduce PlaceFlags parameter to MathML layout methods…
…. r=emilio MathML classes has a few Place*() methods used for layout and intrinsic size calculation. These methods have a parameter "aPlaceOrigin" indicating whether the children and other painted objects should have their final positions set, or if the method is only called for measuring. This parameter is typically set to false when doing intrinsic size calculation or when performing some non-final measurement for operator stretching. For intrinsic size calculation, it is generally enough to perform placement with aPlaceOrigin=false and ignoring the vertical metrics. Some Place*() methods also have a parameter "aWidthOnly" for special handling. For example, msqrt stretches a radical symbol vertically to match the height of the content but when doing intrinsic size calculation this is approximated to nsMathMLChar::GetMaxWidth() instead. When we implement border/padding/margin we should also be able to choose between using IntrinsicISizeOffsets() or GetUsed*() methods. Finally, some Place*() methods initially call a place routing of a parent class before further tweaking the layout. For example, msqrt uses mrow layout on children and adds some radical symbol on top of them. When we implement border/padding, we should make sure we don't add the border/padding before the final result. In order to handle all these placement behaviors, a new EnumSet is introduced. This commit does not change behavior. Handling of padding, border and margin will be handled in follow-up patches. Differential Revision: https://phabricator.services.mozilla.com/D216669
- Loading branch information
Showing
17 changed files
with
154 additions
and
114 deletions.
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
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
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
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
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
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
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
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
Oops, something went wrong.