aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/table_wrapper.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove legacy layout (layout 2013) (#35943)Oriol Brufau2025-03-131-1013/+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-1/+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>
* Elide lifetimes where possible after rustup (#34824)Martin Robinson2025-01-031-1/+1
| | | | | | | | | The new version of rust allows us to elide some lifetimes and clippy is now complaining about this. This change elides them where possible and removes the clippy exceptions. Fixes #34804. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Enable min-content, max-content, fit-content and stretch (#33492)Oriol Brufau2024-09-201-19/+24
| | | | | | | | | 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>
* clippy fixes regarding clone_from (#32482)Peter Mikola2024-06-121-1/+2
|
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* Lint layout_2013 with clippy (#31221)Oriol Brufau2024-01-301-17/+14
| | | | | | | | | * Lint layout_2013 with clippy CARGO_BUILD_RUSTC=rustc cargo clippy --fix -p layout_2013 --broken-code * ./mach fmt * Cosmetic adjustments
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-1/+1
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-15/+18
| | | | | * 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>
* Add trace logs when assigning inline/block sizesWu Yu Wei2022-04-171-0/+7
|
* Fix warnings introduced in newer Rust NightlySimon Sapin2021-02-251-3/+5
| | | | | | | | | | | | This does not (yet) upgrade ./rust-toolchain The warnings: * dead_code "field is never read" * redundant_semicolons "unnecessary trailing semicolon" * non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021" * unstable_name_collisions "a method with this name may be added to the standard library in the future" * legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
* 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
|
* style: Rename MozLength to Size, and MaxLength to MaxSize.Emilio Cobos Álvarez2019-02-121-4/+4
| | | | | | | | | | | | | 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-12/+11
|
* Remove BlockFlowDisplayListBuildingAnthony Ramine2019-01-141-3/+1
| | | | Replaced by inherent methods on BlockFlow, the only implementor of that trait.
* style: Fix servo build.Emilio Cobos Álvarez2019-01-081-2/+2
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-7/+7
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-2/+2
|
* Reorder importsPyfisch2018-11-061-4/+8
|
* Format remaining filesPyfisch2018-11-061-8/+10
|
* Sort `use` statementsSimon Sapin2018-11-061-3/+3
|
* `cargo fix --edition`Simon Sapin2018-11-061-12/+12
|
* 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-290/+383
|
* New reference frames should create containing blocksMartin Robinson2018-06-251-1/+1
| | | | | | | Transforms should always create containing blocks. This bug already existed in Servo, but was covered up by the reference frame id replacement feature in WebRender. Now that we create reference frames manually we need to fix it.
* 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
* style: Make all keywords CamelCase for consistency.Emilio Cobos Álvarez2017-12-061-1/+1
| | | | This prevents confusion and paves the ground for derive(Parse) of them.
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-5/+6
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-6/+5
| | | | | | 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-5/+6
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts.Simon Sapin2017-10-141-0/+4
|
* Fix panic when tables having position:stickyMartin Robinson2017-09-151-2/+4
| | | | | We no longer do any stacking context or clip node creation for table wrappers, instead relying on their TableFlows to do this.
* Separate stacking context collection and display list building stateMartin Robinson2017-09-121-2/+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.
* Auto merge of #18212 - mrobinson:position-sticky, r=emiliobors-servo2017-09-051-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for position:sticky This leverages the position:sticky support in WebRender to bring basic support for position:sticky in Servo. There are still some issues with nested sticky flows as well as a few other corner cases. Tests are imported from WPT and can be removed once we update to the latest version. <!-- 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: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/18212) <!-- Reviewable:end -->
| * Add support for position:stickyMartin Robinson2017-09-051-2/+3
| | | | | | | | | | | | | | | | This leverages the position:sticky support in WebRender to bring basic support for position:sticky in Servo. There are still some issues with nested sticky flows as well as a few other corner cases. Tests are imported from WPT and can be removed once we update to the latest version.
* | Remove border collapse argument from compute_border_and_paddingKeith Yeung2017-08-251-17/+5
|/
* order derivable traits listsClément DAVID2017-08-231-2/+2
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Rename compute_absolute_position to compute_stacking_relative_positionMatt Brubeck2017-08-081-2/+2
|
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-1/+1
| | | | | | The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
* stylo: Use ComputedValuesInner instead of ComputedValues when we don't need itManish Goregaokar2017-07-171-2/+2
|
* Fix up script and layout.Bobby Holley2017-05-021-2/+1
|
* Remove cached thread local context from LayoutContextPu Xingyu2017-02-081-9/+10
| | | | | Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
* Initialize block_container_inline_size for non-block root flowsMatt Brubeck2017-01-271-0/+2
| | | | Fixes #14948.
* Auto merge of #13681 - gpoesia:master, r=mbrubeckbors-servo2017-01-231-1/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix margin size calculation for TableWrapper <!-- Please describe your changes on the following line: --> Fixes inline size calculation for TableWrapper. The table's width was always reaching the inline size equation solver as a specified variable, which was causing the system to be overdetermined when there was a margin specified for the table, and this caused the overflow reported in #12748. The fix consists in handling three cases when the table's width is not specified: if the preferred size of all columns fits, it is returned; if the minimum size does not fit, it is returned instead (it will overflow), otherwise, it is returned as a free variable (that should be solved together with the margin to some value above the minimum width and below the preferred width). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12748 - [X] There are tests for these changes <!-- 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/13681) <!-- Reviewable:end -->
| * TableWrapper: fix content inline size calculationGabriel Poesia2016-12-301-1/+7
| | | | | | | | | | The preferred size of all columns was always being used before, but this caused problems when it does not fit along with margins.
* | Rework the way scroll roots are collectedMartin Robinson2017-01-101-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Collect scroll roots during the collect_stacking_context phase instead of during display list construction. This will be useful in order to collect containing block scroll roots as well as to give scroll roots sequential ids in the future. This change also pulls stacking context children out of the StackingContext struct itself, which should reduce very slightly the memory used by the finished display list. This also simplifies the DisplayListBuilder because it no longer has to maintain a stack of ScrollRootIds and StackingContextIds and can instead just rely on the program stack.
* | Simplify propagation of column sizes from TableWrapperFlowMatt Brubeck2016-12-141-14/+5
| |