Commit graph

78 commits

Author SHA1 Message Date
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
Anthony Ramine
b2f6cc7144 Introduce BlockLevelJob 2019-12-13 17:51:06 +01:00
Simon Sapin
1c8d14ac0d Upgrade rayon_croissant to 0.2.0 2019-12-12 18:57:18 +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
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
c056e5b6b0 Finish plumbing intrinsic min/max-content through box construction 2019-12-03 15:11:35 +01:00
Simon Sapin
da36fcddb0 Add box construction for 'inline-block'…
… and other atomic inline-level boxes.
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
78bfa45eab Add a Target struct for mapfold_reduce_into call 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
4e6e31a76c Pass a LayoutContext through box construction 2019-12-02 22:26:49 +01:00
Simon Sapin
9c5a595044 Add intrinsic size computation for inline formatting contexts 2019-12-02 22:11:54 +01:00
Anthony Ramine
48a4a82a49 Make InlineLevelBox::Atomic store an IndependentFormattingContext 2019-12-01 10:51:25 +01:00
Anthony Ramine
ecfb82260c Fix an unimplemented in layout 2020 2019-12-01 10:51:19 +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
Simon Sapin
22f5e07765 2020: define DisplayInside and DisplayOutside enums separately from Stylo 2019-10-24 10:44:31 +02:00
Anthony Ramine
6345e353d4 Handle inline-block as block for now in layout 2020
That makes Servo not panic when loading servo.org.
2019-10-11 16:43:52 +02:00
Anthony Ramine
e90fae52e5 Remove a wrong assertion 2019-10-08 13:42:41 +02:00
Anthony Ramine
0c156c60c2 Handle anonymous style in end_inline_formatting_context 2019-09-23 20:31:43 +02:00
Anthony Ramine
9cef3eee65 Uncomment more stuff related to box construction 2019-09-19 11:58:07 +02:00
Anthony Ramine
c08cfbb5f3 Cheat the system and use an Arc in BoxSlot
Ideally we want to be able to borrow from the DOM during box construction
but that's not playing very well at the moment with the current bridge
between script and layout.
2019-09-19 11:24:50 +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