Martin Robinson
8de55695e4
Have transforms and filters be CBs for all descendants in layout_2020
...
This is a feature that was never properly implemented in the previous
layout system. We still need to preserve their in-tree order in the
display list though.
2020-03-02 11:47:00 +01:00
Fernando Jiménez Moreno
a042f85083
Dump box tree state into json files and display it on layout 2020 viewer
2020-02-21 11:11:00 +01:00
Fernando Jiménez Moreno
5cbe05366b
Add layout debugger support to layout_2020
2020-02-21 11:11:00 +01:00
Martin Robinson
d03560b0f1
Add layout_2020 support for filters and mix-blend-mode
2020-02-19 10:26:13 +01:00
Martin Robinson
9517190a60
Split stacking context fragments into sections in layout_2020
...
This allows rendering stacking context content in the proper order. We
also need to add a new pseudo stacking context for atomic inlines in
order to preserve proper rendering order in some cases.
2020-02-17 14:10:03 +01:00
Martin Robinson
4a2787b974
Add initial stacking context paint order support to layout_2020
...
This adds very rudimentary support for paint order in stacking context.
In particular z-index is now handled properly, apart from issues with
hoisted fragments.
2020-02-17 10:05:19 +01:00
Martin Robinson
843df5b529
Add support for a stacking context pass to layout_2020
...
This adds an intermediary data structure that allows the display list
builder to move through the fragment tree in stacking context painting
order. Spatial nodes are built during this phase and all display list
items are added to the end of the display list.
2020-02-14 10:57:45 +01:00
Simon Sapin
53d5e29c7b
Replace iterate_through_fragments
with a callback returning bool
with find
/ Option<T>
2020-02-11 14:02:22 +01:00
Simon Sapin
d353e08529
Deduplicate the loop in iterate_through_fragments
2020-02-11 14:02:22 +01:00
Simon Sapin
ef8c51c4b1
Exit iterate_through_fragments through all recursion levels when the callback says so
2020-02-11 14:02:22 +01:00
Martin Robinson
fa7839270d
Add layout_2020 support for NodeGeometryQuery and ContentBoxQuery
2020-02-11 14:02:19 +01:00
Martin Robinson
02deb99a05
Use euclid data types for physical structs in layout_2020
...
This removes a bit of duplication and allows layout_2020 to benefit from
a much richer set of utilities.
2020-01-23 15:39:32 +01:00
Martin Robinson
1cd772fe5f
Answer content box queries for layout_2020 for the root element
...
This isn't correct yet, but it is necessary to give a value in order for
scrolling from script to work. Later this should give an accurate
content box response as well as work for non-root elements.
2020-01-21 15:29:23 +01:00
Martin Robinson
8825d588c1
Add initial support for scrollable overflow in layout_2020
...
This still isn't totally correct and non-root scrolling is not handled
at all, but the root frame now scrolls.
2020-01-21 15:29:23 +01:00
Martin Robinson
ea8c635344
Allow dumping the fragment tree in layout_2020
...
This is done when the dump-flow-tree debug option is passed.
2020-01-13 13:12:52 +01:00
Simon Sapin
53fc6143dc
Use the is_contentful field of DisplayListBuilder
2020-01-09 15:21:58 +01:00
Anthony Ramine
abc2c15c28
Store an OpaqueNode in boxes and fragments
2019-12-13 17:59:27 +01:00
Anthony Ramine
47944a39fc
Remove the Node type parameter from Contents
...
We now pass the Node as an argument during DOM traversal in layout.
2019-12-13 17:51:06 +01:00
Simon Sapin
5ebddf19e6
Layout position: fixed
in the initial containing block
2019-12-12 22:50:11 +01:00
Simon Sapin
c44ee516a1
Give PositioningContext
more responsibilities
...
Iits details are now private to the module.
It has a couple methods that take closures to make sure that "before" and "after" steps are done together:
* In an absolutely positioned box, take care of nested abspos (establish a new containing block, etc.)
* For a box that *might* be `position: relative`, optionally take care of the same.
2019-12-12 22:50:11 +01:00
Simon Sapin
b43a3de51d
Introduce PositioningContext
2019-12-12 15:37:01 +01:00
Simon Sapin
c895e3d236
Disable use of rayon with --layout-threads 1
instead of panicking
2019-12-10 18:41:24 +01:00
Simon Sapin
f09c14aa6b
impl From<&'_ DefiniteContainingBlock> for ContainingBlock
2019-12-10 15:11:53 +01:00
Simon Sapin
fa1adf2ad3
Containing blocks contains styles rather than just a writing mode
2019-12-07 14:25:16 +01:00
Simon Sapin
40ad9a722d
Use the WritingMode bitflags from Stylo
2019-12-07 12:45:36 +01:00
Simon Sapin
38e8fd1e99
Replace boolean parameters by a new ContentSizesRequest
enum
2019-12-04 15:10:11 +01:00
Simon Sapin
cfdd23ac16
Add a request_content_sizes
parameter to IndependentFormattingContext::construct
2019-12-03 15:11:35 +01:00
Simon Sapin
4e6e31a76c
Pass a LayoutContext through box construction
2019-12-02 22:26:49 +01:00
Simon Sapin
aa925a5984
Un-allow and fix warnings in components/layout_2020
2019-12-02 16:32:34 +01:00
Anthony Ramine
5a360ac63d
Start supporting images in layout 2020
2019-12-01 10:56:33 +01:00
Anthony Ramine
858bc5aca6
Split FlowChildren in IndependentLayout and FlowLayout
...
The result of doing the layout of an independent formatting context
should be unconcerned with margin collapsing.
2019-11-26 16:36:24 +01:00
Anthony Ramine
24b7eadfff
Make NodeExt private in layout_2020
2019-11-26 16:36:24 +01:00
Simon Sapin
b2b3ea992c
Make IndependentFormattingContext a struct that owns styles
...
… and has a private enum for its contents.
Privacy forces the rest of the code to go through methods
rather than matching on the enum,
reducing accidental layout-mode-specific behavior.
2019-11-26 15:42:27 +01:00
Anthony Ramine
1446756774
Pass a LayoutContext to TextRun::layout in 2020
2019-11-25 10:54:46 +01:00
Simon Sapin
cfc3ffcd54
2020: paint background-color
2019-10-24 10:44:31 +02:00
Simon Sapin
4e8eeda976
2020: add and call Fragment::build_display_list
2019-10-24 10:43:08 +02:00
Simon Sapin
e38cc1a549
2020: run layout after box construction
2019-10-24 10:43:08 +02:00
Simon Sapin
1bb85ed05b
Make some of layout_2020 private
2019-10-04 17:51:05 +02:00
Anthony Ramine
ec74204fa0
Call BoxTreeRoot::construct from layout_thread_2020
2019-10-04 10:03:42 +02:00
Anthony Ramine
9cef3eee65
Uncomment more stuff related to box construction
2019-09-19 11:58:07 +02:00
Anthony Ramine
4444c5a2ad
Import victor's layout system 🍷
2019-09-11 10:36:30 +02:00
Simon Sapin
86904757e6
Import files from Victor
...
fdb11f3e87
2019-09-11 10:06:35 +02:00