aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flow
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename BoxTreeRoot/FragmentTreeRoot to BoxTree/FragmentTreeSimon Sapin2020-05-152-44/+60
|
* Set in the DOM the box generated by the root elementSimon Sapin2020-05-151-29/+49
|
* `display: contents` computes to `block` on the root elementSimon Sapin2020-05-151-8/+8
|
* Auto merge of #26477 - mrobinson:layout-2020-get-computed-value, r=jdmbors-servo2020-05-111-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for getComputedStyle() to layout_2020 These changes add support for `getComputedStyle()` to layout_2020. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * layout_2020: Add initial support for getComputedStyleMartin Robinson2020-05-111-6/+8
| | | | | | | | | | | | | | This implementation is more-or-less on par with the one from layout_2013 and in some cases better. There are still some cases where we don't return the correct "resolved value," but this is enough to test animations and transitions.
* | layout_2020: Add support for transform-styleMartin Robinson2020-05-111-1/+1
|/ | | | | This requires creating a matching stacking context for every reference frame and also properly placing those stacking contexts inside them.
* Remove use of some other unstable featuresSimon Sapin2020-04-152-3/+8
|
* Auto merge of #26079 - servo:box-sizing, r=noxbors-servo2020-04-012-107/+73
|\ | | | | | | Implement the `box-sizing` property
| * Less cloningSimon Sapin2020-04-011-1/+1
| |
| * Implement the `box-sizing` propertySimon Sapin2020-03-312-32/+22
| |
| * Introduce a `PaddingBorderMargin` helperSimon Sapin2020-03-312-79/+55
| |
* | Auto merge of #26075 - servo:facepalm, r=jdmbors-servo2020-03-311-1/+1
|\| | | | | | | Don’t forget to apply the inline-start margin to blocks 🤦
| * Don’t forget to apply the inline-start margin to blocks 🤦Simon Sapin2020-03-311-1/+1
| |
* | Make LayoutNodeHelpers::text_content return a cowAnthony Ramine2020-03-311-1/+7
|/
* Auto merge of #26048 - nox:layout-2020-transparent-data, r=jdmbors-servo2020-03-281-1/+1
|\ | | | | | | Give a lifetime parameter to LayoutDom
| * Add a 'dom lifetime to GetLayoutDataAnthony Ramine2020-03-261-1/+1
| |
* | layout_2020: Use ArcRefCell to track hoisted fragmentsMartin Robinson2020-03-273-44/+41
| | | | | | | | | | | | | | | | | | | | | | This avoids the use of lookup tables for containing blocks when constructing the stacking context tree. This seems to catch some laid-out hoisted fragments that were otherwise dropped in the previous design. The changes cause one new test to pass and one to fail. Visual examination of the failing tests reveals that it's a progression (list markers are appearing when they were previously not rendered).
* | Auto merge of #26037 - mrobinson:arcrefcell-fragment-tree, r=SimonSapinbors-servo2020-03-261-47/+14
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | layout_2020: Use ArcRefCell in the fragment tree This will allow mutability which is useful for things like animations. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * layout_2020: Use ArcRefCell in the fragment treeMartin Robinson2020-03-251-47/+14
| | | | | | | | This will allow mutability which is useful for things like animations.
* | Auto merge of #25888 - ferjm:text.decoration.2020, r=noxbors-servo2020-03-234-16/+67
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Partial text decoration support for layout 2020 - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25166 - [X] There are tests for these changes
| * | Propagate text decoration where neededFernando Jiménez Moreno2020-03-234-19/+59
| | |
| * | Do not use buggy text_decorations_in_effectFernando Jiménez Moreno2020-03-231-0/+14
| | |
| * | Store required font metrics on TextFragmentFernando Jiménez Moreno2020-03-231-9/+6
| |/
* / layout_2020: Use the containing block more when calculating scrolling overflowMartin Robinson2020-03-231-1/+1
|/ | | | | | When calculating scrolling overflow calculation we cannot currently use the actual containing block in all cases. This change increases the amount that we do use the containing block.
* layout_2020: Add support for hoisting positioned fragments in inline boxesMartin Robinson2020-03-191-11/+54
| | | | | | | | | Add support for tracking containing blocks when doing inline layout. This requires setting up a PositioningContext for inline boxes when necessary. Instead of using the PositioningContext helper methods and we reuse the contexts between line breaks. Fixes #25279.
* Make whitespace preservation computation recursive in order to fix lifetime ↵Patrick Walton2020-03-171-25/+45
| | | | issues
* Switch the standard slice iterator in inline layout to a custom one in order toPatrick Walton2020-03-172-10/+65
| | | | avoid lifetime problems
* Wrap `BlockLevelBox` and `InlineLevelBox` with `AtomicRefCell`Patrick Walton2020-03-174-93/+98
|
* Make AbsolutelyPositionedBox be 'staticAnthony Ramine2020-03-174-27/+27
|
* layout_2020: Paint hoisted positioned fragments in tree orderMartin Robinson2020-03-113-24/+51
| | | | | | | | | | | | | | | | | | | 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.
* Have transforms and filters be CBs for all descendants in layout_2020Martin Robinson2020-03-022-8/+9
| | | | | | 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.
* Rename AbsolutelyPositionedBox::layout to AbsolutelyPositionedBox::to_hoistedMartin Robinson2020-02-282-2/+2
| | | | | | This method doesn't actually do any layout, but converts this block to a HoistedAbsolutelyPositionedBox which is hoisted and then laid-out with its containing block later. This makes the code a little easier to read.
* Properly position atomic inline level boxesFernando Jiménez Moreno2020-02-271-1/+4
|
* Fix rebase issues and run Prettier on layout viewer codeFernando Jiménez Moreno2020-02-211-2/+1
|
* Dump box tree state into json files and display it on layout 2020 viewerFernando Jiménez Moreno2020-02-214-8/+12
|
* Add fragment debug idFernando Jiménez Moreno2020-02-212-2/+4
|
* Add layout debugger support to layout_2020Fernando Jiménez Moreno2020-02-211-0/+1
|
* Add layout_2020 support for filters and mix-blend-modeMartin Robinson2020-02-191-2/+2
|
* Split stacking context fragments into sections in layout_2020Martin Robinson2020-02-171-1/+1
| | | | | | 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.
* Add initial stacking context paint order support to layout_2020Martin Robinson2020-02-171-1/+3
| | | | | | 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.
* Add support for a stacking context pass to layout_2020Martin Robinson2020-02-141-1/+8
| | | | | | | 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.
* layout_2020: Avoid decomposing mixed length / percentages in intrinsic sizing.Emilio Cobos Álvarez2020-02-121-2/+6
| | | | As that makes no sense in presence of min / max.
* layout: Resolve word_spacing ahead of time.Emilio Cobos Álvarez2020-02-121-7/+19
| | | | | | | It's not possible anymore, in the presence of min() / max(), to split a <length-percentage> value into a <length> and a <percentage> component. Tweak word_spacing to do what Gecko does (resolving it in advance).
* Replace `iterate_through_fragments` with a callback returning `bool` with ↵Simon Sapin2020-02-111-53/+51
| | | | `find` / `Option<T>`
* Deduplicate the loop in iterate_through_fragmentsSimon Sapin2020-02-111-33/+25
|
* Exit iterate_through_fragments through all recursion levels when the ↵Simon Sapin2020-02-111-2/+6
| | | | callback says so
* Add layout_2020 support for NodeGeometryQuery and ContentBoxQueryMartin Robinson2020-02-111-56/+144
|
* Use euclid data types for physical structs in layout_2020Martin Robinson2020-01-231-34/+29
| | | | | This removes a bit of duplication and allows layout_2020 to benefit from a much richer set of utilities.
* Answer content box queries for layout_2020 for the root elementMartin Robinson2020-01-211-1/+40
| | | | | | 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.
* Add initial support for scrollable overflow in layout_2020Martin Robinson2020-01-213-44/+92
| | | | | This still isn't totally correct and non-root scrolling is not handled at all, but the root frame now scrolls.