aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flex.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove legacy layout (layout 2013) (#35943)Oriol Brufau2025-03-131-1152/+0
| | | | | | We were already not compiling it and not running tests on it by default. So it's simpler to just completely remove it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-8/+1
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* layout: Remove the obsolete layout tracing functionality (#35001)Martin Robinson2025-01-151-14/+0
| | | | | | | | | | | | | | | | | | | | There were two kinds of layout tracing controlled by the same debugging option: - modern layout: Functionality that dumped a JSON serialization of the layout tree before and after layout. - legacy layout: A scope based tracing that reported the process of layout in a structured way. I don't think anyone working on layout is using either of these two features. For modern layout requiring data structure to implement `serde` serialization is incredibly inconvenient and also generates a lot of extra code. We also have a more modern tracing functionality based on perfetto that we have started to use for layout and IMO it's actually being used and more robust. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Upgrade Stylo to 2024-10-04 (#33767)Oriol Brufau2024-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Upgrade Stylo to 2024-10-04 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D220285 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://bugzilla.mozilla.org/show_bug.cgi?id=1918093 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222817 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222856 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222532 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222533 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222534 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D223878 Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Enable min-content, max-content, fit-content and stretch (#33492)Oriol Brufau2024-09-201-5/+2
| | | | | | | | | For the sizing properties. We don't actually support them yet, just treating them as the initial value. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Convert layout to use Gecko's alignment style representation (#32790)Martin Robinson2024-07-171-34/+77
| | | | Signed-off-by: Nico Burns <nico@nicoburns.com> Co-authored-by: Nico Burns <nico@nicoburns.com>
* Lint layout_2013 with clippy (#31221)Oriol Brufau2024-01-301-12/+12
| | | | | | | | | * Lint layout_2013 with clippy CARGO_BUILD_RUSTC=rustc cargo clippy --fix -p layout_2013 --broken-code * ./mach fmt * Cosmetic adjustments
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-14/+17
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-1/+3
| | | | | | | | | | | * 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>
* build(deps): bump bitflags from 1.3.2 to 2.3.1 (#30273)Martin Robinson2023-09-011-1/+1
| | | | | | Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.3.1. - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.3.1)
* Servo build fixes.Emilio Cobos Álvarez2019-12-161-9/+9
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-1/+1
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* Remove unused code from gfx and layout cratesest312019-05-291-4/+0
|
* Fix servo build.Emilio Cobos Álvarez2019-02-231-3/+2
|
* style: Rename MozLength to Size, and MaxLength to MaxSize.Emilio Cobos Álvarez2019-02-121-29/+14
| | | | | | | | | | | | | MozLength is not a very descriptive name. If we're going to use it in both Gecko and Servo we may as well name it something more accurate. I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence of box-sizing. I don't have better ideas than `Size`, given that. [1]: https://drafts.csswg.org/css2/visudet.html#propdef-width [2]: https://drafts.csswg.org/css2/box.html#content-width Differential Revision: https://phabricator.services.mozilla.com/D19280
* Fix servo build.Emilio Cobos Álvarez2019-02-101-16/+25
|
* Remove FlexFlowDisplayListBuildingAnthony Ramine2019-01-141-3/+6
|
* Rustfmt recent changes.Emilio Cobos Álvarez2019-01-081-13/+9
|
* style: Fix servo build.Emilio Cobos Álvarez2019-01-081-15/+15
|
* style: Fix servo build.Emilio Cobos Álvarez2019-01-081-19/+17
| | | | | | This also fixes a bunch of calc handling issues and such. Also remove tests that no longer compile and are covered by WPT.
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-8/+9
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-8/+8
|
* Reorder importsPyfisch2018-11-061-3/+5
|
* Format remaining filesPyfisch2018-11-061-1/+2
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-13/+13
|
* Layout: Remove redundant deny unsafe and formatPyfisch2018-10-221-2/+0
| | | | | | Add license to two files. Bypass DisplayListBuilder for some items.
* Rustfmt layout cratePyfisch2018-09-011-232/+351
|
* layout: script: Fix build.Emilio Cobos Álvarez2018-06-231-1/+1
|
* style: Add support for 'flex-basis:content' in the style system.Emilio Cobos Álvarez2018-04-021-23/+11
| | | | | | Bug: 1105111 Reviewed-by: xidorn MozReview-Commit-ID: 5WhgHJJ0mDB
* Create own file for background calculations in layoutPyfisch2018-01-061-2/+2
| | | | | | | | | | Move display_list_builder.rs and webrender_helpers.rs along with the new file to components/layout/display_list/ Remove apparently unused IdType enum. Only variant used was OverflowClip. See #19676
* Turn flow::base and friends into methodsMatt Brubeck2017-12-141-6/+5
|
* style: Make all keywords CamelCase for consistency.Emilio Cobos Álvarez2017-12-061-20/+24
| | | | This prevents confusion and paves the ground for derive(Parse) of them.
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-8/+8
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-8/+8
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-8/+8
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-1/+1
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts.Simon Sapin2017-10-141-0/+4
|
* Auto merge of #18462 - mrobinson:cleanup-building-state, r=emiliobors-servo2017-09-151-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do some minor cleanups in display list building <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18462) <!-- Reviewable:end -->
| * Separate stacking context collection and display list building stateMartin Robinson2017-09-121-1/+2
| | | | | | | | | | | | | | These are two different passes during layout, but previously they shared a state object. While some of the members are the same, many are different so we separate them out into two separate objects. We also change the HashMaps of these state objects to use the FnvHashMap.
* | Use CSSPixelLength in LengthOrPercentage{*}.Boris Chiou2017-09-131-3/+3
|/ | | | | Replace Au with CSSPixelLength in LengthOrPercentage, LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
* Auto merge of #18175 - stshine:no-floats-in-flexbox, r=mbrubeckbors-servo2017-08-291-8/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | layout: Stop call normal block size assignment for flex container No need to call the `assign_block_size_block_base()` method of normal block in flex.rs since it is implemented for CSS2. <!-- 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 - [X] These changes fix #14813 (github issue number if applicable). <!-- Either: --> - [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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18175) <!-- Reviewable:end -->
| * layout: Stop calling normal block size assignment for flex containerPu Xingyu2017-08-291-8/+25
| | | | | | | | | | No need to call the `assign_block_size_block_base()` method of normal block since it is implemented for CSS2.
* | Auto merge of #18243 - DominoTree:18224, r=stshinebors-servo2017-08-261-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [18224] Check if line_count is zero to calculate space around line <!-- Please describe your changes on the following line: --> Check line_count before attempting to calculate space around 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 - [x] These changes fix #18224 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because changes are minimal and the error was triggered by a test <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18243) <!-- Reviewable:end -->
| * | Check if line_count is zero to calculate space around lineNick Price2017-08-261-2/+6
| |/
* / Remove border collapse argument from compute_border_and_paddingKeith Yeung2017-08-251-3/+1
|/
* Improve containing block creation for position:absolute flowsMartin Robinson2017-08-171-0/+8
| | | | | | | | | | Instead of only promoting flows with positioned fragments to containing blocks, also do this for flows which have the transform, perspective or filter properties set. This is what the spec requires and also fixes some failing tests. It will allow us to stop creating stacking contexts for overflow:hidden and overflow:scroll flows. Fixes #18091.
* Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)Simon Sapin2017-08-151-3/+3
|
* Rename compute_absolute_position to compute_stacking_relative_positionMatt Brubeck2017-08-081-2/+2
|