aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/geom.rs
Commit message (Collapse)AuthorAgeFilesLines
* Layout 2020: Rename `flow_relative` types to `Logical...` (#30324)Martin Robinson2023-09-121-78/+75
| | | | | | This makes the names of flow relative geometry consistent with what is used in the style crate and removes them from a module. With this change it's more obvious what makes these types different from the ones in `euclid`.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-3/+6
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+2
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Flow inlines around floats (#30243)Martin Robinson2023-08-311-4/+15
| | | | | | | This implements the rest of the bulk of float support. Now inline element flow around floats and floats can be pushed down by inline elements before them. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Split line layout into two phases (#30089)Martin Robinson2023-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the first phase, we gather LineItems and then when we have enough to form a line we turn them into Fragments. This will make it possible to more simply implement `vertical-align` and `text-align: justify` because we need to measure the different aspects of the candidate line and then produce a Fragments. This is a general refactor of the way that inline layout works, so comes with some progressions. In addition there are some new failures. New failures: Some tests are now failing because only the test or reference is getting proper line height when it wasn't before. These should be fixed in a followup change that properly calculate line-height in more cases: - /_mozilla/css/list_style_position_a.html - /css/CSS2/floats/float-no-content-beside-001.html - /css/css-content/pseudo-element-inline-box.html - /css/css-flexbox/flexbox_flex-none-wrappable-content.html Some tests are now failing because floats are now placed properly, but are no longer in their inline box stacking contexts. These will be fixed by a followup change which properly parents them: - /css/filter-effects/filtered-inline-applies-to-float.html.ini - /css/css-color/inline-opacity-float-child.html.ini One test is failing due to floating point precision errors: - /css/CSS2/floats-clear/floats-141.xht.ini Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Place floats in layout 2020, but don't flow text around the floats yet.Patrick Walton2023-06-031-0/+22
| | | | | | | | | | | | | | | This commit puts floats behind the `layout.floats.enabled` pref, because of the following issues and unimplemented features: * Inline formatting contexts don't take floats into account, so text doesn't flow around the floats yet. * Non-floated block formatting contexts don't take floats into account, so BFCs can overlap floats. * Block formatting contexts that contain floats don't expand vertically to contain all the floats. That is, floats can stick out the bottom of BFCs, contra spec.
* Add an implementation of the core float and clear placement logic in layoutPatrick Walton2020-07-201-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2020, not yet wired to the rest of layout. This commit implements an object that handles the 10 rules in CSS 2.1: https://www.w3.org/TR/CSS2/visuren.html#float-position The implementation strategy is that of a persistent balanced binary search tree of float bands. Binary search trees are commonly used for implementing float positioning; e.g. by WebKit. Persistence enables each object that interacts with floats to efficiently contain a snapshot of the float list at the time that object was laid out. That way, incremental layout can invalidate and start reflow at any point in a containing block. This commit features extensive use of [QuickCheck](https://github.com/BurntSushi/quickcheck) to ensure that the rules of the CSS specification are followed. Because this is not yet connected to layout, floats will not actually be laid out in Web pages yet. Note that unit tests as set up in Servo currently require types that they access to be public. Therefore, some internal layout 2020 types that were previously private have been made public. This is somewhat unfortunate. Part of #25167.
* First pass at implementing the Flex Layout AlgorithmSimon Sapin2020-06-231-0/+14
| | | | https://drafts.csswg.org/css-flexbox/#layout-algorithm
* Less cloningSimon Sapin2020-04-011-18/+14
|
* Add layout debugger support to layout_2020Fernando Jiménez Moreno2020-02-211-3/+3
|
* Add layout_2020 support for filters and mix-blend-modeMartin Robinson2020-02-191-38/+0
|
* Fix combinations of `border-radius` and `background-clip`Simon Sapin2020-01-241-0/+50
|
* Use euclid data types for physical structs in layout_2020Martin Robinson2020-01-231-138/+40
| | | | | This removes a bit of duplication and allows layout_2020 to benefit from a much richer set of utilities.
* Add initial support for scrollable overflow in layout_2020Martin Robinson2020-01-211-0/+36
| | | | | This still isn't totally correct and non-root scrolling is not handled at all, but the root frame now scrolls.
* Allow dumping the fragment tree in layout_2020Martin Robinson2020-01-131-1/+14
| | | | This is done when the dump-flow-tree debug option is passed.
* Rustfmt recent changes.Emilio Cobos Álvarez2019-12-161-2/+6
|
* layout-2020: build fixes.Emilio Cobos Álvarez2019-12-161-7/+8
|
* Replace `percent_resolved_*` functions with methodsSimon Sapin2019-12-101-0/+35
|
* Containing blocks contains styles rather than just a writing modeSimon Sapin2019-12-071-1/+2
|
* Use the WritingMode bitflags from StyloSimon Sapin2019-12-071-23/+21
|
* Add some helpers to resolve percentages of box sizesAnthony Ramine2019-12-041-0/+9
|
* Un-allow and fix warnings in `components/layout_2020`Simon Sapin2019-12-021-21/+0
|
* More compact debug output for CSS valuesSimon Sapin2019-10-241-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` Rect { start_corner: Vec2 { i: 0.0 px, b: 0.0 px }, size: Vec2 { i: 1024.0 px, b: 20.0 px }, } ``` … instead of: ``` Rect { start_corner: Vec2 { inline: CSSPixelLength( 0.0, ), block: CSSPixelLength( 0.0, ), }, size: Vec2 { inline: CSSPixelLength( 1024.0, ), block: CSSPixelLength( 0.0, ), }, } ```
* 2020: paint background-colorSimon Sapin2019-10-241-0/+9
|
* Import victor's layout system 🍷Anthony Ramine2019-09-111-27/+31
|
* Import files from VictorSimon Sapin2019-09-111-0/+330
https://github.com/SimonSapin/victor/tree/fdb11f3e87f6d2d59170d10169fa6deb94e53b94