aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2020-04-15 15:17:52 +0200
committerSimon Sapin <simon.sapin@exyr.org>2020-04-15 15:17:52 +0200
commit7f975c3d5d1a9b36a05736a7b6425b56a73ef760 (patch)
treeedcd63750cc1eb4c47313a7483630982e537e64d
parent7861b0be7900df6c7dbf8d4dac8ba14a8d4e3a56 (diff)
downloadservo-7f975c3d5d1a9b36a05736a7b6425b56a73ef760.tar.gz
servo-7f975c3d5d1a9b36a05736a7b6425b56a73ef760.zip
Remove use of some other unstable features
-rw-r--r--components/layout_2020/flow/inline.rs8
-rw-r--r--components/layout_2020/flow/mod.rs3
-rw-r--r--components/layout_2020/lib.rs2
-rw-r--r--components/layout_2020/positioned.rs6
4 files changed, 11 insertions, 8 deletions
diff --git a/components/layout_2020/flow/inline.rs b/components/layout_2020/flow/inline.rs
index 040b4c3f3cf..c129582a358 100644
--- a/components/layout_2020/flow/inline.rs
+++ b/components/layout_2020/flow/inline.rs
@@ -303,7 +303,11 @@ impl InlineFormattingContext {
panic!("display:none does not generate an abspos box")
},
};
- let hoisted_box = box_.clone().to_hoisted(initial_start_corner, tree_rank);
+ let hoisted_box = AbsolutelyPositionedBox::to_hoisted(
+ box_.clone(),
+ initial_start_corner,
+ tree_rank,
+ );
let hoisted_fragment = hoisted_box.fragment.clone();
ifc.push_hoisted_box_to_positioning_context(hoisted_box);
ifc.current_nesting_level.fragments_so_far.push(
@@ -786,7 +790,7 @@ impl TextRun {
glyphs,
text_decoration_line: ifc.current_nesting_level.text_decoration_line,
}));
- if runs.is_empty() {
+ if runs.as_slice().is_empty() {
break;
} else {
// New line
diff --git a/components/layout_2020/flow/mod.rs b/components/layout_2020/flow/mod.rs
index 33bba78de96..eb4a03be62e 100644
--- a/components/layout_2020/flow/mod.rs
+++ b/components/layout_2020/flow/mod.rs
@@ -315,7 +315,8 @@ impl BlockLevelBox {
))
},
BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(box_) => {
- let hoisted_box = box_.clone().to_hoisted(Vec2::zero(), tree_rank);
+ let hoisted_box =
+ AbsolutelyPositionedBox::to_hoisted(box_.clone(), Vec2::zero(), tree_rank);
let hoisted_fragment = hoisted_box.fragment.clone();
positioning_context.push(hoisted_box);
Fragment::AbsoluteOrFixedPositioned(AbsoluteOrFixedPositionedFragment {
diff --git a/components/layout_2020/lib.rs b/components/layout_2020/lib.rs
index 6b7a08ec29b..be5008035a5 100644
--- a/components/layout_2020/lib.rs
+++ b/components/layout_2020/lib.rs
@@ -3,8 +3,6 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#![deny(unsafe_code)]
-#![feature(arbitrary_self_types)]
-#![feature(exact_size_is_empty)]
#[macro_use]
extern crate serde;
diff --git a/components/layout_2020/positioned.rs b/components/layout_2020/positioned.rs
index 899b2b39e61..cb71ad521c4 100644
--- a/components/layout_2020/positioned.rs
+++ b/components/layout_2020/positioned.rs
@@ -100,7 +100,7 @@ impl AbsolutelyPositionedBox {
}
pub(crate) fn to_hoisted(
- self: Arc<Self>,
+ self_: Arc<Self>,
initial_start_corner: Vec2<Length>,
tree_rank: usize,
) -> HoistedAbsolutelyPositionedBox {
@@ -124,7 +124,7 @@ impl AbsolutelyPositionedBox {
}
}
- let box_offsets = self.contents.style.box_offsets();
+ let box_offsets = self_.contents.style.box_offsets();
HoistedAbsolutelyPositionedBox {
tree_rank,
box_offsets: Vec2 {
@@ -140,7 +140,7 @@ impl AbsolutelyPositionedBox {
),
},
fragment: ArcRefCell::new(None),
- absolutely_positioned_box: self,
+ absolutely_positioned_box: self_,
}
}
}