aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/table_caption.rs
diff options
context:
space:
mode:
authorPu Xingyu <pu.stshine@gmail.com>2017-02-07 10:45:13 +0800
committerPu Xingyu <pu.stshine@gmail.com>2017-02-08 08:47:54 +0800
commit336aa795b4b9933436c9df0200de64e18b6f3b7e (patch)
tree7b8acf2d9eba39a68d47205462b0b29633584a28 /components/layout/table_caption.rs
parentf07bfaa97466018f93124e308556aa93293cf648 (diff)
downloadservo-336aa795b4b9933436c9df0200de64e18b6f3b7e.tar.gz
servo-336aa795b4b9933436c9df0200de64e18b6f3b7e.zip
Remove cached thread local context from LayoutContext
Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
Diffstat (limited to 'components/layout/table_caption.rs')
-rw-r--r--components/layout/table_caption.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/components/layout/table_caption.rs b/components/layout/table_caption.rs
index 926aa872f6b..fe3eb5bf692 100644
--- a/components/layout/table_caption.rs
+++ b/components/layout/table_caption.rs
@@ -8,7 +8,7 @@
use app_units::Au;
use block::BlockFlow;
-use context::{LayoutContext, SharedLayoutContext};
+use context::LayoutContext;
use display_list_builder::DisplayListBuildState;
use euclid::Point2D;
use flow::{Flow, FlowClass, OpaqueFlow};
@@ -16,7 +16,6 @@ use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree;
use std::fmt;
use std::sync::Arc;
-use style::context::SharedStyleContext;
use style::logical_geometry::LogicalSize;
use style::properties::ServoComputedValues;
@@ -54,17 +53,17 @@ impl Flow for TableCaptionFlow {
self.block_flow.bubble_inline_sizes();
}
- fn assign_inline_sizes(&mut self, shared_context: &SharedStyleContext) {
+ fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
debug!("assign_inline_sizes({}): assigning inline_size for flow", "table_caption");
- self.block_flow.assign_inline_sizes(shared_context);
+ self.block_flow.assign_inline_sizes(layout_context);
}
- fn assign_block_size<'a>(&mut self, layout_context: &'a LayoutContext<'a>) {
+ fn assign_block_size(&mut self, layout_context: &LayoutContext) {
debug!("assign_block_size: assigning block_size for table_caption");
self.block_flow.assign_block_size(layout_context);
}
- fn compute_absolute_position(&mut self, layout_context: &SharedLayoutContext) {
+ fn compute_absolute_position(&mut self, layout_context: &LayoutContext) {
self.block_flow.compute_absolute_position(layout_context)
}