mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #13012 - servo:shared-layout-context, r=nox
Stop creating a LayoutContext in build_display_list_for_subtree. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13012) <!-- Reviewable:end -->
This commit is contained in:
commit
6191748907
18 changed files with 66 additions and 60 deletions
|
@ -308,13 +308,13 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
|||
Some(LayoutNodeType::Element(LayoutElementType::HTMLImageElement)) => {
|
||||
let image_info = box ImageFragmentInfo::new(node,
|
||||
node.image_url(),
|
||||
&self.layout_context);
|
||||
&self.layout_context.shared);
|
||||
SpecificFragmentInfo::Image(image_info)
|
||||
}
|
||||
Some(LayoutNodeType::Element(LayoutElementType::HTMLObjectElement)) => {
|
||||
let image_info = box ImageFragmentInfo::new(node,
|
||||
node.object_data(),
|
||||
&self.layout_context);
|
||||
&self.layout_context.shared);
|
||||
SpecificFragmentInfo::Image(image_info)
|
||||
}
|
||||
Some(LayoutNodeType::Element(LayoutElementType::HTMLTableElement)) => {
|
||||
|
@ -332,7 +332,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
|||
}
|
||||
Some(LayoutNodeType::Element(LayoutElementType::HTMLCanvasElement)) => {
|
||||
let data = node.canvas_data().unwrap();
|
||||
SpecificFragmentInfo::Canvas(box CanvasFragmentInfo::new(node, data, self.layout_context))
|
||||
SpecificFragmentInfo::Canvas(box CanvasFragmentInfo::new(node, data, self.style_context()))
|
||||
}
|
||||
_ => {
|
||||
// This includes pseudo-elements.
|
||||
|
@ -1267,7 +1267,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
|||
Some(ref url) => {
|
||||
let image_info = box ImageFragmentInfo::new(node,
|
||||
Some((*url).clone()),
|
||||
&self.layout_context);
|
||||
&self.layout_context.shared);
|
||||
vec![Fragment::new(node, SpecificFragmentInfo::Image(image_info), self.layout_context)]
|
||||
}
|
||||
None => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue