mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
518324cff6
commit
18d552a1e9
5 changed files with 20 additions and 28 deletions
|
@ -856,7 +856,7 @@ impl Fragment {
|
|||
/// Constructs a new `Fragment` instance.
|
||||
pub fn new<N: ThreadSafeLayoutNode>(node: &N, specific: SpecificFragmentInfo, ctx: &LayoutContext) -> Fragment {
|
||||
let style_context = ctx.style_context();
|
||||
let style = node.style(style_context).clone();
|
||||
let style = node.style(style_context);
|
||||
let writing_mode = style.writing_mode;
|
||||
|
||||
let mut restyle_damage = node.restyle_damage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue