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
|
@ -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