Martin Robinson
c3b1c92ac1
layout_2020: Paint hoisted positioned fragments in tree order
...
Instead of painting hoisted position fragments in the order to which
they are hoisted, paint them in tree order and properly incorporate them
into the stacking context.
We do this by creating a placeholder fragment in the original tree position
of hoisted fragments. The ghost fragment contains an atomic id which
links back to the hoisted fragment in the containing block.
While building the stacking context, we keep track of containing blocks
and their children. When encountering a placeholder fragment we look at
the containing block's hoisted children in order to properly paint the
hoisted fragment.
One notable design modification in this change is that hoisted fragments
no longer need an AnonymousFragment as their parent. Instead they are
now direct children of the fragment that establishes their containing block.
2020-03-11 12:47:06 +01:00
Fernando Jiménez Moreno
5cbe05366b
Add layout debugger support to layout_2020
2020-02-21 11:11:00 +01:00
Simon Sapin
850f52c327
Upgrade to rustc 1.42.0-nightly (3291ae339 2020-01-15)
2020-01-16 08:46:41 +01:00
Simon Sapin
58b7005a9b
Make for_maybe_position_relative
take care of relative adjustment.
2019-12-13 13:13:50 +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
2c124b9d0b
Add inline_size_is_auto
2019-12-03 15:11:35 +01:00
Simon Sapin
6a5b8337a1
Rename IntrinsicSizes to ContentSizes
2019-12-03 15:11:35 +01:00
Simon Sapin
9c5a595044
Add intrinsic size computation for inline formatting contexts
2019-12-02 22:11:54 +01:00
Simon Sapin
aa925a5984
Un-allow and fix warnings in components/layout_2020
2019-12-02 16:32:34 +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
Simon Sapin
80eec48d37
Use std::mem::take instead of defining it
2019-11-26 15:42:27 +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
b3d30d284e
Start implementing text in layout 2020
2019-11-25 10:54:46 +01:00
Anthony Ramine
1446756774
Pass a LayoutContext to TextRun::layout in 2020
2019-11-25 10:54:46 +01:00
Simon Sapin
22f5e07765
2020: define DisplayInside and DisplayOutside enums separately from Stylo
2019-10-24 10:44:31 +02:00
Simon Sapin
cfc3ffcd54
2020: paint background-color
2019-10-24 10:44:31 +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
4444c5a2ad
Import victor's layout system 🍷
2019-09-11 10:36:30 +02:00
Anthony Ramine
d0d4bb7c99
Kill fragments
2019-09-11 10:06:32 +02:00
Simon Sapin
3e6489f543
Remove layout_2020::display_list, use WebRender display lists instead
2019-09-07 19:38:44 +02:00
Anthony Ramine
053e361e2f
Remove more stuff from layout_2020
2019-08-13 13:45:05 +02:00
Anthony Ramine
317d700f5d
Remove most of the things in layout 2020
...
We keep mostly the query system. There is probably more to delete but
that's a good start I think.
2019-07-31 17:09:17 +02:00
Anthony Ramine
4846d76e82
Make layout_2020 be layout_2013
2019-07-31 17:09:16 +02:00
Simon Sapin
2b01c26aa5
Add ./mach build --with-layout-2020
...
… with corresponding `layout` and `layout_thread` crates,
which for now do nothing.
2019-07-04 18:16:44 +02:00