Skip to content
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

Add letter-spacing property to RCSS #427

Conversation

igorsegallafa
Copy link
Contributor

Related to #426

image

image

…cation

- Improve readability and maintainability:
  - Better separation of classes, reduce available state.
  - Make classes better conform to CSS terminology.
  - Improve call-graph, flow from parent to child, avoid mutable calls into ancestors.
- Make layout more conformant to CSS specification.
  - Re-implement inline layouting.
  - Fixed more than a hundred CSS tests, including ACID1.
- Fix long-standing issues.
  - Allow tables and flexboxes to be absolutely positioned or floated.
  - Allow nested flexboxes: Flex items can now be flex containers themselves. mikke89#320
  - Better handle block-level boxes in inline formatting contexts. mikke89#392

Breaking changes:
- Reworked font engine interface, in particular in terms of font metrics.
- Possible layout changes, usually due to better CSS conformance.

Development commits:
- Add debug dump for layout tree
- Review function naming in layout engine
- WIP Start refactoring LayoutBlockBox (not compiling)
- Format
- Compiles again, all tests pass
- Refactoring
- Remove friend classes
- Remove dead code
- Add test for absolutely positioned and floated flex boxes
- Minor refactoring and formatting
- Format layout files
- Mini cleanup
- More const correctness
- Support for nested flex boxes, as well as flex boxes that are absolutely positioned or floated
- Small cleanup
- Float placement test
- Cleanup inline box
- Move Inline Container to own file
- Minor update display block test
- WIP inline formatting extreme makeover
- DumpTree rename
- WIP inline formatting
- WIP line box
- WIP inline boxes
- New inline formatting context (now compiling)
- Refactoring
- Add basic inline formatting visual test
- Fix formatting of inline block and replaced elements
- Update inline formatting visual test
- Refactoring
- Preparing for split fragments
- Update visual test
- Line wrapping
- Update visual test
- Layout tree dump: Use element attribute instead of id
- Line splitting
- Fix some spacing and line wrapping issues
- Fix placement of inline boxes
- Refactor inline layout
- Update visual tests
- Handle inline element splitting around block-level element, some refactoring
- Line box cleanup
- Refactor inline-level boxes
- Add new visual float test
- Minor
- Floating boxes and wrapping
- Floats can no longer wrap down lines which is set to 'white-space: nowrap'
- Fixes for overflow and scrollable content area
- Implement horizontal alignment in line boxes (text-align)
- Minifix
- Font engine interface: Refactor font metrics [breaking change]
- WIP Implement vertical-align, line box refactoring
- Top and bottom vertical alignment
- Baseline position of inline blocks
- Fix inline box height
- Use baseline position when adding ElementText lines
- Implement aligned subtrees for correct line-relative vertical alignment
- Fix float spacing
- Improved inline-block baseline
- Wrap if there is no available width
- More accurate static position for absolutely positioned elements
- Fix overflow padding sizing by subtracting scrollbar size
- Refactor inline layout
- Some cleanup, fix alignment of children of bottom-aligned inline boxes
- Inline layout cleanup
- Refactor inline layout
- Add new inline formatting test
- Update line box, linked open fragments
- Allow splitting all open inline boxes, collapsible line boxes
- Add tests for vertical-align and inline-block baseline
- Fix inline-block alignment
- Warn on missing font face when placing text, some cleanup
- Floating elements are now placed on the same line if they can fit next to the line's contents
- Add relative position test
- Add any ancestor relative positioning to our own position
- Properly resolve relative position of inline, floated, flex, and table elements
- WIP Formatting contexts
- WIP Make separate flex and table formatting contexts
- Small refactor block container constructor
- Extend overflow test
- WIP refactor overflow
- WIP More formatting contexts
- Refactor flex and table formatting
- Some cleanup
- Formatting context refactoring, remove offset root from block container
- Cleanup inline-block baseline
- Add visual test for static positions, update other tests
- Make containing blocks and offset parents more closely coincide
  - Partly change how absolute offsets and clipping regions are calculated, and enable static positions outside the current block formatting contexts
- Some refactoring
- Refactoring, make containing block more closely follow CSS behavior
- Handle indefinite containing blocks in some situations
- Share float space in block formatting context
- Some cleanup of block container
- Additional layout cleanup
- Add float text wrap test
- Fix repeated words on wrapped text
- Establish absolute positioning containing block when element has local transform or perspective
- Fix possible case of infinite loop in inline layout
- Cleanup floats, add test
- Fix overflowing floated boxes, cleanup, update tests
- Include floating space when determining the shrink-to-fit width
- Shrink-to-fit width uses available size
- Cleanup BuildBox
- Refactor formatting contexts and shrink-to-fit width
- Cleanup absolute positioning
- Refactor Layout
- More layout refactoring
- Cleanup block container
- More layout cleanup
- Formatting context cleanup
- More cleanup
- Further layout cleanup and comments
- Refactor layout pools
- Update Box user for previous change
- Fix some build issues
…rectly in several situations, including when set to block display, floated, or absolutely positioned.
…t (top/right/bottom/left) properties

- Auto margins now subtract any inset height or width.
- This allows inset properties to better control the position when using auto-margins.
@igorsegallafa
Copy link
Contributor Author

I'm still looking for a better / properly way to get the letter_spacing value on ElementUtilities::GetStringWidth() function.

@mikke89 mikke89 added enhancement New feature or request layout Layout engine issues and enhancements labels Mar 12, 2023
@mikke89
Copy link
Owner

mikke89 commented Mar 12, 2023

Thanks again for another PR, this looks pretty good overall.

Could you rebase this on top of the develop branch? That will be the next major version, and due to the breaking change here, I find it most suited to add it there. I'll give a more detailed review once that is done, cheers.

mwl4 and others added 2 commits March 12, 2023 15:31
@igorsegallafa igorsegallafa force-pushed the feature/add-letter-spacing-property-to-rcss branch from 30054c5 to 5973979 Compare March 12, 2023 18:34
@igorsegallafa igorsegallafa deleted the feature/add-letter-spacing-property-to-rcss branch March 12, 2023 18:35
@igorsegallafa
Copy link
Contributor Author

igorsegallafa commented Mar 12, 2023

Thanks again for another PR, this looks pretty good overall.

Could you rebase this on top of the develop branch? That will be the next major version, and due to the breaking change here, I find it most suited to add it there. I'll give a more detailed review once that is done, cheers.

I've decided to create a new PR based on develop branch #429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request layout Layout engine issues and enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants