diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-07-21 00:09:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-21 00:09:00 -0400 |
commit | 132d8b46014eb3a1db7721b603d5b994c95e8d5e (patch) | |
tree | df013bf75320e06cc09e4b3beea846a5ac65f677 /components/script/dom/gpuqueue.rs | |
parent | 59841377c2e02d6e84a2dda6275178c52f14d5a1 (diff) | |
parent | 5b36d211b4c9c289c7884abf170f4e2702863fae (diff) | |
download | servo-132d8b46014eb3a1db7721b603d5b994c95e8d5e.tar.gz servo-132d8b46014eb3a1db7721b603d5b994c95e8d5e.zip |
Auto merge of #27216 - pcwalton:floats-2020, r=Manishearth
Implement core float layout for layout 2020
<!-- Please describe your changes on the following line: -->
Add an implementation of the core float and clear placement logic in layout 2020, not yet wired to the rest of layout.
This commit implements an object that handles the 10 rules in CSS 2.1:
https://www.w3.org/TR/CSS2/visuren.html#float-position
The implementation strategy is that of a persistent balanced binary search tree
of float bands. Binary search trees are commonly used for implementing float
positioning; e.g. by WebKit. Persistence enables each object that interacts
with floats to efficiently contain a snapshot of the float list at the time
that object was laid out. That way, incremental layout can invalidate and start
reflow at any point in a containing block.
This commit features extensive use of
[QuickCheck](https://github.com/BurntSushi/quickcheck) to ensure that the rules
of the CSS specification are followed.
Because this is not yet connected to layout, floats will not actually be laid
out in Web pages yet.
Note that unit tests as set up in Servo currently require types that they
access to be public. Therefore, some internal layout 2020 types that were
previously private have been made public. This is somewhat unfortunate.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom/gpuqueue.rs')
0 files changed, 0 insertions, 0 deletions