Current-pixel-density tests passing

This commit is contained in:
paavininanda 2018-09-03 19:46:15 +05:30
parent 9a83ab6297
commit 25027e476c
9 changed files with 74 additions and 43 deletions

View file

@ -400,6 +400,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
Some(LayoutNodeType::Element(LayoutElementType::HTMLImageElement)) => {
let image_info = Box::new(ImageFragmentInfo::new(
node.image_url(),
node.image_density(),
node,
&self.layout_context,
));
@ -408,6 +409,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
Some(LayoutNodeType::Element(LayoutElementType::HTMLObjectElement)) => {
let image_info = Box::new(ImageFragmentInfo::new(
node.object_data(),
None,
node,
&self.layout_context,
));
@ -1471,6 +1473,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
ImageUrlOrNone::Url(ref url_value) => {
let image_info = Box::new(ImageFragmentInfo::new(
url_value.url().map(|u| u.clone()),
None,
node,
&self.layout_context,
));