mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Use mitochondria
This commit is contained in:
parent
cac32867ba
commit
0340ac6fae
3 changed files with 6 additions and 12 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -2749,9 +2749,9 @@ dependencies = [
|
|||
"gfx_traits",
|
||||
"ipc-channel",
|
||||
"libc",
|
||||
"mitochondria",
|
||||
"msg",
|
||||
"net_traits",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"range",
|
||||
"rayon",
|
||||
|
@ -3710,12 +3710,6 @@ dependencies = [
|
|||
"objc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
version = "0.2.1"
|
||||
|
|
|
@ -24,8 +24,8 @@ gfx_traits = {path = "../gfx_traits"}
|
|||
ipc-channel = "0.12"
|
||||
libc = "0.2"
|
||||
msg = {path = "../msg"}
|
||||
mitochondria = "1.1.2"
|
||||
net_traits = {path = "../net_traits"}
|
||||
once_cell = "1.2.0"
|
||||
parking_lot = "0.9"
|
||||
range = {path = "../range"}
|
||||
rayon = "1"
|
||||
|
|
|
@ -9,8 +9,8 @@ use crate::replaced::IntrinsicSizes;
|
|||
use embedder_traits::Cursor;
|
||||
use euclid::{Point2D, SideOffsets2D, Size2D, Vector2D};
|
||||
use gfx::text::glyph::GlyphStore;
|
||||
use mitochondria::OnceCell;
|
||||
use net_traits::image_cache::UsePlaceholder;
|
||||
use once_cell::unsync::OnceCell;
|
||||
use std::sync::Arc;
|
||||
use style::dom::OpaqueNode;
|
||||
use style::properties::ComputedValues;
|
||||
|
@ -175,7 +175,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
}
|
||||
|
||||
fn content_rect(&self) -> &units::LayoutRect {
|
||||
self.content_rect.get_or_init(|| {
|
||||
self.content_rect.init_once(|| {
|
||||
self.fragment
|
||||
.content_rect
|
||||
.to_physical(self.fragment.style.writing_mode, self.containing_block)
|
||||
|
@ -185,7 +185,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
}
|
||||
|
||||
fn padding_rect(&self) -> &units::LayoutRect {
|
||||
self.padding_rect.get_or_init(|| {
|
||||
self.padding_rect.init_once(|| {
|
||||
self.fragment
|
||||
.padding_rect()
|
||||
.to_physical(self.fragment.style.writing_mode, self.containing_block)
|
||||
|
@ -199,7 +199,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
builder: &mut DisplayListBuilder,
|
||||
common: &mut wr::CommonItemProperties,
|
||||
) {
|
||||
let initialized = self.border_edge_clip_id.get_or_init(|| {
|
||||
let initialized = self.border_edge_clip_id.init_once(|| {
|
||||
if self.border_radius.is_zero() {
|
||||
None
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue