Skip to content
Permalink
Browse files

Use mitochondria

  • Loading branch information
SimonSapin committed Jan 14, 2020
1 parent cac3286 commit 0340ac6fae11afaf5fb9a6e159837ecb2f53abed
Showing with 6 additions and 12 deletions.
  1. +1 −7 Cargo.lock
  2. +1 −1 components/layout_2020/Cargo.toml
  3. +4 −4 components/layout_2020/display_list.rs

Some generated files are not rendered by default. Learn more.

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

0 comments on commit 0340ac6

Please sign in to comment.
You can’t perform that action at this time.