Stop using Ref::map for style().

It's not possible to implement a Ref::map equivalent method on AtomicRefCell
while having AtomicRefCell implemented on top of RwArc. We could potentially
reimplement AtomicRefCell to be more like RefCell and add a Ref::map equivalent
method, but I (and pcwalton) think we should try just cloning a few extra
Arcs at these callsites instead.

MozReview-Commit-ID: 6H8vAWguO3z
This commit is contained in:
Bobby Holley 2016-09-29 17:43:04 -07:00
parent 518324cff6
commit 18d552a1e9
5 changed files with 20 additions and 28 deletions

View file

@ -1272,7 +1272,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
/// as it's harder to understand.
fn generate_missing_child_flow<N: ThreadSafeLayoutNode>(self, node: &N, ctx: &LayoutContext) -> FlowRef {
let style_context = ctx.style_context();
let mut style = node.style(style_context).clone();
let mut style = node.style(style_context);
match self.class() {
FlowClass::Table | FlowClass::TableRowGroup => {
properties::modify_style_for_anonymous_table_object(