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