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 all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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_,
}
}
}
@@ -3992,8 +3992,8 @@ def jitInfoInitializer(isTypedMethod):
protoID: PrototypeList::ID::${name} as u16,
},
__bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: ${depth} },
_bitfield_1: unsafe {
mem::transmute(new_jsjitinfo_bitfield_1!(
_bitfield_1: __BindgenBitfieldUnit::new(
new_jsjitinfo_bitfield_1!(
JSJitInfo_OpType::${opType} as u8,
JSJitInfo_AliasSet::${aliasSet} as u8,
JSValueType::${returnType} as u8,
@@ -4004,8 +4004,8 @@ def jitInfoInitializer(isTypedMethod):
${isLazilyCachedInSlot},
${isTypedMethod},
${slotIndex},
))
},
).to_ne_bytes()
),
}
""",
opName=opName,
@@ -5988,6 +5988,7 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries
'js::error::throw_type_error',
'js::error::throw_internal_error',
'js::rust::wrappers::Call',
'js::jsapi::__BindgenBitfieldUnit',
'js::jsapi::CallArgs',
'js::jsapi::CurrentGlobalOrNull',
'js::rust::wrappers::GetPropertyKeys',
@@ -383,7 +383,7 @@ where
#[allow(unrooted_must_root)]
pub unsafe fn from_box(value: Box<T>) -> Self {
Self {
ptr: Box::into_raw_non_null(value),
ptr: Box::leak(value).into(),
}
}
}
@@ -2,12 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

#![feature(box_into_raw_non_null)]
#![feature(const_fn)]
#![feature(const_transmute)]
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#![feature(inner_deref)]
#![feature(plugin)]
#![feature(register_tool)]
#![deny(unsafe_code)]
@@ -7,7 +7,6 @@
//! to depend on script.

#![deny(unsafe_code)]
#![feature(box_into_raw_non_null)]

#[macro_use]
extern crate html5ever;
@@ -15,8 +15,6 @@
//!
//! [glutin]: https://github.com/tomaka/glutin

#![feature(core_intrinsics)]

#[cfg(not(target_os = "android"))]
include!("main2.rs");

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.