mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Make layout use available image data before querying the image cache.
This commit is contained in:
parent
5f463d3c97
commit
49d2ea4f74
8 changed files with 102 additions and 5 deletions
|
@ -36,6 +36,7 @@ use html5ever::{LocalName, Namespace};
|
|||
use layout::data::StyleAndLayoutData;
|
||||
use layout::wrapper::GetRawData;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use range::Range;
|
||||
use script::layout_exports::{CharacterDataTypeId, ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
||||
use script::layout_exports::{Document, Element, Node, Text};
|
||||
|
@ -59,6 +60,7 @@ use std::fmt::Debug;
|
|||
use std::hash::{Hash, Hasher};
|
||||
use std::marker::PhantomData;
|
||||
use std::ptr::NonNull;
|
||||
use std::sync::Arc as StdArc;
|
||||
use std::sync::atomic::Ordering;
|
||||
use style::CaseSensitivityExt;
|
||||
use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||
|
@ -1048,6 +1050,11 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
|
|||
this.image_density()
|
||||
}
|
||||
|
||||
fn image_data(&self) -> Option<(Option<StdArc<Image>>, Option<ImageMetadata>)> {
|
||||
let this = unsafe { self.get_jsmanaged() };
|
||||
this.image_data()
|
||||
}
|
||||
|
||||
fn canvas_data(&self) -> Option<HTMLCanvasData> {
|
||||
let this = unsafe { self.get_jsmanaged() };
|
||||
this.canvas_data()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue