mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Auto merge of #26190 - servo:unstable, r=nox
Remove use of soon-to-be-deprecated unstable feature https://github.com/rust-lang/rust/issues/47336#issuecomment-586589016
This commit is contained in:
commit
a4fbad2533
9 changed files with 17 additions and 19 deletions
|
@ -303,7 +303,11 @@ impl InlineFormattingContext {
|
||||||
panic!("display:none does not generate an abspos box")
|
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();
|
let hoisted_fragment = hoisted_box.fragment.clone();
|
||||||
ifc.push_hoisted_box_to_positioning_context(hoisted_box);
|
ifc.push_hoisted_box_to_positioning_context(hoisted_box);
|
||||||
ifc.current_nesting_level.fragments_so_far.push(
|
ifc.current_nesting_level.fragments_so_far.push(
|
||||||
|
@ -786,7 +790,7 @@ impl TextRun {
|
||||||
glyphs,
|
glyphs,
|
||||||
text_decoration_line: ifc.current_nesting_level.text_decoration_line,
|
text_decoration_line: ifc.current_nesting_level.text_decoration_line,
|
||||||
}));
|
}));
|
||||||
if runs.is_empty() {
|
if runs.as_slice().is_empty() {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
// New line
|
// New line
|
||||||
|
|
|
@ -315,7 +315,8 @@ impl BlockLevelBox {
|
||||||
))
|
))
|
||||||
},
|
},
|
||||||
BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(box_) => {
|
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();
|
let hoisted_fragment = hoisted_box.fragment.clone();
|
||||||
positioning_context.push(hoisted_box);
|
positioning_context.push(hoisted_box);
|
||||||
Fragment::AbsoluteOrFixedPositioned(AbsoluteOrFixedPositionedFragment {
|
Fragment::AbsoluteOrFixedPositioned(AbsoluteOrFixedPositionedFragment {
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![feature(arbitrary_self_types)]
|
|
||||||
#![feature(exact_size_is_empty)]
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
|
|
|
@ -100,7 +100,7 @@ impl AbsolutelyPositionedBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn to_hoisted(
|
pub(crate) fn to_hoisted(
|
||||||
self: Arc<Self>,
|
self_: Arc<Self>,
|
||||||
initial_start_corner: Vec2<Length>,
|
initial_start_corner: Vec2<Length>,
|
||||||
tree_rank: usize,
|
tree_rank: usize,
|
||||||
) -> HoistedAbsolutelyPositionedBox {
|
) -> HoistedAbsolutelyPositionedBox {
|
||||||
|
@ -124,7 +124,7 @@ impl AbsolutelyPositionedBox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let box_offsets = self.contents.style.box_offsets();
|
let box_offsets = self_.contents.style.box_offsets();
|
||||||
HoistedAbsolutelyPositionedBox {
|
HoistedAbsolutelyPositionedBox {
|
||||||
tree_rank,
|
tree_rank,
|
||||||
box_offsets: Vec2 {
|
box_offsets: Vec2 {
|
||||||
|
@ -140,7 +140,7 @@ impl AbsolutelyPositionedBox {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
fragment: ArcRefCell::new(None),
|
fragment: ArcRefCell::new(None),
|
||||||
absolutely_positioned_box: self,
|
absolutely_positioned_box: self_,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3992,8 +3992,8 @@ class CGMemberJITInfo(CGThing):
|
||||||
protoID: PrototypeList::ID::${name} as u16,
|
protoID: PrototypeList::ID::${name} as u16,
|
||||||
},
|
},
|
||||||
__bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: ${depth} },
|
__bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: ${depth} },
|
||||||
_bitfield_1: unsafe {
|
_bitfield_1: __BindgenBitfieldUnit::new(
|
||||||
mem::transmute(new_jsjitinfo_bitfield_1!(
|
new_jsjitinfo_bitfield_1!(
|
||||||
JSJitInfo_OpType::${opType} as u8,
|
JSJitInfo_OpType::${opType} as u8,
|
||||||
JSJitInfo_AliasSet::${aliasSet} as u8,
|
JSJitInfo_AliasSet::${aliasSet} as u8,
|
||||||
JSValueType::${returnType} as u8,
|
JSValueType::${returnType} as u8,
|
||||||
|
@ -4004,8 +4004,8 @@ class CGMemberJITInfo(CGThing):
|
||||||
${isLazilyCachedInSlot},
|
${isLazilyCachedInSlot},
|
||||||
${isTypedMethod},
|
${isTypedMethod},
|
||||||
${slotIndex},
|
${slotIndex},
|
||||||
))
|
).to_ne_bytes()
|
||||||
},
|
),
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
opName=opName,
|
opName=opName,
|
||||||
|
@ -5988,6 +5988,7 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries
|
||||||
'js::error::throw_type_error',
|
'js::error::throw_type_error',
|
||||||
'js::error::throw_internal_error',
|
'js::error::throw_internal_error',
|
||||||
'js::rust::wrappers::Call',
|
'js::rust::wrappers::Call',
|
||||||
|
'js::jsapi::__BindgenBitfieldUnit',
|
||||||
'js::jsapi::CallArgs',
|
'js::jsapi::CallArgs',
|
||||||
'js::jsapi::CurrentGlobalOrNull',
|
'js::jsapi::CurrentGlobalOrNull',
|
||||||
'js::rust::wrappers::GetPropertyKeys',
|
'js::rust::wrappers::GetPropertyKeys',
|
||||||
|
|
|
@ -383,7 +383,7 @@ where
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub unsafe fn from_box(value: Box<T>) -> Self {
|
pub unsafe fn from_box(value: Box<T>) -> Self {
|
||||||
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
|
* 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/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#![feature(box_into_raw_non_null)]
|
|
||||||
#![feature(const_fn)]
|
#![feature(const_fn)]
|
||||||
#![feature(const_transmute)]
|
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![feature(inner_deref)]
|
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(register_tool)]
|
#![feature(register_tool)]
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
//! to depend on script.
|
//! to depend on script.
|
||||||
|
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![feature(box_into_raw_non_null)]
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate html5ever;
|
extern crate html5ever;
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
//!
|
//!
|
||||||
//! [glutin]: https://github.com/tomaka/glutin
|
//! [glutin]: https://github.com/tomaka/glutin
|
||||||
|
|
||||||
#![feature(core_intrinsics)]
|
|
||||||
|
|
||||||
#[cfg(not(target_os = "android"))]
|
#[cfg(not(target_os = "android"))]
|
||||||
include!("main2.rs");
|
include!("main2.rs");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue