Anthony Ramine
abc2c15c28
Store an OpaqueNode in boxes and fragments
2019-12-13 17:59:27 +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
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
14ddf39215
Rename ReplacedContent::used_size to used_size_as_if_inline_element
2019-12-10 15:11:53 +01:00
Simon Sapin
b73eb49a58
Add sizing of inline replaced boxes
2019-12-10 12:36:43 +01:00
Simon Sapin
bf96988260
Add min/max-width/height support for inline-block
...
(… and other non-replaced atomic inline-level boxes.)
2019-12-10 12:36:43 +01:00
Simon Sapin
9f4b1a0f14
Implement text-align
(except justify
)
2019-12-07 14:31:45 +01:00
Simon Sapin
6d91d77fba
Rename content_rect to rect in TextFragment and ImageFragment
...
Since they don’t have padding etc.
2019-12-07 14:25:16 +01:00
Simon Sapin
ce9fc3e651
Rename LineBoxes to Lines, since it contains fragments
2019-12-07 14:25:16 +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
dd9dfc66e3
Use a new BoxContentSizes
enum instead of Option<ContentSizes>
2019-12-04 15:36:05 +01:00
Simon Sapin
6763e7e4ae
Review nits
2019-12-04 14:22:13 +01:00
Simon Sapin
607df04849
Replace a large tuple return type with a new struct
2019-12-04 13:56:42 +01:00
Simon Sapin
038f83fbc5
Replace a pair of macros by methods
2019-12-04 13:47:59 +01:00
Simon Sapin
34e8cda801
Rename ReplacedContent::layout to make_fragments and simplify its API
2019-12-03 15:11:35 +01:00
Simon Sapin
b8db9459bc
Add layout for 'inline-block' and other atomic inline-level boxes
2019-12-03 15:11:35 +01:00
Simon Sapin
c056e5b6b0
Finish plumbing intrinsic min/max-content through box construction
2019-12-03 15:11:35 +01:00
Simon Sapin
303b36f17b
Add content sizes computation for block containers
2019-12-03 15:11:35 +01:00
Simon Sapin
cfdd23ac16
Add a request_content_sizes
parameter to IndependentFormattingContext::construct
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
48a4a82a49
Make InlineLevelBox::Atomic store an IndependentFormattingContext
2019-12-01 10:51:25 +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
85b2a4dc64
Support line_height better in layout 2020
2019-11-25 10:54:46 +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
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