Commit graph

46 commits

Author SHA1 Message Date
Simon Wülker
3d320fa96a
Update rustfmt to the 2024 style edition (#35764)
* 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>
2025-03-03 11:26:53 +00:00
Martin Robinson
621ddd749c
Elide lifetimes where possible after rustup (#34824)
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>
2025-01-03 18:54:44 +00:00
Oriol Brufau
f7ead9bcb6
Lint layout_2013 with clippy (#31221)
* Lint layout_2013 with clippy

CARGO_BUILD_RUSTC=rustc cargo clippy --fix -p layout_2013 --broken-code

* ./mach fmt

* Cosmetic adjustments
2024-01-30 11:46:35 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
est31
bb6052ca8e Some further removals 2019-05-30 20:27:19 +02:00
est31
3efc5e59bc Remove unused code from gfx and layout crates 2019-05-29 21:51:28 +02:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Pyfisch
349047b096 Rustfmt layout crate 2018-09-01 13:24:57 +02:00
Simon Sapin
4727b92754 Remove usage of unstable feature conservative_impl_trait in layout 2017-10-13 11:11:06 +02:00
Simon Sapin
316cd35767 Untry 2017-06-18 13:21:51 +02:00
Anthony Ramine
fe3f4ff0c2 Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
Shing Lyu
344ad61f2c Added a toolbar for going to previous and next node 2016-12-28 15:31:48 +08:00
Shing Lyu
4b2d80afcf Activate flexbox layout tracing 2016-12-28 15:31:45 +08:00
Shing Lyu
8bea421329 Migrated -Z trace-layout to serde_json 2016-11-07 15:54:07 +08:00
Michael Howell
5f320bd2ca Make FlowRef a newtype
This creates a sharp distinction between `Arc<Flow>`s, which may be
owned by anyone, and `FlowRef`s, which may only be owned by the
traversal code. By checking the reference count, we ensure that a `Flow`
cannot be pointed to by `Arc`s and `FlowRef`s simultaneously.

This is not a complete fix for #6503, though it is a necessary start
(enforcing the no-aliasing rule of `FlowRef::deref_mut` will require far
more work).

Fixes #14014
2016-11-04 13:36:04 -07:00
Patrick Walton
92b7189f31 layout: Add a safe way for layout to perform random access on child
flows.

This uses caching to ensure that we perform no more than O(n) pointer
loads.
2016-10-26 14:04:15 -07:00
Patrick Walton
d990a7eb84 layout: Don't leak FlowRefs to the flexbox layout code.
This can cause memory safety problems. Comments have been added to
`flow_list.rs` to prevent this from happening again.
2016-10-26 14:04:14 -07:00
Anthony Ramine
a1af2cded8 Use impl DoubleEndedIterator for two flow_list iterators 2016-08-14 19:06:18 +02:00
ddh
5c7943217b Added DoubleEndedIterator for MutFlowListIterator 2016-06-17 14:57:41 +01:00
Patrick Walton
04f05349b1 layout: Check flow descendants of inline block fragments to find their
baselines when aligning inline fragments per CSS 2.1 § 10.8.1.
2016-05-04 13:20:21 -07:00
Michael Howell
8953207f83 Add support for vertical alignment within table cells.
Fixes #10621
2016-04-20 14:40:02 -07:00
Daniel Robertson
3580f91291 Implement flexbox reordering
Add style property for order and implement reordering by this property
in flex flow. Based on previous work by @zentner-kyle.
2016-04-11 16:55:16 -04:00
Simon Sapin
5498b54347 Add Multicolumn support block fragmentation. 2016-01-28 09:43:14 +01:00
Ms2ger
5ec1cdea9b Remove dead code from layout. 2015-11-18 15:00:58 +01:00
Adam Szopa
88991013ab Remove explicit lifetimes which can be elided. 2015-10-21 01:27:48 +02:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Manish Goregaokar
5c24da3e2d Undo elision for trait object; trait objects are strange 2015-09-04 09:24:49 +05:30
Manish Goregaokar
54c036cd66 Elide most 'a lifetimes 2015-09-04 08:55:51 +05:30
Simon Sapin
21d69314d4 Don’t mark flow_ref::deref_mut as unsafe.
See discussion in https://github.com/servo/servo/pull/7237
2015-08-21 21:16:25 +02:00
Simon Sapin
649250130b Replace FlowRef with Arc<Flow>, now that Arc supports DST.
… and WeakFlowRef with Weak<Flow>.
2015-08-20 16:49:48 +02:00
Simon Sapin
2d22aa8e7e Replace the unsound impl DerefMut for FlowRef with an unsafe function.
See #6503.
2015-08-20 16:24:26 +02:00
Ms2ger
e39c68e307 Use usize in flow_list. 2015-03-29 12:43:44 +02:00
Manish Goregaokar
3479d3fa7f Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
13c7cf928a Stop calling deref() and deref_mut() explicitly. 2015-01-22 16:04:21 +01:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Clark Gaebel
76ed7484eb Use the Deref traits for FlowRefs.
This patch switches FlowRefs to using the Deref and DerefMut traits, instead of
the custom `get` and `get_mut` functions.
2014-10-15 11:04:05 -07:00
Keegan McAllister
dc86e83654 Eliminate warnings 2014-09-20 13:00:55 -07:00
Keegan McAllister
8a7eefefd5 Remove most of FlowList
This needs to be reworked for DST.  Until then, DList<FlowRef> will do.
2014-09-20 12:56:52 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/layout/flow_list.rs (Browse further)