mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Make geom.rs
logical geoemetry types more ergonomic (#32633)
Make using the logical geometry types more ergonomic by having them all implement `Copy` (at most 4 64-bit numbers), similar to what `euclid` does. In addition add an implementation of `Neg` for `LogicalVec` and `LogicalSides` as it will be used in upcoming table implementation code.
This commit is contained in:
parent
e9cf4d4971
commit
adc0fc984d
10 changed files with 80 additions and 102 deletions
|
@ -240,8 +240,7 @@ impl PositioningContext {
|
|||
self.append(new_context);
|
||||
|
||||
if style.clone_position() == Position::Relative {
|
||||
new_fragment.content_rect.start_corner +=
|
||||
&relative_adjustement(style, containing_block);
|
||||
new_fragment.content_rect.start_corner += relative_adjustement(style, containing_block);
|
||||
}
|
||||
|
||||
new_fragment
|
||||
|
@ -690,7 +689,7 @@ impl HoistedAbsolutelyPositionedBox {
|
|||
block_end: block_axis.margin_end,
|
||||
};
|
||||
|
||||
let pb = &pbm.padding + &pbm.border;
|
||||
let pb = pbm.padding + pbm.border;
|
||||
let inline_start = match inline_axis.anchor {
|
||||
Anchor::Start(start) => start + pb.inline_start + margin.inline_start,
|
||||
Anchor::End(end) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue