Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of soon-to-be-deprecated unstable feature #26190

Merged
merged 4 commits into from Apr 16, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Remove use of some other unstable features

  • Loading branch information
SimonSapin committed Apr 15, 2020
commit 7f975c3d5d1a9b36a05736a7b6425b56a73ef760
@@ -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
@@ -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 {
@@ -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;
@@ -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_,
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.