Emilio Cobos Álvarez
e885ccb7ae
layout-2020: build fixes.
2019-12-16 14:23:56 +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
58b7005a9b
Make for_maybe_position_relative
take care of relative adjustment.
2019-12-13 13:13:50 +01:00
Simon Sapin
b218957461
Rename CollectedAbsolutelyPositionedBox
to HoistedAbsolutelyPositionedBox
2019-12-13 12:44:05 +01:00
Simon Sapin
53a8a609d2
Fix a width v.s. height confusion bug in abspos layout
2019-12-13 00:09:43 +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
9edda952c9
Make adjust_static_positions a method of PositioningContext
2019-12-12 15:43:50 +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
53ce714005
Fix a “Accessing content size that was not requested” panic
...
Percentage `width` are treated as `auto` for the purpose of
min/max-content computation, so they also need to be considered
when testing “wether width is auto”
2019-12-10 15:11:53 +01:00
Simon Sapin
a17db217a1
Struct with named fields over large tuple
2019-12-10 15:11:53 +01:00
Simon Sapin
be8df1d114
Move solve_axis
function to module level
2019-12-10 15:11:53 +01:00
Simon Sapin
29067225a4
Conditionsals over closures
2019-12-10 15:11:53 +01:00
Simon Sapin
c07c980501
Delayed initialization over mutation
2019-12-10 15:11:53 +01:00
Simon Sapin
1fa20e93d0
Implement replaced abspos
2019-12-10 15:11:53 +01:00
Simon Sapin
1fcdde99cb
Move two AbsoluteBoxOffsets fields into a Vec2
2019-12-10 15:11:53 +01:00
Simon Sapin
e86222d6bb
Remove AbsoluteBoxOffsets’s type parameter
2019-12-10 15:11:53 +01:00
Simon Sapin
f43dc3afcb
Remove inline/block_size from AbsolutelyPositionedFragment
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
dd9dfc66e3
Use a new BoxContentSizes
enum instead of Option<ContentSizes>
2019-12-04 15:36:05 +01:00
Simon Sapin
38e8fd1e99
Replace boolean parameters by a new ContentSizesRequest
enum
2019-12-04 15:10:11 +01:00
Simon Sapin
6763e7e4ae
Review nits
2019-12-04 14:22:13 +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
46f0f7d7e2
Implement shrink-to-fit for abspos
2019-12-03 15:11:35 +01:00
Simon Sapin
efa1885e1b
Remove IndependentFormattingContext::layout
...
Callers should handle replaced v.s. not separately
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
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
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
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